[ 2666245 ] Remove unused vars
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@357 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
4bbc03332b
commit
84e2c82877
|
@ -109,7 +109,7 @@ void FindInvalidDataProcess::Execute( aiScene* pScene)
|
||||||
|
|
||||||
bool out = false;
|
bool out = false;
|
||||||
std::vector<unsigned int> meshMapping(pScene->mNumMeshes);
|
std::vector<unsigned int> meshMapping(pScene->mNumMeshes);
|
||||||
unsigned int real = 0, realAnimations = 0;
|
unsigned int real = 0;
|
||||||
|
|
||||||
// Process meshes
|
// Process meshes
|
||||||
for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
|
for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
|
||||||
|
|
|
@ -150,8 +150,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
|
||||||
// check whether we can reuse the SpatialSort of a previous step.
|
// check whether we can reuse the SpatialSort of a previous step.
|
||||||
SpatialSort* vertexFinder = NULL;
|
SpatialSort* vertexFinder = NULL;
|
||||||
SpatialSort _vertexFinder;
|
SpatialSort _vertexFinder;
|
||||||
float posEpsilon;
|
float posEpsilon = 1e-5f;
|
||||||
const float epsilon = 1e-5f;
|
|
||||||
if (shared) {
|
if (shared) {
|
||||||
std::vector<std::pair<SpatialSort,float> >* avf;
|
std::vector<std::pair<SpatialSort,float> >* avf;
|
||||||
shared->GetProperty(AI_SPP_SPATIAL_SORT,avf);
|
shared->GetProperty(AI_SPP_SPATIAL_SORT,avf);
|
||||||
|
|
|
@ -308,7 +308,7 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
|
||||||
ai_assert(NULL != root && NULL != real);
|
ai_assert(NULL != root && NULL != real);
|
||||||
|
|
||||||
if (root->animators.empty())return;
|
if (root->animators.empty())return;
|
||||||
const aiMatrix4x4& transform = real->mTransformation;
|
// const aiMatrix4x4& transform = real->mTransformation;
|
||||||
|
|
||||||
unsigned int total = 0;
|
unsigned int total = 0;
|
||||||
for (std::list<Animator>::iterator it = root->animators.begin();
|
for (std::list<Animator>::iterator it = root->animators.begin();
|
||||||
|
@ -409,11 +409,13 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
|
||||||
if (360 == lcm)
|
if (360 == lcm)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if 0
|
||||||
// This can be a division through zero, but we don't care
|
// This can be a division through zero, but we don't care
|
||||||
float f1 = (float)lcm / angles[0];
|
float f1 = (float)lcm / angles[0];
|
||||||
float f2 = (float)lcm / angles[1];
|
float f2 = (float)lcm / angles[1];
|
||||||
float f3 = (float)lcm / angles[2];
|
float f3 = (float)lcm / angles[2];
|
||||||
|
#endif
|
||||||
|
|
||||||
// find out how many time units we'll need for the finest
|
// find out how many time units we'll need for the finest
|
||||||
// track (in seconds) - this defines the number of output
|
// track (in seconds) - this defines the number of output
|
||||||
// keys (fps * seconds)
|
// keys (fps * seconds)
|
||||||
|
@ -425,11 +427,9 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
|
||||||
if (angles[2])
|
if (angles[2])
|
||||||
max = std::max(max, (float)lcm / angles[2]);
|
max = std::max(max, (float)lcm / angles[2]);
|
||||||
|
|
||||||
|
|
||||||
anim->mNumRotationKeys = (unsigned int)(max*fps);
|
anim->mNumRotationKeys = (unsigned int)(max*fps);
|
||||||
anim->mRotationKeys = new aiQuatKey[anim->mNumRotationKeys];
|
anim->mRotationKeys = new aiQuatKey[anim->mNumRotationKeys];
|
||||||
|
|
||||||
|
|
||||||
// begin with a zero angle
|
// begin with a zero angle
|
||||||
aiVector3D angle;
|
aiVector3D angle;
|
||||||
for (unsigned int i = 0; i < anim->mNumRotationKeys;++i)
|
for (unsigned int i = 0; i < anim->mNumRotationKeys;++i)
|
||||||
|
@ -445,16 +445,12 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
|
||||||
}
|
}
|
||||||
|
|
||||||
// This animation is repeated and repeated ...
|
// This animation is repeated and repeated ...
|
||||||
anim->mPostState = aiAnimBehaviour_REPEAT;
|
anim->mPostState = anim->mPreState = aiAnimBehaviour_REPEAT;
|
||||||
anim->mPreState = aiAnimBehaviour_CONSTANT;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Animator::FLY_CIRCLE:
|
case Animator::FLY_CIRCLE:
|
||||||
{
|
{
|
||||||
anim->mPostState = aiAnimBehaviour_REPEAT;
|
|
||||||
anim->mPreState = aiAnimBehaviour_CONSTANT;
|
|
||||||
|
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
// Find out how much time we'll need to perform a
|
// Find out how much time we'll need to perform a
|
||||||
// full circle.
|
// full circle.
|
||||||
|
@ -484,14 +480,15 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
|
||||||
const float t = (float) ( in.speed * key.mTime );
|
const float t = (float) ( in.speed * key.mTime );
|
||||||
key.mValue = in.circleCenter + in.circleRadius * ((vecU*::cos(t)) + (vecV*::sin(t)));
|
key.mValue = in.circleCenter + in.circleRadius * ((vecU*::cos(t)) + (vecV*::sin(t)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This animation is repeated and repeated ...
|
||||||
|
anim->mPostState = anim->mPreState = aiAnimBehaviour_REPEAT;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Animator::FLY_STRAIGHT:
|
case Animator::FLY_STRAIGHT:
|
||||||
{
|
{
|
||||||
anim->mPostState = (in.loop ? aiAnimBehaviour_REPEAT : aiAnimBehaviour_CONSTANT);
|
anim->mPostState = anim->mPreState = (in.loop ? aiAnimBehaviour_REPEAT : aiAnimBehaviour_CONSTANT);
|
||||||
anim->mPreState = aiAnimBehaviour_CONSTANT;
|
|
||||||
|
|
||||||
const double seconds = in.timeForWay / 1000.;
|
const double seconds = in.timeForWay / 1000.;
|
||||||
const double tdelta = 1000. / fps;
|
const double tdelta = 1000. / fps;
|
||||||
|
|
||||||
|
@ -516,9 +513,8 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
|
||||||
|
|
||||||
case Animator::FOLLOW_SPLINE:
|
case Animator::FOLLOW_SPLINE:
|
||||||
{
|
{
|
||||||
anim->mPostState = aiAnimBehaviour_REPEAT;
|
// repeat outside the defined time range
|
||||||
anim->mPreState = aiAnimBehaviour_CONSTANT;
|
anim->mPostState = anim->mPreState = aiAnimBehaviour_REPEAT;
|
||||||
|
|
||||||
const int size = (int)in.splineKeys.size();
|
const int size = (int)in.splineKeys.size();
|
||||||
if (!size)
|
if (!size)
|
||||||
{
|
{
|
||||||
|
@ -663,7 +659,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
|
||||||
unsigned int& defMatIdx)
|
unsigned int& defMatIdx)
|
||||||
{
|
{
|
||||||
unsigned int oldMeshSize = (unsigned int)meshes.size();
|
unsigned int oldMeshSize = (unsigned int)meshes.size();
|
||||||
unsigned int meshTrafoAssign = 0;
|
//unsigned int meshTrafoAssign = 0;
|
||||||
|
|
||||||
// Now determine the type of the node
|
// Now determine the type of the node
|
||||||
switch (root->type)
|
switch (root->type)
|
||||||
|
@ -686,7 +682,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
|
||||||
}
|
}
|
||||||
attach.push_back(AttachmentInfo(scene,rootOut));
|
attach.push_back(AttachmentInfo(scene,rootOut));
|
||||||
|
|
||||||
#if 0
|
#if 0 /* currently unused */
|
||||||
meshTrafoAssign = 1;
|
meshTrafoAssign = 1;
|
||||||
|
|
||||||
// If the root node of the scene is animated - and *this* node
|
// If the root node of the scene is animated - and *this* node
|
||||||
|
@ -695,16 +691,12 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
|
||||||
for (unsigned int i = 0; i < scene->mNumAnimations;++i)
|
for (unsigned int i = 0; i < scene->mNumAnimations;++i)
|
||||||
{
|
{
|
||||||
aiAnimation* anim = scene->mAnimations[i];
|
aiAnimation* anim = scene->mAnimations[i];
|
||||||
for (unsigned int a = 0; a < anim->mNumChannels;++a)
|
for (unsigned int a = 0; a < anim->mNumChannels;++a) {
|
||||||
{
|
if (scene->mRootNode->mName == anim->mChannels[a]->mNodeName) {
|
||||||
if (scene->mRootNode->mName == anim->mChannels[a]->mNodeName)
|
if (root->animators.empty()) {
|
||||||
{
|
|
||||||
if (root->animators.empty())
|
|
||||||
{
|
|
||||||
meshTrafoAssign = 2;
|
meshTrafoAssign = 2;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
meshTrafoAssign = 3;
|
meshTrafoAssign = 3;
|
||||||
aiNode* dummy = new aiNode();
|
aiNode* dummy = new aiNode();
|
||||||
dummy->mName.Set("$CSpaceSeam$");
|
dummy->mName.Set("$CSpaceSeam$");
|
||||||
|
|
|
@ -132,7 +132,6 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
|
||||||
int textMeaning = 0;
|
int textMeaning = 0;
|
||||||
int vertexFormat = 0; // 0 = normal; 1 = 2 tcoords, 2 = tangents
|
int vertexFormat = 0; // 0 = normal; 1 = 2 tcoords, 2 = tangents
|
||||||
bool useColors = false;
|
bool useColors = false;
|
||||||
bool needLightMap = false;
|
|
||||||
|
|
||||||
// Parse the XML file
|
// Parse the XML file
|
||||||
while (reader->read())
|
while (reader->read())
|
||||||
|
|
|
@ -769,7 +769,6 @@ void MD3Importer::InternReadFile( const std::string& pFile,
|
||||||
// Read all surfaces from the file
|
// Read all surfaces from the file
|
||||||
unsigned int iNum = pcHeader->NUM_SURFACES;
|
unsigned int iNum = pcHeader->NUM_SURFACES;
|
||||||
unsigned int iNumMaterials = 0;
|
unsigned int iNumMaterials = 0;
|
||||||
unsigned int iDefaultMatIndex = 0xFFFFFFFF;
|
|
||||||
while (iNum-- > 0) {
|
while (iNum-- > 0) {
|
||||||
|
|
||||||
// Ensure correct endianess
|
// Ensure correct endianess
|
||||||
|
|
|
@ -187,8 +187,6 @@ void SceneCombiner::MergeScenes(aiScene** _dest,std::vector<aiScene*>& src,
|
||||||
if (*_dest)(*_dest)->~aiScene();
|
if (*_dest)(*_dest)->~aiScene();
|
||||||
else *_dest = new aiScene();
|
else *_dest = new aiScene();
|
||||||
|
|
||||||
aiScene* dest = *_dest;
|
|
||||||
|
|
||||||
// Create a dummy scene to serve as master for the others
|
// Create a dummy scene to serve as master for the others
|
||||||
aiScene* master = new aiScene();
|
aiScene* master = new aiScene();
|
||||||
master->mRootNode = new aiNode();
|
master->mRootNode = new aiNode();
|
||||||
|
|
|
@ -77,13 +77,12 @@ SkeletonMeshBuilder::SkeletonMeshBuilder( aiScene* pScene)
|
||||||
void SkeletonMeshBuilder::CreateGeometry( const aiNode* pNode)
|
void SkeletonMeshBuilder::CreateGeometry( const aiNode* pNode)
|
||||||
{
|
{
|
||||||
// add a joint entry for the node.
|
// add a joint entry for the node.
|
||||||
const unsigned int boneIndex = mBones.size();
|
|
||||||
const unsigned int vertexStartIndex = mVertices.size();
|
const unsigned int vertexStartIndex = mVertices.size();
|
||||||
|
|
||||||
// now build the geometry.
|
// now build the geometry.
|
||||||
if( pNode->mNumChildren > 0)
|
if( pNode->mNumChildren > 0)
|
||||||
{
|
{
|
||||||
// If the node has childs, we build little pointers to each of them
|
// If the node has children, we build little pointers to each of them
|
||||||
for( unsigned int a = 0; a < pNode->mNumChildren; a++)
|
for( unsigned int a = 0; a < pNode->mNumChildren; a++)
|
||||||
{
|
{
|
||||||
// find a suitable coordinate system
|
// find a suitable coordinate system
|
||||||
|
|
|
@ -190,7 +190,6 @@ void SortByPTypeProcess::Execute( aiScene* pScene)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bAnyChanges = true;
|
bAnyChanges = true;
|
||||||
const unsigned int first = (unsigned int)outMeshes.size();
|
|
||||||
|
|
||||||
// reuse our current mesh arrays for the submesh
|
// reuse our current mesh arrays for the submesh
|
||||||
// with the largest numer of primitives
|
// with the largest numer of primitives
|
||||||
|
|
Loading…
Reference in New Issue