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);
122 template<
class Mesh,
class Mod>
132 bool is_vertex_selected(
134 return Mod::is_vertex_selected(mesh, vh);
137 bool is_halfedge_selected(
138 const Mesh &mesh,
typename Mesh::HalfedgeHandle heh) {
139 return Mod::is_halfedge_selected(mesh, heh);
142 bool is_edge_selected(
const Mesh &mesh,
typename Mesh::EdgeHandle eh) {
143 return Mod::is_edge_selected(mesh, eh);
146 bool is_face_selected(
const Mesh &mesh,
typename Mesh::FaceHandle fh) {
147 return Mod::is_face_selected(mesh, fh);
151 template<
class Mesh,
class Mod>
174 bool is_vertex_selected(
177 return modInstance->is_vertex_selected(mesh, vh);
180 bool is_halfedge_selected(
181 const Mesh &mesh,
typename Mesh::HalfedgeHandle heh) {
183 return modInstance->is_halfedge_selected(mesh, heh);
186 bool is_edge_selected(
const Mesh &mesh,
typename Mesh::EdgeHandle eh) {
188 return modInstance->is_edge_selected(mesh, eh);
191 bool is_face_selected(
const Mesh &mesh,
typename Mesh::FaceHandle fh) {
193 return modInstance->is_face_selected(mesh, fh);
206 template <
class Mesh,
class Mod>
208 public StatusNodeBaseT<Mesh, Mod, ::StatusNodes_ModTraits<Mod>::StaticUsage>,
218 const std::string& _name =
"<StatusNode>" );
223 ACG_CLASSNAME(StatusNode);
228 void updateGeometry();
232 void updateTopology();
236 void updateSelection();
257 void boundingBox(
Vec3d& _bbMin,
Vec3d& _bbMax)
override;
273 typedef typename Mesh::FaceHandle FaceHandle;
274 typedef typename Mesh::HalfedgeHandle HalfedgeHandle;
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_;
323 template <
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,
333 typename Mesh::EdgeHandle _eh)
335 return _mesh.status(_eh).is_bit_set(Bit);
338 static bool is_halfedge_selected(
const Mesh& _mesh,
339 typename Mesh::HalfedgeHandle _heh)
341 return _mesh.status(_heh).is_bit_set(Bit);
344 static bool is_face_selected(
const Mesh& _mesh,
345 typename Mesh::FaceHandle _fh)
347 return _mesh.status(_fh).is_bit_set(Bit);
356 template <
class Mesh>
358 :
public StatusModT<Mesh, OpenMesh::Attributes::SELECTED>
368 template <
class Mesh>
370 :
virtual public StatusNodeT<Mesh, SelectionModT<Mesh> >
381 const std::string& _name =
"<SelectionNode>" )
390 template <
class Mesh>
392 :
public StatusModT<Mesh, OpenMesh::Attributes::LOCKED>
396 template <
class Mesh>
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" 418 #endif // ACG_STATUS_NODES_HH defined Kernel::Edge Edge
Edge type.
Kernel::Normal Normal
Normal type.
Kernel::Vertex Vertex
Vertex type.
Namespace providing different geometric functions concerning angles.
bool invalidGeometry_
State variables.
Kernel::Point Point
Coordinate type.
Class to define the vertex input layout.
The StatusNodesBase class extends StatusNodesT with a halfEdge vbo for coreProfile rendering support...
Kernel::Face Face
Face type.
PickTarget
What target to use for picking.
virtual ~StatusNodeT()
destructor
SelectionNodeT(const Mesh &_mesh, BaseNode *_parent=0, const std::string &_name="<SelectionNode>")
Constructor.
void provideModInstance(Mod *mod)
ACG::SceneGraph::MaterialNode MaterialNode
Materialnode.
Kernel::Halfedge Halfedge
Halfedge type.
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.