Functions |
BBDECL float BBCALL | xTFormedX () |
| Returns the X component of the last xTFormPoint(), xTFormVector() or xTFormNormal() operation.
|
BBDECL float BBCALL | xTFormedY () |
| Returns the Y component of the last xTFormPoint(), xTFormVector() or xTFormNormal() operation.
|
BBDECL float BBCALL | xTFormedZ () |
| Returns the Z component of the last xTFormPoint(), xTFormVector() or xTFormNormal() operation.
|
BBDECL void BBCALL | xTFormNormal (float x, float y, float z, Entity *source, Entity *destination) |
| Transforms vector between coordinate systems.
|
BBDECL void BBCALL | xTFormPoint (float x, float y, float z, Entity *source, Entity *destination) |
| Transforms point between coordinate systems.
|
BBDECL void BBCALL | xTFormVector (float x, float y, float z, Entity *source, Entity *destination) |
| Transforms vector between coordinate systems.
|
BBDECL float BBCALL | xVectorPitch (float x, float y, float z) |
| Returns the pitch value of a vector.
|
BBDECL float BBCALL | xVectorYaw (float x, float y, float z) |
| Returns the yaw value of a vector.
|
BBDECL void BBCALL xTFormPoint |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
Entity * |
source, |
|
|
Entity * |
destination |
|
) |
| |
Transforms point between coordinate systems.
After using xTFormPoint() the new components can be read with xTFormedX(), xTFormedY() and xTFormedZ(). See xEntityX() for details about local coordinates. Consider a sphere built with xCreateSphere(). The 'north pole' is at (0.0, 1.0, 0.0). At first, local and global coordinates are the same. As the sphere is moved, turned and scaled the global coordinates of the point change. But it is always at (0.0, 1.0, 0.0) in the sphere's local space.
- Parameters:
-
x | x component of a vector in 3D space |
y | y component of a vector in 3D space |
z | z component of a vector in 3D space |
source | Handle of source entity, or 0 for 3d world |
destination | Handle of dstination entity, or 0 for 3d world |
BBDECL void BBCALL xTFormVector |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
Entity * |
source, |
|
|
Entity * |
destination |
|
) |
| |
Transforms vector between coordinate systems.
After using xTFormVector() the new components can be read with xTFormedX(), xTFormedY() and xTFormedZ(). See xEntityX() for details about local coordinates. Similar to xTFormPoint(), but operates on a vector. A vector can be thought of as 'displacement relative to current location'. For example, vector (1.0, 2.0, 3.0) means one step to the right, two steps up and three steps forward.
- Parameters:
-
x | x component of a vector in 3D space |
y | y component of a vector in 3D space |
z | z component of a vector in 3D space |
source | Handle of source entity, or 0 for 3d world |
destination | Handle of dstination entity, or 0 for 3d world |
BBDECL void BBCALL xTFormNormal |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
Entity * |
source, |
|
|
Entity * |
destination |
|
) |
| |
Transforms vector between coordinate systems.
After using xTFormNormal() the new components can be read with xTFormedX(), xTFormedY() and xTFormedZ(). This is exactly the same as xTFormVector() but with one added feature. After the transformation the new vector is 'normalized', meaning it is scaled to have length 1. For example, suppose the result of xTFormVector is (1.0, 2.0, 2.0). This vector has length sqrt(1.0 * 1.0 + 2.0 * 2.0 + 2.0 * 2.0) = sqrt(9.0) = 3.0 This means xTFormNormal() would produce (1.0 / 3.0, 2.0 / 3.0, 2.0 / 3.0).
- Parameters:
-
x | x component of a vector in 3D space |
y | y component of a vector in 3D space |
z | z component of a vector in 3D space |
source | Handle of source entity, or 0 for 3d world |
destination | Handle of dstination entity, or 0 for 3d world |