|
This instruction transforms the coordinate system for all object instructions until an
TransformEnd instruction is found. The effect is similar to the
TransformCall() instruction but no subroutine call is used. Also all
rotations are defined through an so called transformation matrix.
If you use the letter "a" as the optional specifier, SCASM will switch to
automatic mode and calculate the matrix for you from the pitch, bank and heading angles.
Positive pich numbers are "nose down" and positive bank numbers are "left
side down".
All matrix values are floating point numbers.
See also TransformEnd.
m.. |
matrix values |
xo,zo,yo |
linear offset values |
p, b, h |
pitch, bank and heading angles
pitch |
positive values are nose down. |
bank |
positive values are left side down |
heading |
positive values - turn left ?? |
|
Example from an FS2000 MDL file:
...
Transform_Mat( m
-1 1021 900
1 0 0
0 1 0
0 0 1
)
VecPoints( ... )
Specular( 0 )
LoadBitmap( 0 1 EF 128 128 128 xyz.bmp )
ShadedTexPoly( ... )
...
TransformEnd
... |
2nd example from an FS2000 MDL:
...
Transform_Mat(
3157 146 1178 ; xzy
1 0 0
0 1 0
0 0 1
)
Specular( 0 )
RGBSColor( EF 255 255 255 )
IfVarAnd( :L27F0 D8 10 )
VarBaseOverride( 0 )
IfVarAnd( :L27F0 282 2 )
Light( m 6 0 0 0 40 0.6 0.4
FF 255 255 255
1 0 0 )
:L27F0
TransformEnd
... |
3rd example:
...
Transform_Mat(
0 761 -8310 ; xzy
1 0 0
0 -0.4342 -0.9008
0 0.9008 -0.4342
)
Specular( 0 )
RGBSColor( EF 255 255 255 )
IfVarAnd( :LDF2 D8 10 )
VarBaseOverride( 0 )
IfVarAnd( :LDF2 282 2 )
Light( m 6 0 0 0 40 0.6 0.4
FF 255 255 255
0.2868 0.9436 0.1656 )
:LDF2
TransformEnd
... |
|