ArcGIS Procedural Runtime
3.2.10650
|
#include <Mesh.h>
Public Member Functions | |
const BoundingBox & | getBoundingBox () const |
uint32_t | getFaceCount () const |
int32_t | getFaceEncirclingFace (uint32_t faceId) const |
uint32_t | getFaceHolesCount (uint32_t faceId) const |
const IndexVector & | getFaceHolesCounts () const |
const uint32_t * | getFaceHolesIndices (uint32_t faceId) const |
uint32_t | getFaceMaterialIndex (uint32_t faceId) const |
const IndexVector & | getFaceMaterialIndices () const |
uint32_t | getFaceTextureRegionIndex (uint32_t faceId, uint32_t uvSet) const |
const IndexVector & | getFaceTextureRegionIndices (uint32_t uvSet) const |
uint32_t | getFaceUVCount (uint32_t faceId, uint32_t uvSet) const |
const IndexVector & | getFaceUVCounts (uint32_t uvSet) const |
const uint32_t * | getFaceUVIndices (uint32_t faceId, uint32_t uvSet) const |
uint32_t | getFaceVertexCount (uint32_t faceId) const |
const IndexVector & | getFaceVertexCounts () const |
const uint32_t * | getFaceVertexIndices (uint32_t faceId) const |
uint32_t | getFaceVertexNormalCount (uint32_t faceId) const |
const IndexVector & | getFaceVertexNormalCounts () const |
const uint32_t * | getFaceVertexNormalIndices (uint32_t faceId) const |
uint32_t | getHolesCount () const |
const MaterialPtrVector & | getMaterials () const |
const std::wstring & | getName () const |
const DoubleVector & | getTextureRegions (uint32_t uvSet) const |
size_t | getUsedMem () const |
const DoubleVector & | getUVCoords (uint32_t uvSet) const |
uint32_t | getUVSetsCount () const |
const DoubleVector & | getVertexCoords () const |
const DoubleVector & | getVertexNormalsCoords () const |
Public Member Functions inherited from prtx::Content | |
Content (const Content &)=delete | |
Content & | operator= (const Content &)=delete |
Read-only description of a polygonal mesh. A Mesh consists of vertex coordinates, normal coordinates, texture coordinates (uv coordinates), materials and polygons (faces). Faces are described as a set of indices into the former.
Faces (polygons) can be textured with an arbitrary number of uv sets and can have normals at their vertices. Each face can have a different Material assigned. Faces with holes are supported. Holes are encoded as faces, and the relationship outer encircling face - inner hole face is encoded on top of that.
Mesh conditions:
const BoundingBox& prtx::Mesh::getBoundingBox | ( | ) | const |
uint32_t prtx::Mesh::getFaceCount | ( | ) | const |
int32_t prtx::Mesh::getFaceEncirclingFace | ( | uint32_t | faceId | ) | const |
Gets the index of the encircling face for a hole.
faceId | Index of face (hole). |
uint32_t prtx::Mesh::getFaceHolesCount | ( | uint32_t | faceId | ) | const |
faceId | Index of face. |
const IndexVector& prtx::Mesh::getFaceHolesCounts | ( | ) | const |
const uint32_t* prtx::Mesh::getFaceHolesIndices | ( | uint32_t | faceId | ) | const |
faceId | Index of face. |
uint32_t prtx::Mesh::getFaceMaterialIndex | ( | uint32_t | faceId | ) | const |
faceId | Index of face. |
const IndexVector& prtx::Mesh::getFaceMaterialIndices | ( | ) | const |
Gets the material indices for all faces.
uint32_t prtx::Mesh::getFaceTextureRegionIndex | ( | uint32_t | faceId, |
uint32_t | uvSet | ||
) | const |
Gets the region index for the selected face and the selected uv set. Region indices point into the region coordinates of that set; i.e. region i has coordinates [i*4, i*4+1, i*4+2, i*4+3]. The region with index 0 is always (0,0,1,1). Actual sub-regions can therefore be identified by indices > 0.
faceId | Index of face. |
uvSet | Index of uv set. |
std::range_error | will be thrown if the uvSet does not exist in this mesh. |
const IndexVector& prtx::Mesh::getFaceTextureRegionIndices | ( | uint32_t | uvSet | ) | const |
Gets the texture region coordinate indices for the selected uv set. Region indices point into the region coordinates of that set; i.e. region i has coordinates [i*4, i*4+1, i*4+2, i*4+3]. The region with index 0 is always (0,0,1,1). Actual sub-regions can therefore be identified by indices > 0.
uvSet | Index of uv set. |
std::range_error | will be thrown if the uvSet does not exist in this mesh. |
uint32_t prtx::Mesh::getFaceUVCount | ( | uint32_t | faceId, |
uint32_t | uvSet | ||
) | const |
A face can optionally have several layers of uv coordinates. The number of uv coordinates for a face and for a specific uv set is either 0 or equal to the number of vertices.
faceId | Index of face. |
uvSet | Index of uv set. |
std::range_error | will be thrown if the uvSet does not exist in this mesh. |
const IndexVector& prtx::Mesh::getFaceUVCounts | ( | uint32_t | uvSet | ) | const |
A face can optionally have several layers of uv coordinates. The number of uv coordinates for a face and for a specific uv set is either 0 or equal to the number of vertices.
uvSet | Index of uv set. |
std::range_error | will be thrown if the uvSet does not exist in this mesh. |
const uint32_t* prtx::Mesh::getFaceUVIndices | ( | uint32_t | faceId, |
uint32_t | uvSet | ||
) | const |
Gets the uv coordinate indices for the selected face and the selected uv set. Uv indices point into the uv coordinates of that set; i.e. uvs i has coordinates [i*2, i*2+1].
faceId | Index of face. |
uvSet | Index of uv set. |
std::range_error | will be thrown if the uvSet does not exist in this Mesh. |
uint32_t prtx::Mesh::getFaceVertexCount | ( | uint32_t | faceId | ) | const |
Gets the number of vertices of the selected face.
faceId | Index of face. |
const IndexVector& prtx::Mesh::getFaceVertexCounts | ( | ) | const |
Gets the number of vertices in each face. Size of the vector is the number of faces.
const uint32_t* prtx::Mesh::getFaceVertexIndices | ( | uint32_t | faceId | ) | const |
Gets the vertex indices for the selected face. Vertex indices point into the vertex coordinates; i.e. vertex i has coordinates [i*3, i*3+1, i*3+2].
faceId | Index of face. |
uint32_t prtx::Mesh::getFaceVertexNormalCount | ( | uint32_t | faceId | ) | const |
A face can optionally have vertex normals. The number of vertex normals for a face is either 0 or equal to the number of vertices.
faceId | Index of face. |
const IndexVector& prtx::Mesh::getFaceVertexNormalCounts | ( | ) | const |
A face can optionally have vertex normals. The number of vertex normals for a face is either 0 or equal to the number of vertices. Gets the number of vertex normals in each face. Size of the vector is the number of faces.
const uint32_t* prtx::Mesh::getFaceVertexNormalIndices | ( | uint32_t | faceId | ) | const |
Gets the vertex normal indices for the selected face. Vertex normal indices point into the vertex normal coordinates; i.e. normal i has coordinates [i*3, i*3+1, i*3+2].
faceId | Index of face. |
uint32_t prtx::Mesh::getHolesCount | ( | ) | const |
const MaterialPtrVector& prtx::Mesh::getMaterials | ( | ) | const |
const std::wstring& prtx::Mesh::getName | ( | ) | const |
const DoubleVector& prtx::Mesh::getTextureRegions | ( | uint32_t | uvSet | ) | const |
Gets all texture regions of a specific uv set as a series of (u_min,v_min,u_max,v_max) quadruples. The region with index 0 is always (0,0,1,1). Actual sub-regions can therefore be identified by indices > 0. Size of the vector is 4 * number of regions.
uvSet | Index of uv set. |
std::range_error | will be thrown if the uvSet does not exist in this mesh. |
size_t prtx::Mesh::getUsedMem | ( | ) | const |
Returns an estimation of the memory allocated by this prtx::Mesh instance (in bytes).
const DoubleVector& prtx::Mesh::getUVCoords | ( | uint32_t | uvSet | ) | const |
Gets all uv coordinates (texture coordinates) of a specific uv set as a series of (u,v) pairs. Size of the vector is 2 * number of uvs.
uvSet | Index of uv set. |
std::range_error | will be thrown if the uvSet does not exist in this mesh. |
uint32_t prtx::Mesh::getUVSetsCount | ( | ) | const |
const DoubleVector& prtx::Mesh::getVertexCoords | ( | ) | const |
Gets all vertex coordinates as a series of (x,y,z) triplets. Size of the vector is 3 * number of vertices.
const DoubleVector& prtx::Mesh::getVertexNormalsCoords | ( | ) | const |
Gets all vertex normal coordinates as a series of (x,y,z) triplets. Size of the vector is 3 * number of normals.