![]() |
Xors3d Engine
|
Functions | |
BBDECL void BBCALL | xClearLine3D (x3DLine *line3d) |
Deletes all the 3d line's nodes. | |
BBDECL x3DLine *BBCALL | xCreateLine3D (float fromX, float fromY, float fromZ, float toX, float toY, float toZ, int red=255, int green=255, int blue=255, int alpha=255, bool useZBuffer=true) |
Creates a 3d line and returns a handle. | |
BBDECL void BBCALL | xDeleteLine3DNode (x3DLine *line3d, int index) |
Deletes a specified 3d line's node. | |
BBDECL int BBCALL | xGetLine3DUseZBuffer (x3DLine *line3d) |
Returns true if Z-buffering is enabled. Returns false otherwise. | |
BBDECL void BBCALL | xLine3DAddNode (x3DLine *line3d, float x, float y, float z, bool isGlobal=false) |
Adds a node to the end of the line. | |
BBDECL int BBCALL | xLine3DAlpha (x3DLine *line3d) |
Returns an alpha value of a 3d line. | |
BBDECL int BBCALL | xLine3DBlue (x3DLine *line3d) |
Returns a blue value of a 3d line's color. | |
BBDECL void BBCALL | xLine3DColor (x3DLine *line3d, int red, int green, int blue, int alpha) |
Sets a new color and alpha of a 3d line. | |
BBDECL int BBCALL | xLine3DGreen (x3DLine *line3d) |
Returns a green value of a 3d line's color. | |
BBDECL void BBCALL | xLine3DNodePosition (x3DLine *line3d, int index, float x, float y, float z, bool isGlobal=false) |
Sets a new position of a node. | |
BBDECL int BBCALL | xLine3DNodesCount (x3DLine *line3d) |
Returns the number of the nodes in a 3d line. | |
BBDECL float BBCALL | xLine3DNodeX (x3DLine *line3d, int index, bool isGlobal=false) |
Returns the X coordinate of a 3d line's node. | |
BBDECL float BBCALL | xLine3DNodeY (x3DLine *line3d, int index, bool isGlobal=false) |
Returns the Y coordinate of a 3d line's node. | |
BBDECL float BBCALL | xLine3DNodeZ (x3DLine *line3d, int index, bool isGlobal=false) |
Returns the Z coordinate of a 3d line's node. | |
BBDECL void BBCALL | xLine3DOrigin (x3DLine *line3d, float x, float y, float z, bool isGlobal=false) |
Sets a new origin of the 3d line. | |
BBDECL float BBCALL | xLine3DOriginX (x3DLine *line3d, bool isGlobal=false) |
Returns the starting X coordinate of a 3d line. | |
BBDECL float BBCALL | xLine3DOriginY (x3DLine *line3d, bool isGlobal=false) |
Returns the starting Y coordinate of a 3d line. | |
BBDECL float BBCALL | xLine3DOriginZ (x3DLine *line3d, bool isGlobal=false) |
Returns the starting Z coordinate of a 3d line. | |
BBDECL int BBCALL | xLine3DRed (x3DLine *line3d) |
Returns a red value of a 3d line's color. | |
BBDECL void BBCALL | xLine3DUseZBuffer (x3DLine *line3d, bool state) |
Changes the use of Z-buffering. |
BBDECL x3DLine* BBCALL xCreateLine3D | ( | float | fromX, |
float | fromY, | ||
float | fromZ, | ||
float | toX, | ||
float | toY, | ||
float | toZ, | ||
int | red = 255 , |
||
int | green = 255 , |
||
int | blue = 255 , |
||
int | alpha = 255 , |
||
bool | useZBuffer = true |
||
) |
Creates a 3d line and returns a handle.
3d line is an Entity. It can be parented.
fromX | Starting X coordinate |
fromY | Starting Y coordinate |
fromZ | Starting Z coordinate |
toX | Ending X coordinate |
toY | Ending Y coordinate |
toZ | Ending Z coordinate |
red | Red value of the color. Default value is 255. |
green | Green value of the color. Default value is 255. |
blue | Blue value of the color. Default value is 255. |
alpha | Alpha value. Default value is 255. |
useZBuffer | True to use Z-buffering. Default value is True. |
BBDECL void BBCALL xLine3DOrigin | ( | x3DLine * | line3d, |
float | x, | ||
float | y, | ||
float | z, | ||
bool | isGlobal = false |
||
) |
Sets a new origin of the 3d line.
line3d | 3D Line handle. |
x | X coordinate. |
y | Y coordinate. |
z | Z coordinate. |
isGlobal | True if the position should be relative to 0, 0, 0. Default value is False. |
BBDECL void BBCALL xLine3DAddNode | ( | x3DLine * | line3d, |
float | x, | ||
float | y, | ||
float | z, | ||
bool | isGlobal = false |
||
) |
Adds a node to the end of the line.
This allows to build a polygonal chain.
line3d | 3d line handle. |
x | X coordinate. |
y | Y coordinate. |
z | Z coordinate. |
isGlobal | True if the position should be relative to 0, 0, 0. Default value is False. |
BBDECL void BBCALL xLine3DColor | ( | x3DLine * | line3d, |
int | red, | ||
int | green, | ||
int | blue, | ||
int | alpha | ||
) |
Sets a new color and alpha of a 3d line.
line3d | 3d line handle. |
red | Red value of the color. |
green | Green value of the color. |
blue | Blue value of the color. |
alpha | Alpha value. |
BBDECL void BBCALL xLine3DUseZBuffer | ( | x3DLine * | line3d, |
bool | state | ||
) |
Changes the use of Z-buffering.
If the use of Z-buffering is disabled the 3d lines will be seen through the entities ignoring the depth.
line3d | 3d line handle. |
state | True to enable Z-buffering. False to disable Z-buffering. |
BBDECL float BBCALL xLine3DOriginX | ( | x3DLine * | line3d, |
bool | isGlobal = false |
||
) |
Returns the starting X coordinate of a 3d line.
line3d | 3d line handle. |
isGlobal | True for global coordinates, false for local ones. Default value is false. |
BBDECL float BBCALL xLine3DOriginY | ( | x3DLine * | line3d, |
bool | isGlobal = false |
||
) |
Returns the starting Y coordinate of a 3d line.
line3d | 3d line handle. |
isGlobal | True for global coordinates, false for local ones. Default value is false. |
BBDECL float BBCALL xLine3DOriginZ | ( | x3DLine * | line3d, |
bool | isGlobal = false |
||
) |
Returns the starting Z coordinate of a 3d line.
line3d | 3d line handle. |
isGlobal | True for global coordinates, false for local ones. Default value is false. |
BBDECL int BBCALL xLine3DNodesCount | ( | x3DLine * | line3d | ) |
Returns the number of the nodes in a 3d line.
At the beginning a 3d line has 1 node.
line3d | 3d line handle. |
BBDECL void BBCALL xLine3DNodePosition | ( | x3DLine * | line3d, |
int | index, | ||
float | x, | ||
float | y, | ||
float | z, | ||
bool | isGlobal = false |
||
) |
Sets a new position of a node.
line3d | 3d line handle. |
index | Index of a node. Should be in range [0; x3DLineNodesCount()-1] |
x | X coordinate. |
y | Y coordinate. |
z | Z coordinate. |
isGlobal | True if the position should be relative to 0, 0, 0. Default value is False. |
BBDECL float BBCALL xLine3DNodeX | ( | x3DLine * | line3d, |
int | index, | ||
bool | isGlobal = false |
||
) |
Returns the X coordinate of a 3d line's node.
line3d | 3d line handle. |
index | Index of a node. Should be in range [0; x3DLineNodesCount()-1] |
isGlobal | True for global coordinates, false for local ones. Default value is false. |
BBDECL float BBCALL xLine3DNodeY | ( | x3DLine * | line3d, |
int | index, | ||
bool | isGlobal = false |
||
) |
Returns the Y coordinate of a 3d line's node.
line3d | 3d line handle. |
index | Index of a node. Should be in range [0; x3DLineNodesCount()-1] |
isGlobal | True for global coordinates, false for local ones. Default value is false. |
BBDECL float BBCALL xLine3DNodeZ | ( | x3DLine * | line3d, |
int | index, | ||
bool | isGlobal = false |
||
) |
Returns the Z coordinate of a 3d line's node.
line3d | 3d line handle. |
index | Index of a node. Should be in range [0; x3DLineNodesCount()-1] |
isGlobal | True for global coordinates, false for local ones. Default value is false. |
BBDECL int BBCALL xLine3DRed | ( | x3DLine * | line3d | ) |
Returns a red value of a 3d line's color.
line3d | 3d line handle. |
BBDECL int BBCALL xLine3DGreen | ( | x3DLine * | line3d | ) |
Returns a green value of a 3d line's color.
line3d | 3d line handle. |
BBDECL int BBCALL xLine3DBlue | ( | x3DLine * | line3d | ) |
Returns a blue value of a 3d line's color.
line3d | 3d line handle. |
BBDECL int BBCALL xLine3DAlpha | ( | x3DLine * | line3d | ) |
Returns an alpha value of a 3d line.
line3d | 3d line handle. |
BBDECL int BBCALL xGetLine3DUseZBuffer | ( | x3DLine * | line3d | ) |
Returns true if Z-buffering is enabled. Returns false otherwise.
If the use of Z-buffering is disabled the 3d lines will be seen through the entities ignoring the depth.
line3d | 3d line handle. |
BBDECL void BBCALL xDeleteLine3DNode | ( | x3DLine * | line3d, |
int | index | ||
) |
Deletes a specified 3d line's node.
line3d | 3d line handle. |
index | Index of a node. Should be in range [0; x3DLineNodesCount()-1] |
BBDECL void BBCALL xClearLine3D | ( | x3DLine * | line3d | ) |
Deletes all the 3d line's nodes.
If you need to delete the line use xFreeEntity()
line3d | 3d line handle. |