54 #ifndef ACG_LINENODE_HH 55 #define ACG_LINENODE_HH 60 #include <ACG/Scenegraph/MaterialNode.hh> 61 #include "DrawModes.hh" 62 #include <ACG/GL/VertexDeclaration.hh> 91 typedef std::vector<Vec3d> PointVector;
92 typedef PointVector::iterator PointIter;
93 typedef PointVector::const_iterator ConstPointIter;
94 typedef std::vector<ACG::Vec3uc> ColorVector;
95 typedef ColorVector::iterator ColorIter;
96 typedef ColorVector::const_iterator ConstColorIter;
97 typedef std::vector<Color4f> Color4fVector;
98 typedef Color4fVector::iterator Color4fIter;
99 typedef Color4fVector::const_iterator ConstColor4fIter;
109 std::string _name=
"<LineNode>" );
125 void boundingBox(
Vec3d& _bbMin,
Vec3d& _bbMax)
override;
158 void set_color(
const Vec4f& _c);
161 void add_point(
const Vec3d& _v);
164 void add_line(
const Vec3d& _v0,
const Vec3d& _v1);
170 void add_color(
const Color4f _c);
177 return (picking_line_width_ != std::numeric_limits<float>::infinity()) ? picking_line_width_ : line_width();
188 const PointVector&
points()
const {
return points_; }
195 ColorVector&
colors() {
return colors_; }
198 bool&
alwaysOnTop() { updateVBO_ =
true;
return draw_always_on_top; }
200 void updateVBO() { updateVBO_ =
true; };
219 void pick_vertices(
GLState& _state);
220 void pick_edges (
GLState& _state,
unsigned int _offset);
221 void pick_edgesCompat (
GLState& _state,
unsigned int _offset);
232 Color4fVector colors4f_;
236 bool draw_always_on_top;
247 std::string lineNodeName_;
256 #endif // ACG_LINENODE_HH defined void push_back(const Vec3d &_v)
STL conformance.
ColorVector & colors()
get and set color container
Namespace providing different geometric functions concerning angles.
size_t n_points() const
number of points
void reserve_points(unsigned int _n)
reserve mem for _n points
const PointVector & points() const
return reference to point vector
Class to define the vertex input layout.
PickTarget
What target to use for picking.
Add colors to mesh item (vertices/faces/edges)
void reserve_lines(unsigned int _n)
reserve mem for _n lines
float picking_line_width_
LineMode
Line mode: draw line segments (every 2 points) or ONE polyline.
bool & alwaysOnTop()
get and set always on top
void set_picking_line_width(float _width)
set line width used by the picking renderer
float picking_line_width() const
get line width used by the picking renderer. Defaults to line_width().