60 #ifndef ACG_LINENODE_HH 61 #define ACG_LINENODE_HH 66 #include <ACG/Scenegraph/MaterialNode.hh> 67 #include "DrawModes.hh" 68 #include <ACG/GL/VertexDeclaration.hh> 97 typedef std::vector<Vec3d> PointVector;
98 typedef PointVector::iterator PointIter;
99 typedef PointVector::const_iterator ConstPointIter;
100 typedef std::vector<ACG::Vec3uc> ColorVector;
101 typedef ColorVector::iterator ColorIter;
102 typedef ColorVector::const_iterator ConstColorIter;
103 typedef std::vector<Color4f> Color4fVector;
104 typedef Color4fVector::iterator Color4fIter;
105 typedef Color4fVector::const_iterator ConstColor4fIter;
115 std::string _name=
"<LineNode>" );
131 void boundingBox(
Vec3d& _bbMin,
Vec3d& _bbMax);
162 void set_color(
const Vec4f& _c);
165 void add_point(
const Vec3d& _v);
168 void add_line(
const Vec3d& _v0,
const Vec3d& _v1);
174 void add_color(
const Color4f _c);
181 return (picking_line_width_ != std::numeric_limits<float>::infinity()) ? picking_line_width_ : line_width();
192 const PointVector&
points()
const {
return points_; }
199 ColorVector&
colors() {
return colors_; }
202 bool&
alwaysOnTop() { updateVBO_ =
true;
return draw_always_on_top; }
204 void updateVBO() { updateVBO_ =
true; };
223 void pick_vertices(
GLState& _state);
224 void pick_edges (
GLState& _state,
unsigned int _offset);
235 Color4fVector colors4f_;
239 bool draw_always_on_top;
250 std::string lineNodeName_;
259 #endif // ACG_LINENODE_HH defined
Class to define the vertex input layout.
bool & alwaysOnTop()
get and set always on top
size_t n_points() const
number of points
void set_picking_line_width(float _width)
set line width used by the picking renderer
float picking_line_width_
void reserve_points(unsigned int _n)
reserve mem for _n points
const PointVector & points() const
return reference to point vector
void reserve_lines(unsigned int _n)
reserve mem for _n lines
PickTarget
What target to use for picking.
ColorVector & colors()
get and set color container
Add colors to mesh item (vertices/faces/edges)
Namespace providing different geometric functions concerning angles.
LineMode
Line mode: draw line segments (every 2 points) or ONE polyline.
void push_back(const Vec3d &_v)
STL conformance.
float picking_line_width() const
get line width used by the picking renderer. Defaults to line_width().