59 #ifndef DOXY_IGNORE_THIS
60 #ifndef ACG_MESHNODE_HH
61 #define ACG_MESHNODE_HH
65 #include "BaseNode.hh"
68 #include "../ShaderUtils/GLSLShader.hh"
75 namespace SceneGraph {
93 class MeshNodeDeprecatedT :
public BaseNode
104 MeshNodeDeprecatedT(
const Mesh& _mesh,
106 std::string _name=
"<MeshNode>");
109 virtual ~MeshNodeDeprecatedT();
112 ACG_CLASSNAME(MeshNode);
116 DrawModes::DrawMode availableDrawModes()
const;
118 void boundingBox(
Vec3d& _bbMin,
Vec3d& _bbMax);
120 void draw(GLState& _state,
const DrawModes::DrawMode& _drawMode);
122 void pick(GLState& _state,
PickTarget _target);
126 const Mesh& mesh()
const {
return mesh_; }
130 void update_geometry();
133 virtual void update_topology();
142 void setTextureMap( std::map< int, GLuint>* _map){ textureMap_ = _map; };
149 void set_property_map( std::map< int, std::string>* _map){ propertyMap_ = _map; };
156 void setHalfedgeTextcoordPropertyName( std::string _default_halfedge_textcoord_property )
157 { default_halfedge_textcoord_property_ = _default_halfedge_textcoord_property; };
166 void setIndexPropertyName( std::string _index_property_name) { indexPropertyName_ = _index_property_name; };
172 enum FaceMode { FACE_NORMALS, FACE_COLORS, PER_VERTEX, FACE_NORMALS_COLORS, FACE_HALFEDGE_TEXTURED };
175 void draw_vertices();
177 virtual void draw_faces(FaceMode _mode);
180 void pick_vertices(GLState& _state,
bool _front =
false);
182 void pick_faces(GLState& _state);
184 void pick_edges(GLState& _state,
bool _front =
false);
186 void pick_any(GLState& _state);
189 void update_pick_buffers ();
198 TEXTURE_COORD_1D_ARRAY = 8,
199 TEXTURE_COORD_2D_ARRAY = 16,
200 TEXTURE_COORD_3D_ARRAY = 32
204 void enable_arrays(
unsigned int _arrays);
214 unsigned int enabled_arrays_;
217 unsigned int face_index_buffer_, vertex_buffer_, normal_buffer_;
220 std::vector<unsigned int> indices_;
224 bool vertexBufferInitialized_;
225 bool normalBufferInitialized_;
226 bool faceIndexBufferInitialized_;
229 std::vector< ACG::Vec3f > vertices_;
232 std::vector< ACG::Vec3f > normals_;
235 std::map< int, GLuint>* textureMap_;
238 std::map< int, std::string>* propertyMap_;
241 std::string default_halfedge_textcoord_property_;
244 std::string indexPropertyName_;
253 bool updateFaceList_;
254 bool updateVertexList_;
255 bool updateEdgeList_;
257 unsigned int faceBaseIndex_;
258 unsigned int vertexBaseIndex_;
259 unsigned int edgeBaseIndex_;
260 unsigned int anyBaseIndex_;
263 std::vector< ACG::Vec3f > pickVertexBuf_;
264 std::vector< ACG::Vec4uc > pickColorBuf_;
276 #if defined(INCLUDE_TEMPLATES) && !defined(ACG_MESHNODE_C)
277 #define ACG_MESHNODE_TEMPLATES
278 #include "MeshNodeT.cc"
281 #endif // ACG_MESHNODE_HH defined
282 #endif // DOXY_IGNORE_THIS
Namespace providing different geometric functions concerning angles.
PickTarget
What target to use for picking.
VectorT< double, 3 > Vec3d
DrawMode NONE
not a valid draw mode