![]() |
Xors3d Engine
|
Functions | |
BBDECL int BBCALL | xCountChildren (Entity *entity) |
Returns the number of children of an entity. | |
BBDECL float BBCALL | xDeltaPitch (Entity *entity1, Entity *entity2) |
Returns the pitch angle, that first entity should be rotated by in order to face second. | |
BBDECL float BBCALL | xDeltaYaw (Entity *entity1, Entity *entity2) |
Returns the yaw angle, that first entity should be rotated by in order to face second. | |
BBDECL int BBCALL | xEntitiesBBIntersect (Entity *entity1, Entity *entity2) |
Returns true if the specified meshes bounding boxes are currently intersecting. | |
BBDECL int BBCALL | xEntityBlue (Entity *entity) |
Returns blue value of entitys color. | |
BBDECL const char *BBCALL | xEntityClass (Entity *entity) |
Returns a string containing the class of the given entity. | |
BBDECL float BBCALL | xEntityDistance (Entity *entity1, Entity *entity2) |
Returns the distance between two entities. | |
BBDECL int BBCALL | xEntityGreen (Entity *entity) |
Returns green value of entitys color. | |
BBDECL int BBCALL | xEntityHidden (Entity *entity) |
Returns true if entity was hidden by the xHideEntity() function and false otherwise. | |
BBDECL const char *BBCALL | xEntityName (Entity *entity) |
Returns the name of an entity. An entity's name may be set in a modelling program, or manually set using xNameEntity() | |
BBDECL Entity *BBCALL | xEntityPick (Entity *entity, float range=0.0f) |
Returns the nearest entity 'ahead' of the specified entity. | |
BBDECL float BBCALL | xEntityPitch (Entity *entity, bool isGlobal=false) |
Returns the pitch angle of an entity. | |
BBDECL int BBCALL | xEntityRed (Entity *entity) |
Returns red value of entitys color. | |
BBDECL float BBCALL | xEntityRoll (Entity *entity, bool isGlobal=false) |
Returns the roll angle of an entity. | |
BBDECL float BBCALL | xEntityScaleX (Entity *entity) |
Returns x-axis scale of entity. | |
BBDECL float BBCALL | xEntityScaleY (Entity *entity) |
Returns y-axis scale of entity. | |
BBDECL float BBCALL | xEntityScaleZ (Entity *entity) |
Returns z-axis scale of entity. | |
BBDECL int BBCALL | xEntityVisible (Entity *entity, Entity *destination) |
Returns true if entities can see each other. | |
BBDECL float BBCALL | xEntityX (Entity *entity, bool isGlobal=false) |
Returns x-coordinate of the entity. | |
BBDECL float BBCALL | xEntityY (Entity *entity, bool isGlobal=false) |
Returns y-coordinate of the entity. | |
BBDECL float BBCALL | xEntityYaw (Entity *entity, bool isGlobal=false) |
Returns the yaw angle of an entity. | |
BBDECL float BBCALL | xEntityZ (Entity *entity, bool isGlobal=false) |
Returns z-coordinate of the entity. | |
BBDECL Entity *BBCALL | xFindChild (Entity *entity, const char *name) |
Returns the first child of the specified entity with matching name. | |
BBDECL int BBCALL | xGetAlphaFunc (Entity *entity) |
Returns an entity's alpha testing function. | |
BBDECL int BBCALL | xGetAlphaRef (Entity *entity) |
Returns an entity's alpha testing reference. | |
BBDECL Entity *BBCALL | xGetChild (Entity *entity, int index) |
Returns a child of an entity. | |
BBDECL float BBCALL | xGetEntityAlpha (Entity *entity) |
Returns an entity's alpha value. | |
BBDECL int BBCALL | xGetEntityBlend (Entity *entity) |
Returns entitys blend mode. | |
BBDECL Brush *BBCALL | xGetEntityBrush (Entity *entity) |
Returns an entity's brush. | |
BBDECL int BBCALL | xGetEntityFX (Entity *entity) |
Returns entitys FX flags. | |
BBDECL D3DXMATRIX *BBCALL | xGetEntityMatrix (Entity *entity) |
Returns a pointer entity's world matrix. | |
BBDECL float BBCALL | xGetEntityShininess (Entity *entity) |
Returns entitys shininess value. | |
BBDECL int BBCALL | xGetEntityType (Entity *entity) |
Returns entity collision type. | |
BBDECL float BBCALL | xGetMatElement (Entity *entity, int row, int col) |
Returns the value of an element from within an entity's world matrix. | |
BBDECL Entity *BBCALL | xGetParent (Entity *entity) |
Returns a parent of an entity. | |
BBDECL Entity *BBCALL | xLinePick (float x, float y, float z, float dx, float dy, float dz, float distance=0.0f) |
Returns the first entity between x, y, z to dx, dy, dz. |
BBDECL int BBCALL xGetEntityType | ( | Entity * | entity | ) |
Returns entity collision type.
entity | Entity handle |
BBDECL Entity* BBCALL xGetParent | ( | Entity * | entity | ) |
Returns a parent of an entity.
entity | Entity handle |
BBDECL float BBCALL xEntityDistance | ( | Entity * | entity1, |
Entity * | entity2 | ||
) |
Returns the distance between two entities.
entity1 | First entity handle |
entity2 | Second entity handle |
BBDECL float BBCALL xGetMatElement | ( | Entity * | entity, |
int | row, | ||
int | col | ||
) |
Returns the value of an element from within an entity's world matrix.
entity | Entity handle |
row | Matrix row index |
col | Matrix cell index |
BBDECL const char* BBCALL xEntityClass | ( | Entity * | entity | ) |
Returns a string containing the class of the given entity.
entity | Entity handle |
BBDECL Brush* BBCALL xGetEntityBrush | ( | Entity * | entity | ) |
Returns an entity's brush.
Remember, xGetSurfaceBrush() actually creates a new brush so don't forget to free it afterwards using xFreeBrush() to prevent memory leaks. Once you have got the brush handle from a surface, you can use xGetBrushTexture() and xTextureName() to get the details of what texture(s) are applied to the brush.
entity | Entity handle |
BBDECL float BBCALL xEntityX | ( | Entity * | entity, |
bool | isGlobal = false |
||
) |
Returns x-coordinate of the entity.
If the 'isGlobal' flag is set to ffalse then the parent's local coordinate system is used. NOTE: If the entity has no parent then local and global coordinates are the same. In this case you can think of the 3d world as the parent. Global coordinates refer to the 3d world. Xors3D uses a left-handed system:
X+ is to the right
Y+ is up
Z+ is forward (into the screen)
Every entity also has its own ;ocal coordinate system. The global system never changes. But the local system is carried along as an entity moves and turns.
entity | Entity handle |
isGlobal | True for global coordinates, false for local |
BBDECL float BBCALL xEntityY | ( | Entity * | entity, |
bool | isGlobal = false |
||
) |
Returns y-coordinate of the entity.
If the 'isGlobal' flag is set to ffalse then the parent's local coordinate system is used. NOTE: If the entity has no parent then local and global coordinates are the same. In this case you can think of the 3d world as the parent. Global coordinates refer to the 3d world. Xors3D uses a left-handed system:
X+ is to the right
Y+ is up
Z+ is forward (into the screen)
Every entity also has its own ;ocal coordinate system. The global system never changes. But the local system is carried along as an entity moves and turns.
entity | Entity handle |
isGlobal | True for global coordinates, false for local |
BBDECL float BBCALL xEntityZ | ( | Entity * | entity, |
bool | isGlobal = false |
||
) |
Returns z-coordinate of the entity.
If the 'isGlobal' flag is set to ffalse then the parent's local coordinate system is used. NOTE: If the entity has no parent then local and global coordinates are the same. In this case you can think of the 3d world as the parent. Global coordinates refer to the 3d world. Xors3D uses a left-handed system:
X+ is to the right
Y+ is up
Z+ is forward (into the screen)
Every entity also has its own ;ocal coordinate system. The global system never changes. But the local system is carried along as an entity moves and turns.
entity | Entity handle |
isGlobal | True for global coordinates, false for local |
BBDECL int BBCALL xEntityVisible | ( | Entity * | entity, |
Entity * | destination | ||
) |
Returns true if entities can see each other.
entity | Source entity handle |
destination | Destination entity handle |
BBDECL float BBCALL xEntityScaleX | ( | Entity * | entity | ) |
BBDECL float BBCALL xEntityScaleY | ( | Entity * | entity | ) |
BBDECL float BBCALL xEntityScaleZ | ( | Entity * | entity | ) |
BBDECL float BBCALL xEntityRoll | ( | Entity * | entity, |
bool | isGlobal = false |
||
) |
Returns the roll angle of an entity.
entity | Entity handle |
isGlobal | True if the roll angle returned should be relative to 0 rather than a parent entity's roll angle |
BBDECL float BBCALL xEntityYaw | ( | Entity * | entity, |
bool | isGlobal = false |
||
) |
Returns the yaw angle of an entity.
entity | Entity handle |
isGlobal | True if the yaw angle returned should be relative to 0 rather than a parent entity's yaw angle |
BBDECL float BBCALL xEntityPitch | ( | Entity * | entity, |
bool | isGlobal = false |
||
) |
Returns the pitch angle of an entity.
entity | Entity handle |
isGlobal | True if the pitch angle returned should be relative to 0 rather than a parent entity's pitch angle |
BBDECL const char* BBCALL xEntityName | ( | Entity * | entity | ) |
Returns the name of an entity. An entity's name may be set in a modelling program, or manually set using xNameEntity()
entity | Entity handle |
BBDECL int BBCALL xCountChildren | ( | Entity * | entity | ) |
Returns the number of children of an entity.
entity | Entity handle |
BBDECL Entity* BBCALL xGetChild | ( | Entity * | entity, |
int | index | ||
) |
Returns a child of an entity.
entity | Entity handle |
index | Index of child entity. Should be in the range [0; xCountChildren(entity) - 1] |
BBDECL Entity* BBCALL xFindChild | ( | Entity * | entity, |
const char * | name | ||
) |
Returns the first child of the specified entity with matching name.
entity | Entity handle |
name | Child name to find within entity |
BBDECL D3DXMATRIX* BBCALL xGetEntityMatrix | ( | Entity * | entity | ) |
Returns a pointer entity's world matrix.
entity | Entity handle |
BBDECL float BBCALL xGetEntityAlpha | ( | Entity * | entity | ) |
Returns an entity's alpha value.
entity | Entity handle |
BBDECL int BBCALL xGetAlphaRef | ( | Entity * | entity | ) |
Returns an entity's alpha testing reference.
entity | Entity handle |
BBDECL int BBCALL xGetAlphaFunc | ( | Entity * | entity | ) |
Returns an entity's alpha testing function.
entity | Entity handle |
BBDECL int BBCALL xEntityRed | ( | Entity * | entity | ) |
Returns red value of entitys color.
entity | Entity handle |
BBDECL int BBCALL xEntityGreen | ( | Entity * | entity | ) |
Returns green value of entitys color.
entity | Entity handle |
BBDECL int BBCALL xEntityBlue | ( | Entity * | entity | ) |
Returns blue value of entitys color.
entity | Entity handle |
BBDECL float BBCALL xGetEntityShininess | ( | Entity * | entity | ) |
Returns entitys shininess value.
entity | Entity handle |
BBDECL int BBCALL xGetEntityBlend | ( | Entity * | entity | ) |
Returns entitys blend mode.
entity | Entity handle |
BBDECL int BBCALL xGetEntityFX | ( | Entity * | entity | ) |
Returns entitys FX flags.
entity | Entity handle |
BBDECL int BBCALL xEntityHidden | ( | Entity * | entity | ) |
Returns true if entity was hidden by the xHideEntity() function and false otherwise.
entity | Entity handle |
BBDECL int BBCALL xEntitiesBBIntersect | ( | Entity * | entity1, |
Entity * | entity2 | ||
) |
Returns true if the specified meshes bounding boxes are currently intersecting.
entity1 | First entity handle |
entity2 | Second entity handle |
BBDECL Entity* BBCALL xLinePick | ( | float | x, |
float | y, | ||
float | z, | ||
float | dx, | ||
float | dy, | ||
float | dz, | ||
float | distance = 0.0f |
||
) |
Returns the first entity between x, y, z to dx, dy, dz.
x | x coordinate of start of line pick |
y | y coordinate of start of line pick |
z | z coordinate of start of line pick |
dx | x coordinate of end of line pick |
dy | y coordinate of end of line pick |
dz | z coordinate of end of line pick |
distance | Radius of line pick |
BBDECL Entity* BBCALL xEntityPick | ( | Entity * | entity, |
float | range = 0.0f |
||
) |
Returns the nearest entity 'ahead' of the specified entity.
An entity must have a non-zero xEntityPickMode() to be pickable.
entity | Entity handle |
range | Range of pick area around entity |
BBDECL float BBCALL xDeltaPitch | ( | Entity * | entity1, |
Entity * | entity2 | ||
) |
Returns the pitch angle, that first entity should be rotated by in order to face second.
This command can be used to be point one entity at another, rotating on the x axis only
entity1 | First entity handle |
entity2 | Second entity handle |
BBDECL float BBCALL xDeltaYaw | ( | Entity * | entity1, |
Entity * | entity2 | ||
) |
Returns the yaw angle, that first entity should be rotated by in order to face second.
This command can be used to be point one entity at another, rotating on the y axis only
entity1 | First entity handle |
entity2 | Second entity handle |