54#ifndef ACG_STATUS_NODES_HH
55#define ACG_STATUS_NODES_HH
63#include "MaterialNode.hh"
64#include "DrawModes.hh"
66#include <ACG/GL/VertexDeclaration.hh>
67#include <ACG/GL/IRenderer.hh>
68#include <ACG/GL/DrawMesh.hh>
105 GLuint heVBO_, eIBO_, fIBO_, vIBO_, pIBO_;
107 void updateIBOData(GLuint& bufferName_,
size_t numberOfElements_,
size_t sizeOfElements_,
void* data_);
108 void updateHEVBOPoints(
size_t numberOfElements_,
size_t sizeOfElements_,
void* data_);
113 void createIBO(GLuint& _name);
116 void bindIBO(GLuint& _name);
122template<
class Mesh,
class Mod>
132 bool is_vertex_selected(
134 return Mod::is_vertex_selected(mesh, vh);
137 bool is_halfedge_selected(
139 return Mod::is_halfedge_selected(mesh, heh);
143 return Mod::is_edge_selected(mesh, eh);
147 return Mod::is_face_selected(mesh, fh);
151template<
class Mesh,
class Mod>
174 bool is_vertex_selected(
177 return modInstance->is_vertex_selected(mesh, vh);
180 bool is_halfedge_selected(
183 return modInstance->is_halfedge_selected(mesh, heh);
188 return modInstance->is_edge_selected(mesh, eh);
193 return modInstance->is_face_selected(mesh, fh);
206template <
class Mesh,
class Mod>
208 public StatusNodeBaseT<Mesh, Mod, ::StatusNodes_ModTraits<Mod>::StaticUsage>,
218 const std::string& _name =
"<StatusNode>" );
223 ACG_CLASSNAME(StatusNode);
257 void boundingBox(
Vec3d& _bbMin,
Vec3d& _bbMax)
override;
281 void draw_halfedges();
282 void draw_faces(
bool _per_vertex);
284 Point halfedge_point(
const HalfedgeHandle _heh);
293 std::vector<unsigned int> v_cache_, e_cache_, f_cache_, poly_cache_;
294 std::vector<FaceHandle> fh_cache_;
297 std::vector<Point> he_points_;
298 std::vector<Normal> he_normals_;
307 bool vertexIndexInvalid_;
308 bool halfedgeCacheInvalid_;
309 bool edgeIndexInvalid_;
310 bool faceIndexInvalid_;
323template <
class Mesh,
unsigned int Bit>
326 static bool is_vertex_selected(
const Mesh& _mesh,
329 return _mesh.status(_vh).is_bit_set(Bit);
332 static bool is_edge_selected(
const Mesh& _mesh,
335 return _mesh.status(_eh).is_bit_set(Bit);
338 static bool is_halfedge_selected(
const Mesh& _mesh,
341 return _mesh.status(_heh).is_bit_set(Bit);
344 static bool is_face_selected(
const Mesh& _mesh,
347 return _mesh.status(_fh).is_bit_set(Bit);
358 :
public StatusModT<Mesh, OpenMesh::Attributes::SELECTED>
370 :
virtual public StatusNodeT<Mesh, SelectionModT<Mesh> >
381 const std::string& _name =
"<SelectionNode>" )
392 :
public StatusModT<Mesh, OpenMesh::Attributes::LOCKED>
403 const std::string& _name =
"<LockNode>" )
413#if defined(INCLUDE_TEMPLATES) && !defined(ACG_STATUS_NODES_C)
414#define ACG_STATUS_NODES_TEMPLATES
415#include "StatusNodesT_impl.hh"
ACG::SceneGraph::MaterialNode MaterialNode
Materialnode.
SelectionNodeT(const Mesh &_mesh, BaseNode *_parent=0, const std::string &_name="<SelectionNode>")
Constructor.
void provideModInstance(Mod *mod)
void setDrawMesh(DrawMeshT< Mesh > *_drawmesh)
Set drawmesh.
bool invalidGeometry_
State variables.
void updateTopology()
set topology invalid (updates everything)
StatusNodeT(const Mesh &_mesh, BaseNode *_parent=0, const std::string &_name="<StatusNode>")
constructor
void updateSelection()
set selection invalid (Only selection changed, rest is kept)
void getRenderObjects(IRenderer *_renderer, GLState &_state, const DrawModes::DrawMode &_drawMode, const class Material *_mat) override
support for shader-pipeline
void updateGeometry()
set geometry invalid, topology and selection is kept
virtual ~StatusNodeT()
destructor
The StatusNodesBase class extends StatusNodesT with a halfEdge vbo for coreProfile rendering support.
Class to define the vertex input layout.
Kernel::Vertex Vertex
Vertex type.
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
Kernel::EdgeHandle EdgeHandle
Scalar type.
Kernel::Halfedge Halfedge
Halfedge type.
Kernel::Normal Normal
Normal type.
Kernel::Face Face
Face type.
Kernel::Edge Edge
Edge type.
Kernel::FaceHandle FaceHandle
Scalar type.
Kernel::HalfedgeHandle HalfedgeHandle
Scalar type.
Kernel::Point Point
Coordinate type.
PickTarget
What target to use for picking.
Namespace providing different geometric functions concerning angles.