46#include <ACG/GL/gl.hh>
47#include <ACG/Scenegraph/BaseNode.hh>
48#include <ACG/Scenegraph/MaterialNode.hh>
49#include <ACG/Scenegraph/DrawModes.hh>
50#include <ACG/Geometry/Types/PlaneType.hh>
51#include <OpenVolumeMesh/Core/Handles.hh>
52#include <OpenVolumeMesh/Core/BaseEntities.hh>
53#include <OpenVolumeMesh/Attribs/StatusAttrib.hh>
54#include <OpenVolumeMesh/Attribs/ColorAttrib.hh>
55#include <OpenVolumeMesh/Attribs/NormalAttrib.hh>
56#include <OpenVolumeMesh/Attribs/TexCoordAttrib.hh>
58#include "VolumeMeshBufferManager.hh"
59#include "VolumeMeshDrawModesContainer.hh"
62#include <ACG/GL/RenderObject.hh>
63#include <ACG/GL/VertexDeclaration.hh>
64#include <ACG/GL/IRenderer.hh>
78template<
class VolumeMeshT>
83 typedef VolumeMeshT VolumeMesh;
91 typedef typename VolumeMeshT::PointT Vertex;
106 std::string _name =
"<VolumeMeshNode>");
132 void clear_cut_planes();
135 void add_cut_plane(
const Plane& _p);
139 void set_scaling(
double _scale);
142 double scaling()
const {
return scale_; }
145 void set_boundary_only(
bool _boundary);
146 bool boundary_only()
const {
return boundary_only_; }
149 void set_translucency_factor(
float _factor) { translucency_factor_ = _factor; }
150 float translucency_factor()
const {
return translucency_factor_; }
153 void set_topology_changed(
bool _topology_changed);
156 void set_geometry_changed(
bool _geom_changed);
159 void set_color_changed(
bool _color_changed);
162 void set_texture_changed(
bool _texture_changed);
165 void set_selection_changed(
bool _selection_changed);
233 const VolumeMesh& mesh_;
241 GLfloat translucency_factor_;
278 bool face_normals_calculated_;
279 bool vertex_normals_calculated_;
void boundingBox(Vec3d &_bbMin, Vec3d &_bbMax) override
update bounding box
void pickEdges(GLState &_state, unsigned int _offset)
pick edges
void drawCells(GLState &_state, const DrawModes::DrawMode &_drawMode)
renders the cells of the mesh
void pick(GLState &_state, PickTarget _target) override
picking
VolumeMeshNodeT & operator=(const VolumeMeshNodeT &_rhs)
Assignment operator (not used)
void drawEdges(GLState &_state, const DrawModes::DrawMode &_drawMode)
renders the edges or halfedges of the mesh
void pickCompat(GLState &_state, PickTarget _target)
picking using opengl compatibility profile
void drawSelection(GLState &_state, const DrawModes::DrawMode &_drawMode)
draw selected primitves
void invalidateAllPickingBuffers()
invalidates all buffers used for picking
VolumeMeshNodeT(const VolumeMeshNodeT &_rhs)
Copy constructor (not used)
void getVertexRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const Material *_mat)
adds render objects for drawing vertices to the given renderer
void getEdgeRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const Material *_mat)
adds render objects for drawing edges or halfedges to the given renderer
void update_vertex_normals()
updates vertex normals
void pickVertices(GLState &_state)
pick vertices
void draw(GLState &_state, const DrawModes::DrawMode &_drawMode) override
draw lines and normals
void invalidateAllSelectionBuffers()
invalidates all buffers used for rendering selected primitives
void drawFaces(GLState &_state, const DrawModes::DrawMode &_drawMode)
renders the faces or halffaces of the mesh
void pickEdgesCompat(GLState &_state, unsigned int _offset)
pick edges using opengl compatibility profile
void invalidateAllBuffers()
invalidates all buffers
void getCellRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const Material *_mat)
adds render objects for drawing cells to the given renderer
void getFaceRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const Material *_mat)
adds render objects for drawing faces or halffaces to the given renderer
void drawVertices(GLState &_state, const DrawModes::DrawMode &_drawMode)
renders the vertices of the mesh
DrawModes::DrawMode availableDrawModes() const override
static name of this class
~VolumeMeshNodeT()
Destructor.
void pickCellsCompat(GLState &_state, unsigned int _offset)
pick cells using opengl compatibility profile
void pickCells(GLState &_state, unsigned int _offset)
pick cells
void getRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const Material *_mat) override
Draws the object deferred.
void update_face_normals()
updates face normals
void pickFaces(GLState &_state, unsigned int _offset)
pick faces
void pickFacesCompat(GLState &_state, unsigned int _offset)
pick faces using opengl compatibility profile
void getSelectionRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const Material *_mat)
adds render objects for drawing selected primitves to the given renderer
void invalidateAllDrawBuffers()
invalidates all buffers used for normal rendering
void pickVerticesCompat(GLState &_state)
pick vertices using opengl compatibility profile
This class creates buffers that can be used to render open volume meshs.
This class provides easy access to DrawModes supported by OpenVolumeMesh.
PickTarget
What target to use for picking.
Namespace providing different geometric functions concerning angles.