I'd like to port Blitz3D's TFormVector function in Ogre 1.7. The function is described…
- User
I'd like to port Blitz3D's TFormVector function in Ogre 1.7.
The function is described as:
TFORMVECTOR(FLOAT X,FLOAT Y,FLOAT Z, SOURCE_ENTITY,DEST_ENTITY) x, y, z = components of a vector in 3d space source_entity = handle of source entity, or 0 for 3d world dest_entity = handle of destination entity, or 0 for 3d world Description Transforms between coordinate systems. After using TFormVector the new components can be read with TFormedX(), TFormedY() and TFormedZ().
Use Case 1: Given the source position (1, 1, 1) with an orientation of (0, 90, 90), and the destination position (0, 0, 0) with an orientation of (0, 90, 90), when the TFormVector(0, 1, 0) command is applied, the expected result is (0, 1, 0).
Use Case 2: Given the source position (1, 1, 1) with an orientation of (0, 90, 90), and the destination position (0, 0, 0) with an orientation of (0, 0, 0), when the TFormVector(0, 1, 0) command is applied, the expected result is (0, 0, -1).
Use these two sets of use case values directly and not using scenenodes
- Assistant