[ 2666245 ] Remove unused vars

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@357 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2009-03-06 12:37:08 +00:00
parent 4bbc03332b
commit 84e2c82877
8 changed files with 20 additions and 35 deletions

View File

@ -109,7 +109,7 @@ void FindInvalidDataProcess::Execute( aiScene* pScene)
bool out = false;
std::vector<unsigned int> meshMapping(pScene->mNumMeshes);
unsigned int real = 0, realAnimations = 0;
unsigned int real = 0;
// Process meshes
for( unsigned int a = 0; a < pScene->mNumMeshes; a++)

View File

@ -150,8 +150,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
// check whether we can reuse the SpatialSort of a previous step.
SpatialSort* vertexFinder = NULL;
SpatialSort _vertexFinder;
float posEpsilon;
const float epsilon = 1e-5f;
float posEpsilon = 1e-5f;
if (shared) {
std::vector<std::pair<SpatialSort,float> >* avf;
shared->GetProperty(AI_SPP_SPATIAL_SORT,avf);

View File

@ -308,7 +308,7 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
ai_assert(NULL != root && NULL != real);
if (root->animators.empty())return;
const aiMatrix4x4& transform = real->mTransformation;
// const aiMatrix4x4& transform = real->mTransformation;
unsigned int total = 0;
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)
break;
#if 0
// This can be a division through zero, but we don't care
float f1 = (float)lcm / angles[0];
float f2 = (float)lcm / angles[1];
float f3 = (float)lcm / angles[2];
#endif
// find out how many time units we'll need for the finest
// track (in seconds) - this defines the number of output
// keys (fps * seconds)
@ -425,11 +427,9 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
if (angles[2])
max = std::max(max, (float)lcm / angles[2]);
anim->mNumRotationKeys = (unsigned int)(max*fps);
anim->mRotationKeys = new aiQuatKey[anim->mNumRotationKeys];
// begin with a zero angle
aiVector3D angle;
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 ...
anim->mPostState = aiAnimBehaviour_REPEAT;
anim->mPreState = aiAnimBehaviour_CONSTANT;
anim->mPostState = anim->mPreState = aiAnimBehaviour_REPEAT;
}
break;
case Animator::FLY_CIRCLE:
{
anim->mPostState = aiAnimBehaviour_REPEAT;
anim->mPreState = aiAnimBehaviour_CONSTANT;
// -----------------------------------------------------
// Find out how much time we'll need to perform a
// full circle.
@ -484,14 +480,15 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
const float t = (float) ( in.speed * key.mTime );
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;
case Animator::FLY_STRAIGHT:
{
anim->mPostState = (in.loop ? aiAnimBehaviour_REPEAT : aiAnimBehaviour_CONSTANT);
anim->mPreState = aiAnimBehaviour_CONSTANT;
anim->mPostState = anim->mPreState = (in.loop ? aiAnimBehaviour_REPEAT : aiAnimBehaviour_CONSTANT);
const double seconds = in.timeForWay / 1000.;
const double tdelta = 1000. / fps;
@ -516,9 +513,8 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
case Animator::FOLLOW_SPLINE:
{
anim->mPostState = aiAnimBehaviour_REPEAT;
anim->mPreState = aiAnimBehaviour_CONSTANT;
// repeat outside the defined time range
anim->mPostState = anim->mPreState = aiAnimBehaviour_REPEAT;
const int size = (int)in.splineKeys.size();
if (!size)
{
@ -663,7 +659,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
unsigned int& defMatIdx)
{
unsigned int oldMeshSize = (unsigned int)meshes.size();
unsigned int meshTrafoAssign = 0;
//unsigned int meshTrafoAssign = 0;
// Now determine the type of the node
switch (root->type)
@ -686,7 +682,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
}
attach.push_back(AttachmentInfo(scene,rootOut));
#if 0
#if 0 /* currently unused */
meshTrafoAssign = 1;
// 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)
{
aiAnimation* anim = scene->mAnimations[i];
for (unsigned int a = 0; a < anim->mNumChannels;++a)
{
if (scene->mRootNode->mName == anim->mChannels[a]->mNodeName)
{
if (root->animators.empty())
{
for (unsigned int a = 0; a < anim->mNumChannels;++a) {
if (scene->mRootNode->mName == anim->mChannels[a]->mNodeName) {
if (root->animators.empty()) {
meshTrafoAssign = 2;
}
else
{
else {
meshTrafoAssign = 3;
aiNode* dummy = new aiNode();
dummy->mName.Set("$CSpaceSeam$");

View File

@ -132,7 +132,6 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
int textMeaning = 0;
int vertexFormat = 0; // 0 = normal; 1 = 2 tcoords, 2 = tangents
bool useColors = false;
bool needLightMap = false;
// Parse the XML file
while (reader->read())

View File

@ -769,7 +769,6 @@ void MD3Importer::InternReadFile( const std::string& pFile,
// Read all surfaces from the file
unsigned int iNum = pcHeader->NUM_SURFACES;
unsigned int iNumMaterials = 0;
unsigned int iDefaultMatIndex = 0xFFFFFFFF;
while (iNum-- > 0) {
// Ensure correct endianess

View File

@ -187,8 +187,6 @@ void SceneCombiner::MergeScenes(aiScene** _dest,std::vector<aiScene*>& src,
if (*_dest)(*_dest)->~aiScene();
else *_dest = new aiScene();
aiScene* dest = *_dest;
// Create a dummy scene to serve as master for the others
aiScene* master = new aiScene();
master->mRootNode = new aiNode();

View File

@ -77,13 +77,12 @@ SkeletonMeshBuilder::SkeletonMeshBuilder( aiScene* pScene)
void SkeletonMeshBuilder::CreateGeometry( const aiNode* pNode)
{
// add a joint entry for the node.
const unsigned int boneIndex = mBones.size();
const unsigned int vertexStartIndex = mVertices.size();
// now build the geometry.
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++)
{
// find a suitable coordinate system

View File

@ -190,7 +190,6 @@ void SortByPTypeProcess::Execute( aiScene* pScene)
continue;
}
bAnyChanges = true;
const unsigned int first = (unsigned int)outMeshes.size();
// reuse our current mesh arrays for the submesh
// with the largest numer of primitives