Specialized version of SpatialSort to support smoothing groups This is used in by the 3DS, ASE and LWO loaders.
More...
#include <SGSpatialSort.h>
|
struct | Entry |
| An entry in a spatially sorted position array. More...
|
|
Specialized version of SpatialSort to support smoothing groups This is used in by the 3DS, ASE and LWO loaders.
3DS and ASE share their normal computation code in SmoothingGroups.inl, the LWO loader has its own implementation to handle all details of its file format correctly.
◆ SGSpatialSort() [1/2]
Assimp::SGSpatialSort::SGSpatialSort |
( |
| ) |
|
◆ SGSpatialSort() [2/2]
Assimp::SGSpatialSort::SGSpatialSort |
( |
const std::vector< aiVector3D > & |
vPositions | ) |
|
|
explicit |
Construction from a given face array, handling smoothing groups properly.
◆ ~SGSpatialSort()
Assimp::SGSpatialSort::~SGSpatialSort |
( |
| ) |
|
◆ Add()
void Assimp::SGSpatialSort::Add |
( |
const aiVector3D & |
vPosition, |
|
|
unsigned int |
index, |
|
|
unsigned int |
smoothingGroup |
|
) |
| |
Add a vertex to the spatial sort.
- Parameters
-
vPosition | Vertex position to be added |
index | Index of the vrtex |
smoothingGroup | SmoothingGroup for this vertex |
◆ FindPositions()
void Assimp::SGSpatialSort::FindPositions |
( |
const aiVector3D & |
pPosition, |
|
|
uint32_t |
pSG, |
|
|
float |
pRadius, |
|
|
std::vector< unsigned int > & |
poResults, |
|
|
bool |
exactMatch = false |
|
) |
| const |
Returns an iterator for all positions close to the given position.
- Parameters
-
pPosition | The position to look for vertices. |
pSG | Only included vertices with at least one shared smooth group |
pRadius | Maximal distance from the position a vertex may have to be counted in. |
poResults | The container to store the indices of the found positions. Will be emptied by the call so it may contain anything. |
exactMatch | Specifies whether smoothing groups are bit masks (false) or integral values (true). In the latter case, a vertex cannot belong to more than one smoothing group. |
- Returns
- An iterator to iterate over all vertices in the given area.
◆ Prepare()
void Assimp::SGSpatialSort::Prepare |
( |
| ) |
|
Prepare the spatial sorter for use.
This step runs in O(logn)
◆ mPlaneNormal
Normal of the sorting plane, normalized.
The center is always at (0, 0, 0)
◆ mPositions
std::vector<Entry> Assimp::SGSpatialSort::mPositions |
|
protected |
The documentation for this class was generated from the following file: