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