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/OpenVolumeMeshHandle.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> 78 template<
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 draw(GLState &_state, const DrawModes::DrawMode &_drawMode) override
draw lines and normals
void pickEdges(GLState &_state, unsigned int _offset)
pick edges
void pickVerticesCompat(GLState &_state)
pick vertices using opengl compatibility profile
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 drawFaces(GLState &_state, const DrawModes::DrawMode &_drawMode)
renders the faces or halffaces of the mesh
void pickCompat(GLState &_state, PickTarget _target)
picking using opengl compatibility profile
void pickCellsCompat(GLState &_state, unsigned int _offset)
pick cells using opengl compatibility profile
Namespace providing different geometric functions concerning angles.
void pick(GLState &_state, PickTarget _target) override
picking
void pickCells(GLState &_state, unsigned int _offset)
pick cells
VolumeMeshNodeT(const VolumeMesh &_mesh, OpenVolumeMesh::StatusAttrib &_statusAttrib, OpenVolumeMesh::ColorAttrib< Vec4f > &_colorAttrib, OpenVolumeMesh::NormalAttrib< VolumeMesh > &_normalAttrib, OpenVolumeMesh::TexCoordAttrib< Vec2f > &_texcoordAttrib, const MaterialNode *_matNode, BaseNode *_parent=0, std::string _name="<VolumeMeshNode>")
Constructor.
This class provides easy access to DrawModes supported by OpenVolumeMesh.
VolumeMeshNodeT & operator=(const VolumeMeshNodeT &_rhs)
Assignment operator (not used)
void getCellRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const Material *_mat)
adds render objects for drawing cells to the given renderer
void pickFacesCompat(GLState &_state, unsigned int _offset)
pick faces using opengl compatibility profile
void getVertexRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const Material *_mat)
adds render objects for drawing vertices to the given renderer
void invalidateAllSelectionBuffers()
invalidates all buffers used for rendering selected primitives
PickTarget
What target to use for picking.
void drawCells(GLState &_state, const DrawModes::DrawMode &_drawMode)
renders the cells of the mesh
void pickFaces(GLState &_state, unsigned int _offset)
pick faces
void update_vertex_normals()
updates vertex normals
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 pickEdgesCompat(GLState &_state, unsigned int _offset)
pick edges using opengl compatibility profile
void pickVertices(GLState &_state)
pick vertices
void invalidateAllDrawBuffers()
invalidates all buffers used for normal rendering
void drawSelection(GLState &_state, const DrawModes::DrawMode &_drawMode)
draw selected primitves
~VolumeMeshNodeT()
Destructor.
DrawModes::DrawMode availableDrawModes() const override
static name of this class
void boundingBox(Vec3d &_bbMin, Vec3d &_bbMax) override
update bounding box
void getRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const Material *_mat) override
Draws the object deferred.
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 invalidateAllPickingBuffers()
invalidates all buffers used for picking
void drawEdges(GLState &_state, const DrawModes::DrawMode &_drawMode)
renders the edges or halfedges of the mesh
void invalidateAllBuffers()
invalidates all buffers
void drawVertices(GLState &_state, const DrawModes::DrawMode &_drawMode)
renders the vertices of the mesh
void update_face_normals()
updates face normals