100 FORCE_NOCOLOR = 1 << 8,
101 FORCE_NONORMALS = 1 << 9,
102 FORCE_NOTEXTURES = 1 << 10
105 typedef unsigned int ObjectOptions;
110 addGroup(
"DefaultGroup");
155#ifdef ENABLE_BSPLINECURVE_SUPPORT
158 unsigned int numCurves() {
return curvesMap_.size(); }
160 void setCurveGroupId(
const unsigned int _count,
const int _id);
162 int getCurveGroupId(
const unsigned int _count);
164 void setCurveParentId(
const int _curveGroup,
const int _parentGroup);
166 int getCurveParentId(
const int _curveGroup);
169#ifdef ENABLE_BSPLINECURVE_SUPPORT
172 unsigned int numSurfaces() {
return surfacesMap_.size(); }
174 void setSurfaceGroupId(
const unsigned int _count,
const int _id);
176 int getSurfaceGroupId(
const unsigned int _count);
178 void setSurfaceParentId(
const int _surfaceGroup,
const int _parentGroup);
180 int getSurfaceParentId(
const int _surfaceGroup);
190 void setNormal(
int _index,
int _normalID);
193 void addFace(
const VHandles& _indices);
196 void addFace(
const VHandles& _indices,
const std::vector<int>& _face_texcoords);
199 bool addFace(
const VHandles& _indices,
OpenMesh::FaceHandle &_outFH, std::vector< TriMesh::VertexHandle > &_outTriVertices, std::vector< PolyMesh::VertexHandle > &_outPolyVertices);
207 bool hasTexture(
int _objectID);
208 bool hasTextureCoords(
int _objectID);
209 bool isTriangleMesh(
int _objectID);
210 bool isPolyMesh(
int _objectID);
211 bool isCurve(
int _objectID);
212 bool isSurface(
int _objectID);
213 bool isNone(
int _objectID);
219 void setOption( ObjectOptionsE _option,
int _groupId);
223 unsigned int n_normals();
224 unsigned int n_texCoords();
244 const std::vector<std::string>
usedMaterials(
unsigned int _objectID);
245 void useMaterial( std::string _materialName );
252 void setPath(QString _path);
262 bool hasOption(
unsigned int _id, ObjectOptions _option );
268 int addGroup(
const QString& _groupName);
269 int groupId(
const QString& _groupName)
const;
270 unsigned int numGroups()
const {
return groupNames_.size(); }
271 const QString groupName(
const int _grpId)
const;
272 void setGroupName(
const int _grp,
const QString& _name);
274 void setCurrentGroup(
const int _current);
284 bool vertexListIsManifold(
const std::vector<PolyMesh::VertexHandle>& _vertices)
const;
287 std::vector< Vec3d > vertices_;
288 std::vector< Vec3d > normals_;
289 std::vector< Vec2f > texCoords_;
292 std::map<TriMesh::VertexHandle,TriMesh::Normal> storedTriHENormals_;
293 std::map<TriMesh::VertexHandle,PolyMesh::Normal> storedPolyHENormals_;
298 MaterialList materials_;
302 std::vector<QString> groupNames_;
306 std::vector<std::map< int, PolyMesh::VertexHandle > > vertexMapPoly_;
311 std::vector<std::map< int, TriMesh::VertexHandle > > vertexMapTri_;
313 std::vector<std::vector< TriMesh::FaceHandle > > addedFacesTri_;
318 std::vector<TriMeshObject*> triMeshes_;
319 std::vector<PolyMeshObject*> polyMeshes_;
320#ifdef ENABLE_BSPLINECURVE_SUPPORT
321 std::vector<BSplineCurveObject*> bSplineCurves_;
323#ifdef ENABLE_BSPLINESURFACE_SUPPORT
324 std::vector<BSplineSurfaceObject*> bSplineSurfaces_;
327 std::vector< ObjectOptions > objectOptions_;
330 std::vector< std::vector< std::string > > usedMaterials_;
334 std::vector< std::map< int, VertexHandle > > usedVertices_;
338 std::vector< std::vector< OMVHandles > > invalidFaces_;
340#ifdef ENABLE_BSPLINECURVE_SUPPORT
342 std::map<unsigned int, int> curvesMap_;
344 std::map<int, int> curveParentGroupMap_;
347#ifdef ENABLE_BSPLINESURFACE_SUPPORT
349 std::map<unsigned int, int> surfacesMap_;
351 std::map<int, int> surfaceParentGroupMap_;