PolyVox
0.2.1
Open source voxel management library
|
#include <SurfaceMesh.h>
Public Member Functions | |
SurfaceMesh () | |
~SurfaceMesh () | |
const std::vector< uint32_t > & | getIndices (void) const |
uint32_t | getNoOfIndices (void) const |
uint32_t | getNoOfNonUniformTrianges (void) const |
uint32_t | getNoOfUniformTrianges (void) const |
uint32_t | getNoOfVertices (void) const |
std::vector< VertexType > & | getRawVertexData (void) |
const std::vector< VertexType > & | getVertices (void) const |
void | addTriangle (uint32_t index0, uint32_t index1, uint32_t index2) |
void | addTriangleCubic (uint32_t index0, uint32_t index1, uint32_t index2) |
uint32_t | addVertex (const VertexType &vertex) |
void | clear (void) |
bool | isEmpty (void) const |
void | scaleVertices (float amount) |
void | translateVertices (const Vector3DFloat &amount) |
int | noOfDegenerateTris (void) |
This function can help improve the visual appearance of a surface patch by smoothing normals with other nearby normals. | |
void | removeDegenerateTris (void) |
void | removeUnusedVertices (void) |
Public Attributes | |
Region | m_Region |
int32_t | m_iTimeStamp |
int32_t | m_iNoOfLod0Tris |
std::vector< uint32_t > | m_vecTriangleIndices |
std::vector< VertexType > | m_vecVertices |
std::vector< LodRecord > | m_vecLodRecords |
Definition at line 49 of file SurfaceMesh.h.
PolyVox::SurfaceMesh< VertexType >::SurfaceMesh | ( | ) |
Definition at line 27 of file SurfaceMesh.inl.
PolyVox::SurfaceMesh< VertexType >::~SurfaceMesh | ( | ) |
Definition at line 33 of file SurfaceMesh.inl.
void PolyVox::SurfaceMesh< VertexType >::addTriangle | ( | uint32_t | index0, |
uint32_t | index1, | ||
uint32_t | index2 | ||
) |
Definition at line 101 of file SurfaceMesh.inl.
void PolyVox::SurfaceMesh< VertexType >::addTriangleCubic | ( | uint32_t | index0, |
uint32_t | index1, | ||
uint32_t | index2 | ||
) |
Definition at line 114 of file SurfaceMesh.inl.
uint32_t PolyVox::SurfaceMesh< VertexType >::addVertex | ( | const VertexType & | vertex | ) |
Definition at line 127 of file SurfaceMesh.inl.
void PolyVox::SurfaceMesh< VertexType >::clear | ( | void | ) |
Definition at line 134 of file SurfaceMesh.inl.
const std::vector< uint32_t > & PolyVox::SurfaceMesh< VertexType >::getIndices | ( | void | ) | const |
Definition at line 38 of file SurfaceMesh.inl.
uint32_t PolyVox::SurfaceMesh< VertexType >::getNoOfIndices | ( | void | ) | const |
Definition at line 44 of file SurfaceMesh.inl.
uint32_t PolyVox::SurfaceMesh< VertexType >::getNoOfNonUniformTrianges | ( | void | ) | const |
Definition at line 50 of file SurfaceMesh.inl.
uint32_t PolyVox::SurfaceMesh< VertexType >::getNoOfUniformTrianges | ( | void | ) | const |
Definition at line 68 of file SurfaceMesh.inl.
uint32_t PolyVox::SurfaceMesh< VertexType >::getNoOfVertices | ( | void | ) | const |
Definition at line 83 of file SurfaceMesh.inl.
std::vector< VertexType > & PolyVox::SurfaceMesh< VertexType >::getRawVertexData | ( | void | ) |
Definition at line 89 of file SurfaceMesh.inl.
const std::vector< VertexType > & PolyVox::SurfaceMesh< VertexType >::getVertices | ( | void | ) | const |
Definition at line 95 of file SurfaceMesh.inl.
bool PolyVox::SurfaceMesh< VertexType >::isEmpty | ( | void | ) | const |
Definition at line 142 of file SurfaceMesh.inl.
int PolyVox::SurfaceMesh< VertexType >::noOfDegenerateTris | ( | void | ) |
This function can help improve the visual appearance of a surface patch by smoothing normals with other nearby normals.
It iterates over each triangle in the surface patch and determines the sum of its corners normals. For any given vertex, these sums are in turn summed for any triangles which use the vertex. Usually, the resulting normals should be renormalised afterwards. Note: This function can cause lighting discontinuities accross region boundaries.
Definition at line 314 of file SurfaceMesh.inl.
void PolyVox::SurfaceMesh< VertexType >::removeDegenerateTris | ( | void | ) |
Definition at line 335 of file SurfaceMesh.inl.
void PolyVox::SurfaceMesh< VertexType >::removeUnusedVertices | ( | void | ) |
Definition at line 365 of file SurfaceMesh.inl.
void PolyVox::SurfaceMesh< VertexType >::scaleVertices | ( | float | amount | ) |
Definition at line 466 of file SurfaceMesh.inl.
void PolyVox::SurfaceMesh< VertexType >::translateVertices | ( | const Vector3DFloat & | amount | ) |
Definition at line 478 of file SurfaceMesh.inl.
int32_t PolyVox::SurfaceMesh< VertexType >::m_iNoOfLod0Tris |
Definition at line 89 of file SurfaceMesh.h.
int32_t PolyVox::SurfaceMesh< VertexType >::m_iTimeStamp |
Definition at line 87 of file SurfaceMesh.h.
Region PolyVox::SurfaceMesh< VertexType >::m_Region |
Definition at line 85 of file SurfaceMesh.h.
Referenced by PolyVox::extractSubset().
std::vector<LodRecord> PolyVox::SurfaceMesh< VertexType >::m_vecLodRecords |
Definition at line 95 of file SurfaceMesh.h.
Referenced by PolyVox::extractSubset().
std::vector<uint32_t> PolyVox::SurfaceMesh< VertexType >::m_vecTriangleIndices |
Definition at line 92 of file SurfaceMesh.h.
Referenced by PolyVox::extractSubset().
std::vector<VertexType> PolyVox::SurfaceMesh< VertexType >::m_vecVertices |
Definition at line 93 of file SurfaceMesh.h.
Referenced by PolyVox::extractSubset().