Optimized GenVertexNormal-Step.
Added SharedPostProcessInfo-class to allow pp-steps to interact with each other. Used this new feature for some cross-optimization between the steps: SpatialSort is now solely computed once, not up to three times. 3DS bugfix - orientation was wrong. ASE normal vectors - although they are normally wrong and not orthonormal they are working now. Fix in fast_atof.h - 1.45E45 (major 'E') is handlded correctly now. Improvements on jAssimp, still WIP and not working. Some LightWave bugfixes, still WIP. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@164 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -47,7 +47,22 @@ using namespace Assimp;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructs a spatially sorted representation from the given position array.
|
||||
SpatialSort::SpatialSort( const aiVector3D* pPositions, unsigned int pNumPositions, unsigned int pElementOffset)
|
||||
SpatialSort::SpatialSort( const aiVector3D* pPositions, unsigned int pNumPositions,
|
||||
unsigned int pElementOffset)
|
||||
{
|
||||
Fill(pPositions,pNumPositions,pElementOffset);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Destructor
|
||||
SpatialSort::~SpatialSort()
|
||||
{
|
||||
// nothing to do here, everything destructs automatically
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void SpatialSort::Fill( const aiVector3D* pPositions, unsigned int pNumPositions,
|
||||
unsigned int pElementOffset)
|
||||
{
|
||||
// define the reference plane. We choose some arbitrary vector away from all basic axises
|
||||
// in the hope that no model spreads all its vertices along this plane.
|
||||
@@ -70,13 +85,6 @@ SpatialSort::SpatialSort( const aiVector3D* pPositions, unsigned int pNumPositio
|
||||
std::sort( mPositions.begin(), mPositions.end());
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Destructor
|
||||
SpatialSort::~SpatialSort()
|
||||
{
|
||||
// nothing to do here, everything destructs automatically
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Returns an iterator for all positions close to the given position.
|
||||
void SpatialSort::FindPositions( const aiVector3D& pPosition, float pRadius, std::vector<unsigned int>& poResults) const
|
||||
|
||||
Reference in New Issue
Block a user