62 #ifndef ACG_POLYLINENODET_HH
63 #define ACG_POLYLINENODET_HH
68 #include <ACG/Scenegraph/BaseNode.hh>
69 #include <ACG/Scenegraph/DrawModes.hh>
70 #include <ACG/GL/VertexDeclaration.hh>
71 #include <ACG/GL/IRenderer.hh>
72 #include <ACG/GL/GLPrimitives.hh>
79 namespace SceneGraph {
93 template <
class PolyLine>
99 typedef typename PolyLine::Point Point;
181 void pick_vertices (
GLState& _state );
182 void pick_spheres (
GLState& _state );
183 void pick_spheres_screen (
GLState& _state );
184 void pick_edges (
GLState& _state,
unsigned int _offset);
229 void writeVertex(
unsigned int _vertex,
void* _dst);
237 void writeVertexColor(
unsigned int _vertex,
bool _colorSourceVertex,
void* _dst)
const;
271 #if defined(INCLUDE_TEMPLATES) && !defined(ACG_POLYLINENODET_C)
272 #define ACG_POLYLINENODET_TEMPLATES
273 #include "PolyLineNodeT.cc"
276 #endif // ACG_POLYLINENODET_HH defined
Namespace providing different geometric functions concerning angles.
PickTarget
What target to use for picking.
DrawModes::DrawMode availableDrawModes() const
return available draw modes
bool updateVBO_
Flag to trigger update of vbo.
ACG::VertexDeclaration vertexDecl_
Vertex layout without vertex colors.
void setCustomBuffer(int _id, const void *_buffer)
void updateVBO()
Trigger an update of the vbo.
GLSphere * sphere_
Sphere for VertexSphere DrawMode.
PolyLine & polyline_
The associated poly line.
ACG::VertexDeclaration vertexDeclVCol_
Vertex layout with vertex colors.
int addCustomBuffer(const ACG::VertexElement &_desc, const void *_buffer)
PolyLineNodeT & operator=(const PolyLineNodeT &_rhs)
Assignment operator (not used)
~PolyLineNodeT()
Destructor.
void boundingBox(Vec3d &_bbMin, Vec3d &_bbMax)
update bounding box
void writeVertex(unsigned int _vertex, void *_dst)
Write vertex data for rendering to a buffer.
PolyLineNodeT(PolyLine &_pl, BaseNode *_parent=0, std::string _name="<PolyLineNode>")
Constructor.
std::vector< unsigned int > selectedEdgeIndexBuffer_
Index buffer for selected edges.
std::vector< unsigned int > selectedVertexIndexBuffer_
Index buffer for selected vertices.
Class to define the vertex input layout.
void writeVertexColor(unsigned int _vertex, bool _colorSourceVertex, void *_dst) const
Write color for rendering to a buffer.
std::map< typename PolyLine::CustomPropertyHandle, int > polylinePropMap_
Map from custom properties in PolyLine to id in customBuffers_.
unsigned int vbo_
VBO used to render the poly line.
void pick(GLState &_state, PickTarget _target)
picking
Class to define the vertex input layout.
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.
DrawModes::DrawMode POINTS_SPHERES
This defines a local point spheres draw mode for all polyLine nodes.
Description of one vertex element.
void setupVertexDeclaration(VertexDeclaration *_dst, int _colorSource) const
Create the vertex declaration.
ACG_CLASSNAME(PolyLineNodeT)
static name of this class
void update()
Trigger an update of the vbo.
ACG::VertexDeclaration vertexDeclECol_
Vertex layout with edge colors.
std::vector< std::pair< ACG::VertexElement, const void * > > customBuffers_
Custom vertex data for shader based rendering.
DrawModes::DrawMode POINTS_SPHERES_SCREEN
This defines a local point spheres draw mode for all polyLine nodes with constant screen size...
void draw(GLState &, const DrawModes::DrawMode &_drawMode)
draw lines and normals