17 INLINE LineSegs::Point::
24 INLINE LineSegs::Point::
25 Point(
const LVecBase3 &point,
const LColor &color) :
26 _point(point[0], point[1], point[2]),
34 INLINE LineSegs::Point::
35 Point(
const LineSegs::Point ©) :
44 INLINE
void LineSegs::Point::
45 operator = (
const LineSegs::Point ©) {
56 set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a) {
57 _color.set(r, g, b, a);
84 move_to(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
94 draw_to(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
110 return create(gnode, dynamic);
118 INLINE
int LineSegs::
119 get_num_vertices()
const {
120 if (_created_data ==
nullptr) {
123 return _created_data->get_num_rows();
132 set_vertex(
int n, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
GeomNode * create(bool dynamic=false)
Creates a new GeomNode that will render the series of line segments and points described via calls to...
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a=1.0f)
Establishes the color that will be assigned to all vertices created by future calls to move_to() and ...
void set_thickness(PN_stdfloat thick)
Establishes the line thickness or point size in pixels that will be assigned to all lines and points ...
void move_to(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Moves the pen to the given point without drawing a line.
void draw_to(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Draws a line segment from the pen's last position (the last call to move_to or draw_to) to the indica...
void set_vertex(int n, const LVertex &vert)
Moves the nth point or vertex of the line segment sequence generated by the last call to create().
void set_vertex_color(int vertex, const LColor &c)
Changes the vertex color of the nth point or vertex.
A node that holds Geom objects, renderable pieces of geometry.