![]() |
Xors3d Engine
|
Functions | |
| void | xClearLine3D (x3DLine *line3d) |
| Deletes all the 3d line's nodes. | |
| x3DLine * | 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. | |
| void | xDeleteLine3DNode (x3DLine *line3d, int index) |
| Deletes a specified 3d line's node. | |
| int | xGetLine3DUseZBuffer (x3DLine *line3d) |
| Returns true if Z-buffering is enabled. Returns false otherwise. | |
| void | xLine3DAddNode (x3DLine *line3d, float x, float y, float z, bool isGlobal=false) |
| Adds a node to the end of the line. | |
| int | xLine3DAlpha (x3DLine *line3d) |
| Returns an alpha value of a 3d line. | |
| int | xLine3DBlue (x3DLine *line3d) |
| Returns a blue value of a 3d line's color. | |
| void | xLine3DColor (x3DLine *line3d, int red, int green, int blue, int alpha) |
| Sets a new color and alpha of a 3d line. | |
| int | xLine3DGreen (x3DLine *line3d) |
| Returns a green value of a 3d line's color. | |
| void | xLine3DNodePosition (x3DLine *line3d, int index, float x, float y, float z, bool isGlobal=false) |
| Sets a new position of a node. | |
| int | xLine3DNodesCount (x3DLine *line3d) |
| Returns the number of the nodes in a 3d line. | |
| float | xLine3DNodeX (x3DLine *line3d, int index, bool isGlobal=false) |
| Returns the X coordinate of a 3d line's node. | |
| float | xLine3DNodeY (x3DLine *line3d, int index, bool isGlobal=false) |
| Returns the Y coordinate of a 3d line's node. | |
| float | xLine3DNodeZ (x3DLine *line3d, int index, bool isGlobal=false) |
| Returns the Z coordinate of a 3d line's node. | |
| void | xLine3DOrigin (x3DLine *line3d, float x, float y, float z, bool isGlobal=false) |
| Sets a new origin of the 3d line. | |
| float | xLine3DOriginX (x3DLine *line3d, bool isGlobal=false) |
| Returns the starting X coordinate of a 3d line. | |
| float | xLine3DOriginY (x3DLine *line3d, bool isGlobal=false) |
| Returns the starting Y coordinate of a 3d line. | |
| float | xLine3DOriginZ (x3DLine *line3d, bool isGlobal=false) |
| Returns the starting Z coordinate of a 3d line. | |
| int | xLine3DRed (x3DLine *line3d) |
| Returns a red value of a 3d line's color. | |
| void | xLine3DUseZBuffer (x3DLine *line3d, bool state) |
| Changes the use of Z-buffering. | |
| x3DLine* 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. |
| void 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. |
| void 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. |
| void 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. |
| void 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. |
| float 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. |
| float 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. |
| float 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. |
| int 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. |
| void 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. |
| float 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. |
| float 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. |
| float 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. |
| int xLine3DRed | ( | x3DLine * | line3d | ) |
Returns a red value of a 3d line's color.
| line3d | 3d line handle. |
| int xLine3DGreen | ( | x3DLine * | line3d | ) |
Returns a green value of a 3d line's color.
| line3d | 3d line handle. |
| int xLine3DBlue | ( | x3DLine * | line3d | ) |
Returns a blue value of a 3d line's color.
| line3d | 3d line handle. |
| int xLine3DAlpha | ( | x3DLine * | line3d | ) |
Returns an alpha value of a 3d line.
| line3d | 3d line handle. |
| int 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. |
| void 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] |
| void xClearLine3D | ( | x3DLine * | line3d | ) |
Deletes all the 3d line's nodes.
If you need to delete the line use xFreeEntity()
| line3d | 3d line handle. |