21 #include "prtx/prtx.h" 22 #include "prtx/Types.h" 23 #include "prtx/Material.h" 24 #include "prtx/OpaquePtr.h" 30 # pragma warning(push) 31 # pragma warning (disable : 4231 4251 4275 4660) 43 typedef std::shared_ptr<Mesh>
MeshPtr;
86 const std::wstring& getName()
const;
118 const DoubleVector& getTextureRegions(uint32_t uvSet)
const;
122 uint32_t getUVSetsCount()
const;
131 uint32_t getFaceCount()
const;
142 uint32_t getFaceVertexCount(uint32_t faceId)
const;
149 const uint32_t* getFaceVertexIndices(uint32_t faceId)
const;
154 uint32_t getHolesCount()
const;
163 uint32_t getFaceHolesCount(uint32_t faceId)
const;
168 const uint32_t* getFaceHolesIndices(uint32_t faceId)
const;
179 uint32_t getFaceMaterialIndex(uint32_t faceId)
const;
187 const IndexVector& getFaceVertexNormalCounts()
const;
194 uint32_t getFaceVertexNormalCount(uint32_t faceId)
const;
201 const uint32_t* getFaceVertexNormalIndices(uint32_t faceId)
const;
210 const IndexVector& getFaceUVCounts(uint32_t uvSet)
const;
219 uint32_t getFaceUVCount(uint32_t faceId, uint32_t uvSet)
const;
228 const uint32_t* getFaceUVIndices(uint32_t faceId, uint32_t uvSet)
const;
237 const IndexVector& getFaceTextureRegionIndices(uint32_t uvSet)
const;
247 uint32_t getFaceTextureRegionIndex(uint32_t faceId, uint32_t uvSet)
const;
254 int32_t getFaceEncirclingFace(uint32_t faceId)
const;
259 size_t getUsedMem()
const;
263 Mesh(Payload
const* p);
264 const Payload* mPayload;
307 virtual MeshPtr createShared(std::wstring* warnings = 0)
const;
308 virtual MeshPtr createSharedAndReset(std::wstring* warnings = 0);
318 void resetMaterials();
324 void setName(
const std::wstring& name);
343 uint32_t addVertexCoords(
const double coords[3]);
349 void addVertexCoords(
const double* coords,
size_t count);
361 uint32_t addNormalCoords(
const double coords[3]);
367 void addNormalCoords(
const double* coords,
size_t count);
380 uint32_t addUVCoords(uint32_t uvSet,
const double coords[2]);
387 void addUVCoords(uint32_t uvSet,
const double* coords,
size_t count);
393 void addUVCoords(uint32_t uvSet,
const DoubleVector& coords);
403 uint32_t addTextureRegionCoords(uint32_t uvSet,
const double coords[4]);
412 void addTextureRegionCoords(uint32_t uvSet,
const double* coords,
size_t count);
420 void addTextureRegionCoords(uint32_t uvSet,
const DoubleVector& coords);
432 uint32_t materialIndex,
const IndexVector& normalIndices,
const std::vector<IndexVector>& uvIndices);
449 const uint32_t* vertexIndices,
size_t vertexIndicesCount,
450 const uint32_t* holeFaceIndices,
size_t holeFacesIndicesCount,
451 uint32_t materialIndex,
452 const uint32_t* normalIndices,
size_t normalIndicesCount,
453 const std::vector<const uint32_t*>& uvIndices,
const std::vector<size_t>& uvIndicesCounts);
465 void addFaceVertexIndex(uint32_t faceId, uint32_t index);
471 void addFaceHoleIndex(uint32_t faceId, uint32_t index);
477 void addFaceNormalIndex(uint32_t faceId, uint32_t index);
484 void addFaceUVIndex(uint32_t faceId, uint32_t uvSet, uint32_t i);
491 void setFaceVertexIndices(uint32_t faceId,
const IndexVector& indices);
497 void setFaceNormalIndices(uint32_t faceId,
const IndexVector& indices);
504 void setFaceUVIndices(uint32_t faceId, uint32_t uvSet,
const IndexVector& indices);
511 void setFaceMaterialIndex(uint32_t faceId, uint32_t index);
518 void setFaceTextureRegionIndex(uint32_t faceId, uint32_t uvSet, uint32_t index);
523 bool isEmpty()
const;
528 void checkAndClean(std::wstring* warnings)
const;
530 Mesh::Payload *mPayload;
std::vector< uint32_t > IndexVector
vector of indices
Definition: Mesh.h:38
Definition: BoundingBox.h:38
std::vector< double > DoubleVector
vector of double
Definition: Types.h:32
std::shared_ptr< Material > MaterialPtr
shared Material pointer
Definition: DataBackend.h:45
The Procedural Runtime eXtension namespace. The prtx namespace contains the tools to extend the Proce...
Definition: AnnotationBuilder.h:35
std::vector< MeshPtr > MeshPtrVector
vector of shared Mesh pointers
Definition: DataBackend.h:42
std::vector< MaterialPtr > MaterialPtrVector
vector of shared Material pointers
Definition: DataBackend.h:46
std::shared_ptr< Mesh > MeshPtr
shared Mesh pointer
Definition: DataBackend.h:41