53 #ifndef DOXY_IGNORE_THIS 54 #ifndef ACG_MESHNODE_HH 55 #define ACG_MESHNODE_HH 59 #include "BaseNode.hh" 62 #include "../ShaderUtils/GLSLShader.hh" 87 class MeshNodeDeprecatedT :
public BaseNode 98 MeshNodeDeprecatedT(
const Mesh& _mesh,
100 std::string _name=
"<MeshNode>");
103 virtual ~MeshNodeDeprecatedT();
106 ACG_CLASSNAME(MeshNode);
110 DrawModes::DrawMode availableDrawModes()
const;
112 void boundingBox(
Vec3d& _bbMin,
Vec3d& _bbMax);
114 void draw(GLState& _state,
const DrawModes::DrawMode& _drawMode);
116 void pick(GLState& _state,
PickTarget _target);
120 const Mesh& mesh()
const {
return mesh_; }
124 void update_geometry();
127 virtual void update_topology();
136 void setTextureMap( std::map< int, GLuint>* _map){ textureMap_ = _map; };
143 void set_property_map( std::map< int, std::string>* _map){ propertyMap_ = _map; };
150 void setHalfedgeTextcoordPropertyName( std::string _default_halfedge_textcoord_property )
151 { default_halfedge_textcoord_property_ = _default_halfedge_textcoord_property; };
160 void setIndexPropertyName( std::string _index_property_name) { indexPropertyName_ = _index_property_name; };
166 enum FaceMode { FACE_NORMALS, FACE_COLORS, PER_VERTEX, FACE_NORMALS_COLORS, FACE_HALFEDGE_TEXTURED };
169 void draw_vertices();
171 virtual void draw_faces(FaceMode _mode);
174 void pick_vertices(GLState& _state,
bool _front =
false);
176 void pick_faces(GLState& _state);
178 void pick_edges(GLState& _state,
bool _front =
false);
180 void pick_any(GLState& _state);
183 void update_pick_buffers ();
192 TEXTURE_COORD_1D_ARRAY = 8,
193 TEXTURE_COORD_2D_ARRAY = 16,
194 TEXTURE_COORD_3D_ARRAY = 32
198 void enable_arrays(
unsigned int _arrays);
208 unsigned int enabled_arrays_;
211 unsigned int face_index_buffer_, vertex_buffer_, normal_buffer_;
214 std::vector<unsigned int> indices_;
218 bool vertexBufferInitialized_;
219 bool normalBufferInitialized_;
220 bool faceIndexBufferInitialized_;
223 std::vector< ACG::Vec3f > vertices_;
226 std::vector< ACG::Vec3f > normals_;
229 std::map< int, GLuint>* textureMap_;
232 std::map< int, std::string>* propertyMap_;
235 std::string default_halfedge_textcoord_property_;
238 std::string indexPropertyName_;
247 bool updateFaceList_;
248 bool updateVertexList_;
249 bool updateEdgeList_;
251 unsigned int faceBaseIndex_;
252 unsigned int vertexBaseIndex_;
253 unsigned int edgeBaseIndex_;
254 unsigned int anyBaseIndex_;
257 std::vector< ACG::Vec3f > pickVertexBuf_;
258 std::vector< ACG::Vec4uc > pickColorBuf_;
270 #if defined(INCLUDE_TEMPLATES) && !defined(ACG_MESHNODE_C) 271 #define ACG_MESHNODE_TEMPLATES 272 #include "MeshNodeT.cc" 275 #endif // ACG_MESHNODE_HH defined 276 #endif // DOXY_IGNORE_THIS Namespace providing different geometric functions concerning angles.
PickTarget
What target to use for picking.
DrawMode NONE
not a valid draw mode
VectorT< double, 3 > Vec3d