![]() |
Xors3d Engine
|
Functions | |
int | xCountChildren (Entity *entity) |
Returns the number of children of an entity. | |
float | xDeltaPitch (Entity *entity1, Entity *entity2) |
Returns the pitch angle, that first entity should be rotated by in order to face second. | |
float | xDeltaYaw (Entity *entity1, Entity *entity2) |
Returns the yaw angle, that first entity should be rotated by in order to face second. | |
int | xEntitiesBBIntersect (Entity *entity1, Entity *entity2) |
Returns true if the specified meshes bounding boxes are currently intersecting. | |
int | xEntityBlue (Entity *entity) |
Returns blue value of entitys color. | |
const char * | xEntityClass (Entity *entity) |
Returns a string containing the class of the given entity. | |
float | xEntityDistance (Entity *entity1, Entity *entity2) |
Returns the distance between two entities. | |
int | xEntityGreen (Entity *entity) |
Returns green value of entitys color. | |
int | xEntityHidden (Entity *entity) |
Returns true if entity was hidden by the xHideEntity() function and false otherwise. | |
const char * | 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 * | xEntityPick (Entity *entity, float range=0.0f) |
Returns the nearest entity 'ahead' of the specified entity. | |
float | xEntityPitch (Entity *entity, bool isGlobal=false) |
Returns the pitch angle of an entity. | |
int | xEntityRed (Entity *entity) |
Returns red value of entitys color. | |
float | xEntityRoll (Entity *entity, bool isGlobal=false) |
Returns the roll angle of an entity. | |
float | xEntityScaleX (Entity *entity) |
Returns x-axis scale of entity. | |
float | xEntityScaleY (Entity *entity) |
Returns y-axis scale of entity. | |
float | xEntityScaleZ (Entity *entity) |
Returns z-axis scale of entity. | |
int | xEntityVisible (Entity *entity, Entity *destination) |
Returns true if entities can see each other. | |
float | xEntityX (Entity *entity, bool isGlobal=false) |
Returns x-coordinate of the entity. | |
float | xEntityY (Entity *entity, bool isGlobal=false) |
Returns y-coordinate of the entity. | |
float | xEntityYaw (Entity *entity, bool isGlobal=false) |
Returns the yaw angle of an entity. | |
float | xEntityZ (Entity *entity, bool isGlobal=false) |
Returns z-coordinate of the entity. | |
Entity * | xFindChild (Entity *entity, const char *name) |
Returns the first child of the specified entity with matching name. | |
int | xGetAlphaFunc (Entity *entity) |
Returns an entity's alpha testing function. | |
int | xGetAlphaRef (Entity *entity) |
Returns an entity's alpha testing reference. | |
Entity * | xGetChild (Entity *entity, int index) |
Returns a child of an entity. | |
float | xGetEntityAlpha (Entity *entity) |
Returns an entity's alpha value. | |
int | xGetEntityBlend (Entity *entity) |
Returns entitys blend mode. | |
Brush * | xGetEntityBrush (Entity *entity) |
Returns an entity's brush. | |
int | xGetEntityFX (Entity *entity) |
Returns entitys FX flags. | |
D3DXMATRIX * | xGetEntityMatrix (Entity *entity) |
Returns a pointer entity's world matrix. | |
float | xGetEntityShininess (Entity *entity) |
Returns entitys shininess value. | |
int | xGetEntityType (Entity *entity) |
Returns entity collision type. | |
float | xGetMatElement (Entity *entity, int row, int col) |
Returns the value of an element from within an entity's world matrix. | |
Entity * | xGetParent (Entity *entity) |
Returns a parent of an entity. | |
Entity * | 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. |
int xGetEntityType | ( | Entity * | entity | ) |
Returns entity collision type.
entity | Entity handle |
Entity* xGetParent | ( | Entity * | entity | ) |
Returns a parent of an entity.
entity | Entity handle |
float xEntityDistance | ( | Entity * | entity1, |
Entity * | entity2 | ||
) |
Returns the distance between two entities.
entity1 | First entity handle |
entity2 | Second entity handle |
float 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 |
const char* xEntityClass | ( | Entity * | entity | ) |
Returns a string containing the class of the given entity.
entity | Entity handle |
Brush* 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 |
float 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 |
float 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 |
float 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 |
int xEntityVisible | ( | Entity * | entity, |
Entity * | destination | ||
) |
Returns true if entities can see each other.
entity | Source entity handle |
destination | Destination entity handle |
float xEntityScaleX | ( | Entity * | entity | ) |
float xEntityScaleY | ( | Entity * | entity | ) |
float xEntityScaleZ | ( | Entity * | entity | ) |
float 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 |
float 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 |
float 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 |
const char* 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 |
int xCountChildren | ( | Entity * | entity | ) |
Returns the number of children of an entity.
entity | Entity handle |
Entity* 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] |
Entity* 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 |
D3DXMATRIX* xGetEntityMatrix | ( | Entity * | entity | ) |
Returns a pointer entity's world matrix.
entity | Entity handle |
float xGetEntityAlpha | ( | Entity * | entity | ) |
Returns an entity's alpha value.
entity | Entity handle |
int xGetAlphaRef | ( | Entity * | entity | ) |
Returns an entity's alpha testing reference.
entity | Entity handle |
int xGetAlphaFunc | ( | Entity * | entity | ) |
Returns an entity's alpha testing function.
entity | Entity handle |
int xEntityRed | ( | Entity * | entity | ) |
Returns red value of entitys color.
entity | Entity handle |
int xEntityGreen | ( | Entity * | entity | ) |
Returns green value of entitys color.
entity | Entity handle |
int xEntityBlue | ( | Entity * | entity | ) |
Returns blue value of entitys color.
entity | Entity handle |
float xGetEntityShininess | ( | Entity * | entity | ) |
Returns entitys shininess value.
entity | Entity handle |
int xGetEntityBlend | ( | Entity * | entity | ) |
Returns entitys blend mode.
entity | Entity handle |
int xGetEntityFX | ( | Entity * | entity | ) |
Returns entitys FX flags.
entity | Entity handle |
int xEntityHidden | ( | Entity * | entity | ) |
Returns true if entity was hidden by the xHideEntity() function and false otherwise.
entity | Entity handle |
int xEntitiesBBIntersect | ( | Entity * | entity1, |
Entity * | entity2 | ||
) |
Returns true if the specified meshes bounding boxes are currently intersecting.
entity1 | First entity handle |
entity2 | Second entity handle |
Entity* 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 |
Entity* 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 |
float 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 |
float 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 |