SG_Line
— Agar-SG
line node
#include <agar/core.h>
#include <agar/sg.h>
The SG_Line
node represents a line segment
or half-line in space. This is useful in feature-based modeling, or as
construction geometry.
SG_Line *
SG_LineNew
(SG_Node
*parent, const char
*name, const M_Line3
*ln);
void
SG_LineWidth
(SG_Line
*line, M_Real
len);
void
SG_LineColor
(SG_Line
*line, M_Color
c);
void
SG_LineStipple
(SG_Line
*line, int factor,
Uint16 pattern);
The
SG_LineNew
()
function creates a new point at the origin of the parent node. If the
ln argument is non-NULL, the line is initialized to
the specified
M_Line(3)
values.
The functions
SG_LineWidth
(),
SG_LineColor
() and
SG_LineStipple
() specify the properties used for
graphically rendering the line.
For the SG_Line
object:
- M_Vector3 n
- Normal vector.
- M_Real len
- Length of line segment.
- M_Real wd
- Width in pixels for rendering.
- M_Color c
- Color for rendering.
- int stFactor
- Stipple factor.
- Uint16 stPat
- Stipple pattern.
The SG_Line
node class first appeared in
Agar 1.6.0.