56 #ifndef ACG_POLYLINENODET_HH 57 #define ACG_POLYLINENODET_HH 62 #include <ACG/Scenegraph/BaseNode.hh> 63 #include <ACG/Scenegraph/DrawModes.hh> 64 #include <ACG/GL/VertexDeclaration.hh> 65 #include <ACG/GL/IRenderer.hh> 66 #include <ACG/GL/GLPrimitives.hh> 67 #include <ACG/GL/globjects.hh> 88 template <
class PolyLine>
94 typedef typename PolyLine::Point Point;
199 size_t fillVertexBuffer(
void* _buf,
size_t _bufSize,
bool _addLineStripEndVertex);
203 void pick_vertices (
GLState& _state );
204 void pick_spheres (
GLState& _state );
205 void pick_spheres_screen (
GLState& _state );
206 void pick_edges (
GLState& _state,
unsigned int _offset);
241 void writeVertex(
unsigned int _vertex,
void* _dst);
249 void writeVertexColor(
unsigned int _vertex,
bool _colorSourceVertex,
void* _dst)
const;
283 #if defined(INCLUDE_TEMPLATES) && !defined(ACG_POLYLINENODET_C) 284 #define ACG_POLYLINENODET_TEMPLATES 285 #include "PolyLineNodeT_impl.hh" 288 #endif // ACG_POLYLINENODET_HH defined void update()
Trigger an update of the vbo.
std::vector< unsigned int > selectedVertexIndexBuffer_
Index buffer for selected vertices.
Namespace providing different geometric functions concerning angles.
Class to define the vertex input layout.
void updateVBO()
Trigger an update of the vbo.
void writeVertexColor(unsigned int _vertex, bool _colorSourceVertex, void *_dst) const
Write color for rendering to a buffer.
GeometryBuffer vbo_
VBO used to render the poly line.
int addCustomBuffer(const ACG::VertexElement &_desc, const void *_buffer)
DrawModes::DrawMode availableDrawModes() const
return available draw modes
PolyLine & polyline_
The associated poly line.
void writeVertex(unsigned int _vertex, void *_dst)
Write vertex data for rendering to a buffer.
void setCustomBuffer(int _id, const void *_buffer)
std::map< typename PolyLine::CustomPropertyHandle, int > polylinePropMap_
Map from custom properties in PolyLine to id in customBuffers_.
void boundingBox(Vec3d &_bbMin, Vec3d &_bbMax)
update bounding box
void pick(GLState &_state, PickTarget _target)
picking
void draw(GLState &, const DrawModes::DrawMode &_drawMode)
draw lines and normals
void setupVertexDeclaration(VertexDeclaration *_dst, int _colorSource) const
Create the vertex declaration.
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_SCREEN
This defines a local point spheres draw mode for all polyLine nodes with constant screen size...
GLSphere * sphere_
Sphere for VertexSphere DrawMode.
Description of one vertex element.
std::vector< std::pair< ACG::VertexElement, const void * > > customBuffers_
Custom vertex data for shader based rendering.
~PolyLineNodeT()
Destructor.
std::vector< unsigned int > selectedEdgeIndexBuffer_
Index buffer for selected edges.
PickTarget
What target to use for picking.
size_t fillVertexBuffer(void *_buf, size_t _bufSize, bool _addLineStripEndVertex)
Fill a buffer with vertex data.
bool updateVBO_
Flag to trigger update of vbo.
ACG::VertexDeclaration vertexDecl_
Vertex layout without vertex colors.
PolyLineNodeT(PolyLine &_pl, BaseNode *_parent=0, std::string _name="<PolyLineNode>")
Constructor.
PolyLineNodeT & operator=(const PolyLineNodeT &_rhs)
Assignment operator (not used)
ACG_CLASSNAME(PolyLineNodeT)
static name of this class
DrawModes::DrawMode POINTS_SPHERES
This defines a local point spheres draw mode for all polyLine nodes.
ACG::VertexDeclaration vertexDeclECol_
Vertex layout with edge colors.
ACG::VertexDeclaration vertexDeclVCol_
Vertex layout with vertex colors.