50 #ifndef POLYLINE_COLLECTION_NODE_T_HH
51 #define POLYLINE_COLLECTION_NODE_T_HH
56 #include <ACG/Scenegraph/BaseNode.hh>
57 #include <ACG/Scenegraph/DrawModes.hh>
58 #include <ACG/GL/VertexDeclaration.hh>
59 #include <ACG/GL/IRenderer.hh>
60 #include <ACG/GL/GLPrimitives.hh>
79 template <
class PolyLineCollection>
85 typedef typename PolyLineCollection::PolyLine::Point Point;
105 void draw(
GLState& ,
const DrawModes::DrawMode& _drawMode);
121 void resetVBO() {offsets_.clear();}
162 std::vector<std::pair<size_t, size_t> > offsets_;
164 size_t total_vertex_count_;
172 #if defined(INCLUDE_TEMPLATES) && !defined(ACG_POLYLINECOLLECTIONNODET_C)
173 #define ACG_POLYLINECOLLECTIONNODET_TEMPLATES
174 #include "PolyLineCollectionNodeT.cc"
178 #endif // POLYLINE_COLLECTION_NODE_T_HH
void getRenderObjects(ACG::IRenderer *_renderer, ACG::GLState &_state, const ACG::SceneGraph::DrawModes::DrawMode &_drawMode, const ACG::SceneGraph::Material *_mat)
Add the objects to the given renderer.
void pick(GLState &_state, PickTarget _target)
picking
void draw(GLState &, const DrawModes::DrawMode &_drawMode)
draw lines and normals
unsigned int vbo_
VBO used to render the poly line.
void update()
Trigger an update of the vbo.
Namespace providing different geometric functions concerning angles.
Class to define the vertex input layout.
bool updateVBO_
Flag to trigger update of vbo.
void writeVertex(typename PolyLineCollection::PolyLine *_polyline, unsigned int _vertex, void *_dst)
Write vertex data for rendering to a buffer.
ACG::VertexDeclaration vertexDecl_
Buffer organization.
GLSphere * sphere_
Sphere for VertexSphere DrawMode.
void updateVBO()
Trigger an update of the vbo.
PolyLineCollectionNodeT(PolyLineCollection &_pl, BaseNode *_parent=0, std::string _name="<PolyLineCollectionNode>")
Constructor.
virtual ~PolyLineCollectionNodeT()
Destructor.
DrawModes::DrawMode availableDrawModes() const
return available draw modes
PolyLineCollectionNodeT & operator=(const PolyLineCollectionNodeT &_rhs)
Assignment operator (not used)
PolyLineCollection & polyline_collection_
The associated poly line collection.
ACG_CLASSNAME(PolyLineCollectionNodeT)
static name of this class
PickTarget
What target to use for picking.
void boundingBox(Vec3d &_bbMin, Vec3d &_bbMax)
update bounding box