class
Line3d (client-side)
Available since version: 0.1.7
This class represents 3d line visible at specific world coordinates.
Constructor
Line3d(float x1, float y1, float z1, float x2, float y2, float z2)
Parameters:
float
x1: the beginning position in the world on the x axis.float
y1: the beginning position in the world on the y axis.float
z1: the beginning position in the world on the z axis.float
x2: the end position in the world on the x axis.float
y2: the end position in the world on the y axis.float
z2: the end position in the world on the z axis.
Properties
bool
visible
Represents the visibility state of the line.
Methods
top
This method will move the line at the end of the render queue.
It will be visible at the top of the screen (other elements will be covered by it).
void top()
setBegin
This method will set the beginning point of the line.
void setBegin(float x, float y, float z)
Parameters:
float
x: the position in the world on the x axis.float
y: the position in the world on the y axis.float
z: the position in the world on the z axis.
setEnd
This method will set the end point of the line.
void setEnd(float x, float y, float z)
Parameters:
float
x: the position in the world on the x axis.float
y: the position in the world on the y axis.float
z: the position in the world on the z axis.
setColor
This method will set the line color.
void setColor(int r, int g, int b)
Parameters:
int
r: the red color component in RGB model.int
g: the green color component in RGB model.int
b: the blue color component in RGB model.
getBegin
This method will get the position of the beginning point of the line.
{ x, y, z } getBegin()
Returns { x, y, z }
:
the beginning position of the line in the world.
getEnd
This method will get the position of the end point of the line.
{ x, y, z } getEnd()
Returns { x, y, z }
:
the end position of the line in the world.
getColor
This method will get the line color.
{r, g, b} getColor()
Returns {r, g, b}
:
the line color.