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> 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 DrawModes::DrawMode availableDrawModes() const
return available draw modes
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.
void draw(GLState &, const DrawModes::DrawMode &_drawMode)
draw lines and normals
void boundingBox(Vec3d &_bbMin, Vec3d &_bbMax)
update bounding box
std::vector< std::pair< ACG::VertexElement, const void * > > customBuffers_
Custom vertex data for shader based rendering.
void setCustomBuffer(int _id, const void *_buffer)
bool updateVBO_
Flag to trigger update of vbo.
PolyLine & polyline_
The associated poly line.
ACG::VertexDeclaration vertexDeclVCol_
Vertex layout with vertex colors.
Class to define the vertex input layout.
unsigned int vbo_
VBO used to render the poly line.
void writeVertex(unsigned int _vertex, void *_dst)
Write vertex data for rendering to a buffer.
DrawModes::DrawMode POINTS_SPHERES_SCREEN
This defines a local point spheres draw mode for all polyLine nodes with constant screen size...
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_.
ACG::VertexDeclaration vertexDecl_
Vertex layout without vertex colors.
PolyLineNodeT & operator=(const PolyLineNodeT &_rhs)
Assignment operator (not used)
PickTarget
What target to use for picking.
ACG_CLASSNAME(PolyLineNodeT)
static name of this class
ACG::VertexDeclaration vertexDeclECol_
Vertex layout with edge colors.
int addCustomBuffer(const ACG::VertexElement &_desc, const void *_buffer)
Description of one vertex element.
void updateVBO()
Trigger an update of the vbo.
GLSphere * sphere_
Sphere for VertexSphere DrawMode.
void pick(GLState &_state, PickTarget _target)
picking
void setupVertexDeclaration(VertexDeclaration *_dst, int _colorSource) const
Create the vertex declaration.
Namespace providing different geometric functions concerning angles.
std::vector< unsigned int > selectedEdgeIndexBuffer_
Index buffer for selected edges.
~PolyLineNodeT()
Destructor.
DrawModes::DrawMode POINTS_SPHERES
This defines a local point spheres draw mode for all polyLine nodes.
std::vector< unsigned int > selectedVertexIndexBuffer_
Index buffer for selected vertices.
PolyLineNodeT(PolyLine &_pl, BaseNode *_parent=0, std::string _name="<PolyLineNode>")
Constructor.
void update()
Trigger an update of the vbo.