3DS bugfixes; ASE bugfix (newline), PLY revert to older version, SMD is working now (partially); homepage added to SVN
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@63 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
|
@ -432,7 +432,7 @@ void Dot3DSImporter::ConvertMeshes(aiScene* pcOut)
|
||||||
// check range
|
// check range
|
||||||
if ((*a) >= this->mScene->mMaterials.size())
|
if ((*a) >= this->mScene->mMaterials.size())
|
||||||
{
|
{
|
||||||
DefaultLogger::get()->error("Face material index is out of range");
|
DefaultLogger::get()->error("3DS face material index is out of range");
|
||||||
|
|
||||||
// use the last material instead
|
// use the last material instead
|
||||||
aiSplit[this->mScene->mMaterials.size()-1].push_back(iNum);
|
aiSplit[this->mScene->mMaterials.size()-1].push_back(iNum);
|
||||||
|
@ -440,7 +440,6 @@ void Dot3DSImporter::ConvertMeshes(aiScene* pcOut)
|
||||||
else aiSplit[*a].push_back(iNum);
|
else aiSplit[*a].push_back(iNum);
|
||||||
}
|
}
|
||||||
// now generate submeshes
|
// now generate submeshes
|
||||||
|
|
||||||
bool bFirst = true;
|
bool bFirst = true;
|
||||||
for (unsigned int p = 0; p < this->mScene->mMaterials.size();++p)
|
for (unsigned int p = 0; p < this->mScene->mMaterials.size();++p)
|
||||||
{
|
{
|
||||||
|
@ -452,19 +451,9 @@ void Dot3DSImporter::ConvertMeshes(aiScene* pcOut)
|
||||||
p_pcOut->mMaterialIndex = p;
|
p_pcOut->mMaterialIndex = p;
|
||||||
|
|
||||||
// use the color data as temporary storage
|
// use the color data as temporary storage
|
||||||
p_pcOut->mColors[0] = (aiColor4D*)new std::string((*i).mName);
|
p_pcOut->mColors[0] = (aiColor4D*)(&*i);
|
||||||
avOutMeshes.push_back(p_pcOut);
|
avOutMeshes.push_back(p_pcOut);
|
||||||
|
|
||||||
// (code for keyframe animation. however, this is currently not supported by Assimp)
|
|
||||||
#if 0
|
|
||||||
if (bFirst)
|
|
||||||
{
|
|
||||||
p_pcOut->mColors[1] = (aiColor4D*)new aiMatrix4x4();
|
|
||||||
*((aiMatrix4x4*)p_pcOut->mColors[1]) = (*i).mMat;
|
|
||||||
bFirst = false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// convert vertices
|
// convert vertices
|
||||||
p_pcOut->mNumVertices = (unsigned int)aiSplit[p].size()*3;
|
p_pcOut->mNumVertices = (unsigned int)aiSplit[p].size()*3;
|
||||||
p_pcOut->mNumFaces = (unsigned int)aiSplit[p].size();
|
p_pcOut->mNumFaces = (unsigned int)aiSplit[p].size();
|
||||||
|
@ -552,87 +541,72 @@ void Dot3DSImporter::ConvertMeshes(aiScene* pcOut)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,Dot3DS::Node* pcIn)
|
void Dot3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,Dot3DS::Node* pcIn)
|
||||||
{
|
{
|
||||||
// find the corresponding mesh indices
|
|
||||||
std::vector<unsigned int> iArray;
|
std::vector<unsigned int> iArray;
|
||||||
|
iArray.reserve(3);
|
||||||
|
|
||||||
if (pcIn->mName != "$$$DUMMY")
|
if (pcIn->mName != "$$$DUMMY")
|
||||||
{
|
{
|
||||||
for (unsigned int a = 0; a < pcSOut->mNumMeshes;++a)
|
for (unsigned int a = 0; a < pcSOut->mNumMeshes;++a)
|
||||||
{
|
{
|
||||||
if (0 == ASSIMP_stricmp(pcIn->mName.c_str(),
|
const Dot3DS::Mesh* pcMesh = (const Dot3DS::Mesh*)pcSOut->mMeshes[a]->mColors[0];
|
||||||
((std::string*)pcSOut->mMeshes[a]->mColors[0])->c_str()))
|
ai_assert(NULL != pcMesh);
|
||||||
|
|
||||||
|
if (0 == ASSIMP_stricmp(pcIn->mName.c_str(),pcMesh->mName.c_str()))
|
||||||
{
|
{
|
||||||
iArray.push_back(a);
|
iArray.push_back(a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (!iArray.empty())
|
||||||
|
{
|
||||||
|
aiMatrix4x4& mTrafo = ((Dot3DS::Mesh*)pcSOut->mMeshes[iArray[0]]->mColors[0])->mMat;
|
||||||
|
aiMatrix4x4 mInv = mTrafo;
|
||||||
|
mInv.Inverse();
|
||||||
|
|
||||||
pcOut->mName.Set(pcIn->mName);
|
pcOut->mName.Set(pcIn->mName);
|
||||||
pcOut->mNumMeshes = (unsigned int)iArray.size();
|
pcOut->mNumMeshes = (unsigned int)iArray.size();
|
||||||
pcOut->mMeshes = new unsigned int[iArray.size()];
|
pcOut->mMeshes = new unsigned int[iArray.size()];
|
||||||
|
|
||||||
for (unsigned int i = 0;i < iArray.size();++i)
|
for (unsigned int i = 0;i < iArray.size();++i)
|
||||||
{
|
{
|
||||||
const unsigned int iIndex = iArray[i];
|
const unsigned int iIndex = iArray[i];
|
||||||
|
aiMesh* const mesh = pcSOut->mMeshes[iIndex];
|
||||||
|
|
||||||
// (code for keyframe animation. however, this is currently not supported by Assimp)
|
// http://www.zfx.info/DisplayThread.php?MID=235690#235690
|
||||||
#if 0
|
const aiVector3D& pivot = pcIn->vPivot;
|
||||||
if (NULL != pcSOut->mMeshes[iIndex]->mColors[1])
|
const aiVector3D* const pvEnd = mesh->mVertices+mesh->mNumVertices;
|
||||||
|
aiVector3D* pvCurrent = mesh->mVertices;
|
||||||
|
|
||||||
|
if(pivot.x || pivot.y || pivot.z)
|
||||||
{
|
{
|
||||||
pcOut->mTransformation = *((aiMatrix4x4*)
|
while (pvCurrent != pvEnd)
|
||||||
(pcSOut->mMeshes[iIndex]->mColors[1]));
|
{
|
||||||
|
*pvCurrent = mInv * (*pvCurrent);
|
||||||
delete (aiMatrix4x4*)pcSOut->mMeshes[iIndex]->mColors[1];
|
pvCurrent->x -= pivot.x;
|
||||||
pcSOut->mMeshes[iIndex]->mColors[1] = NULL;
|
pvCurrent->y -= pivot.y;
|
||||||
|
pvCurrent->z -= pivot.z;
|
||||||
|
*pvCurrent = mTrafo * (*pvCurrent);
|
||||||
|
std::swap( pvCurrent->y, pvCurrent->z );
|
||||||
|
++pvCurrent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (pvCurrent != pvEnd)
|
||||||
|
{
|
||||||
|
std::swap( pvCurrent->y, pvCurrent->z );
|
||||||
|
pvCurrent->y *= -1.0f;
|
||||||
|
++pvCurrent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
pcOut->mMeshes[i] = iIndex;
|
pcOut->mMeshes[i] = iIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
// (code for keyframe animation. however, this is currently not supported by Assimp)
|
|
||||||
#if 0
|
|
||||||
// build the scaling matrix. Toggle y and z axis
|
|
||||||
aiMatrix4x4 mS;
|
|
||||||
mS.a1 = pcIn->vScaling.x;
|
|
||||||
mS.b2 = pcIn->vScaling.z;
|
|
||||||
mS.c3 = pcIn->vScaling.y;
|
|
||||||
|
|
||||||
// build the translation matrix. Toggle y and z axis
|
|
||||||
aiMatrix4x4 mT;
|
|
||||||
mT.a4 = pcIn->vPosition.x;
|
|
||||||
mT.b4 = pcIn->vPosition.z;
|
|
||||||
mT.c4 = pcIn->vPosition.y;
|
|
||||||
|
|
||||||
// build the pivot matrix. Toggle y and z axis
|
|
||||||
aiMatrix4x4 mP;
|
|
||||||
mP.a4 = -pcIn->vPivot.x;
|
|
||||||
mP.b4 = -pcIn->vPivot.z;
|
|
||||||
mP.c4 = -pcIn->vPivot.y;
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// build a matrix to flip the z coordinate of the vertices
|
|
||||||
aiMatrix4x4 mF;
|
|
||||||
mF.c3 = -1.0f;
|
|
||||||
|
|
||||||
|
|
||||||
// build the final matrix
|
|
||||||
// NOTE: This should be the identity. Theoretically. In reality
|
|
||||||
// there are many models with very funny local matrices and
|
|
||||||
// very different keyframe values ... this is the only reason
|
|
||||||
// why we extract the data from the first keyframe.
|
|
||||||
pcOut->mTransformation = mF; /* mF * mT * pcIn->mRotation * mS * mP *
|
|
||||||
pcOut->mTransformation.Inverse(); */
|
|
||||||
|
|
||||||
// (code for keyframe animation. however, this is currently not supported by Assimp)
|
|
||||||
#if 0
|
|
||||||
if (pcOut->mTransformation != mF)
|
|
||||||
{
|
|
||||||
DefaultLogger::get()->warn("The local transformation matrix of the "
|
|
||||||
"3ds file does not match the first keyframe. Using the "
|
|
||||||
"information from the keyframe.");
|
|
||||||
}
|
}
|
||||||
#endif
|
/*else
|
||||||
|
{
|
||||||
|
DefaultLogger::get()->warn("A node that is not a dummy does not "
|
||||||
|
"reference a valid mesh.");
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
pcOut->mTransformation = aiMatrix4x4();
|
||||||
pcOut->mNumChildren = (unsigned int)pcIn->mChildren.size();
|
pcOut->mNumChildren = (unsigned int)pcIn->mChildren.size();
|
||||||
pcOut->mChildren = new aiNode*[pcIn->mChildren.size()];
|
pcOut->mChildren = new aiNode*[pcIn->mChildren.size()];
|
||||||
for (unsigned int i = 0; i < pcIn->mChildren.size();++i)
|
for (unsigned int i = 0; i < pcIn->mChildren.size();++i)
|
||||||
|
@ -697,13 +671,22 @@ void Dot3DSImporter::GenerateNodeGraph(aiScene* pcOut)
|
||||||
else this->AddNodeToGraph(pcOut, pcOut->mRootNode, this->mRootNode);
|
else this->AddNodeToGraph(pcOut, pcOut->mRootNode, this->mRootNode);
|
||||||
|
|
||||||
for (unsigned int a = 0; a < pcOut->mNumMeshes;++a)
|
for (unsigned int a = 0; a < pcOut->mNumMeshes;++a)
|
||||||
{
|
|
||||||
delete (std::string*)pcOut->mMeshes[a]->mColors[0];
|
|
||||||
pcOut->mMeshes[a]->mColors[0] = NULL;
|
pcOut->mMeshes[a]->mColors[0] = NULL;
|
||||||
|
|
||||||
// may be NULL
|
// if the root node has only one child ... set the child as root node
|
||||||
delete (aiMatrix4x4*)pcOut->mMeshes[a]->mColors[1];
|
if (1 == pcOut->mRootNode->mNumChildren)
|
||||||
pcOut->mMeshes[a]->mColors[1] = NULL;
|
{
|
||||||
|
aiNode* pcOld = pcOut->mRootNode;
|
||||||
|
pcOut->mRootNode = pcOut->mRootNode->mChildren[0];
|
||||||
|
pcOut->mRootNode->mParent = NULL;
|
||||||
|
pcOld->mChildren[0] = NULL;
|
||||||
|
delete pcOld;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the root node is a default node setup a name for it
|
||||||
|
if (pcOut->mRootNode->mName.data[0] == '$' && pcOut->mRootNode->mName.data[1] == '$')
|
||||||
|
{
|
||||||
|
pcOut->mRootNode->mName.Set("<root>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -458,7 +458,11 @@ struct Mesh
|
||||||
static int iCnt = 0;
|
static int iCnt = 0;
|
||||||
|
|
||||||
char szTemp[128];
|
char szTemp[128];
|
||||||
sprintf(szTemp,"$$_UNNAMED_%i_$$",iCnt++);
|
#if _MSC_VER >= 1400
|
||||||
|
::sprintf_s(szTemp,"$$_UNNAMED_%i_$$",iCnt++);
|
||||||
|
#else
|
||||||
|
::sprintf(szTemp,"$$_UNNAMED_%i_$$",iCnt++);
|
||||||
|
#endif
|
||||||
mName = szTemp;
|
mName = szTemp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -489,20 +493,24 @@ struct Node
|
||||||
{
|
{
|
||||||
Node()
|
Node()
|
||||||
|
|
||||||
// (code for keyframe animation. however, this is currently not supported by Assimp)
|
: mHierarchyPos(0),mHierarchyIndex(0)
|
||||||
#if 0
|
|
||||||
: vScaling(1.0f,1.0f,1.0f)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{
|
{
|
||||||
static int iCnt = 0;
|
static int iCnt = 0;
|
||||||
|
|
||||||
char szTemp[128];
|
char szTemp[128];
|
||||||
sprintf(szTemp,"$$_UNNAMED_%i_$$",iCnt++);
|
#if _MSC_VER >= 1400
|
||||||
|
::sprintf_s(szTemp,"$$_UNNAMED_%i_$$",iCnt++);
|
||||||
|
#else
|
||||||
|
::sprintf(szTemp,"$$_UNNAMED_%i_$$",iCnt++);
|
||||||
|
#endif
|
||||||
mName = szTemp;
|
mName = szTemp;
|
||||||
|
|
||||||
mHierarchyPos = 0;
|
#ifdef AI_3DS_KEYFRAME_ANIMATION
|
||||||
mHierarchyIndex = 0;
|
aRotationKeys.reserve(10);
|
||||||
|
aPositionKeys.reserve(10);
|
||||||
|
aScalingKeys.reserve(10);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Pointer to the parent node
|
//! Pointer to the parent node
|
||||||
|
@ -520,14 +528,20 @@ struct Node
|
||||||
//! Index of the node
|
//! Index of the node
|
||||||
int16_t mHierarchyIndex;
|
int16_t mHierarchyIndex;
|
||||||
|
|
||||||
// (code for keyframe animation. however, this is currently not supported by Assimp)
|
#ifdef AI_3DS_KEYFRAME_ANIMATION
|
||||||
#if 0
|
//! Rotation keys loaded from the file
|
||||||
aiVector3D vPivot;
|
std::vector<aiQuatKey> aRotationKeys;
|
||||||
aiVector3D vScaling;
|
|
||||||
aiMatrix4x4 mRotation;
|
//! Position keys loaded from the file
|
||||||
aiVector3D vPosition;
|
std::vector<aiVectorKey> aPositionKeys;
|
||||||
|
|
||||||
|
//! Scaling keys loaded from the file
|
||||||
|
std::vector<aiVectorKey> aScalingKeys;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//! Pivot position loaded from the file
|
||||||
|
aiVector3D vPivot;
|
||||||
|
|
||||||
//! Add a child node, setup the right parent node for it
|
//! Add a child node, setup the right parent node for it
|
||||||
//! \param pc Node to be 'adopted'
|
//! \param pc Node to be 'adopted'
|
||||||
inline Node& push_back(Node* pc)
|
inline Node& push_back(Node* pc)
|
||||||
|
|
|
@ -139,7 +139,17 @@ void Dot3DSImporter::InternReadFile(
|
||||||
this->bHasBG = false;
|
this->bHasBG = false;
|
||||||
|
|
||||||
int iRemaining = (unsigned int)fileSize;
|
int iRemaining = (unsigned int)fileSize;
|
||||||
this->ParseMainChunk(&iRemaining);
|
|
||||||
|
// parse the file
|
||||||
|
try
|
||||||
|
{
|
||||||
|
this->ParseMainChunk(iRemaining);
|
||||||
|
}
|
||||||
|
catch ( ImportErrorException* ex)
|
||||||
|
{
|
||||||
|
delete[] this->mBuffer;
|
||||||
|
throw ex;
|
||||||
|
};
|
||||||
|
|
||||||
// Generate an unique set of vertices/indices for
|
// Generate an unique set of vertices/indices for
|
||||||
// all meshes contained in the file
|
// all meshes contained in the file
|
||||||
|
@ -202,8 +212,7 @@ void Dot3DSImporter::ReadChunk(const Dot3DSFile::Chunk** p_ppcOut)
|
||||||
// read chunk
|
// read chunk
|
||||||
if (this->mCurrent >= this->mLast)
|
if (this->mCurrent >= this->mLast)
|
||||||
{
|
{
|
||||||
*p_ppcOut = NULL;
|
throw new ImportErrorException("Unexpected end of file, can't read chunk header");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
const uintptr_t iDiff = this->mLast - this->mCurrent;
|
const uintptr_t iDiff = this->mLast - this->mCurrent;
|
||||||
if (iDiff < sizeof(Dot3DSFile::Chunk))
|
if (iDiff < sizeof(Dot3DSFile::Chunk))
|
||||||
|
@ -211,18 +220,21 @@ void Dot3DSImporter::ReadChunk(const Dot3DSFile::Chunk** p_ppcOut)
|
||||||
*p_ppcOut = NULL;
|
*p_ppcOut = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
*p_ppcOut = (const Dot3DSFile::Chunk*) this->mCurrent;
|
*p_ppcOut = (const Dot3DSFile::Chunk*) this->mCurrent;
|
||||||
|
if ((**p_ppcOut).Size + this->mCurrent > this->mLast)
|
||||||
|
{
|
||||||
|
throw new ImportErrorException("Unexpected end of file, can't read chunk footer");
|
||||||
|
}
|
||||||
this->mCurrent += sizeof(Dot3DSFile::Chunk);
|
this->mCurrent += sizeof(Dot3DSFile::Chunk);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::ParseMainChunk(int* piRemaining)
|
void Dot3DSImporter::ParseMainChunk(int& piRemaining)
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
|
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
|
|
||||||
const unsigned char* pcCur = this->mCurrent;
|
const unsigned char* pcCur = this->mCurrent;
|
||||||
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
||||||
|
@ -235,7 +247,7 @@ void Dot3DSImporter::ParseMainChunk(int* piRemaining)
|
||||||
case Dot3DSFile::CHUNK_MAIN:
|
case Dot3DSFile::CHUNK_MAIN:
|
||||||
//case 0x444d: // bugfix
|
//case 0x444d: // bugfix
|
||||||
|
|
||||||
this->ParseEditorChunk(&iRemaining);
|
this->ParseEditorChunk(iRemaining);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
if (pcCurNext < this->mCurrent)
|
if (pcCurNext < this->mCurrent)
|
||||||
|
@ -247,17 +259,17 @@ void Dot3DSImporter::ParseMainChunk(int* piRemaining)
|
||||||
}
|
}
|
||||||
// Go to the starting position of the next top-level chunk
|
// Go to the starting position of the next top-level chunk
|
||||||
this->mCurrent = pcCurNext;
|
this->mCurrent = pcCurNext;
|
||||||
*piRemaining -= psChunk->Size;
|
piRemaining -= psChunk->Size;
|
||||||
if (0 >= *piRemaining)return;
|
if (0 >= piRemaining)return;
|
||||||
return this->ParseMainChunk(piRemaining);
|
return this->ParseMainChunk(piRemaining);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::ParseEditorChunk(int* piRemaining)
|
void Dot3DSImporter::ParseEditorChunk(int& piRemaining)
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
|
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
|
|
||||||
const unsigned char* pcCur = this->mCurrent;
|
const unsigned char* pcCur = this->mCurrent;
|
||||||
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
||||||
|
@ -269,14 +281,35 @@ void Dot3DSImporter::ParseEditorChunk(int* piRemaining)
|
||||||
{
|
{
|
||||||
case Dot3DSFile::CHUNK_OBJMESH:
|
case Dot3DSFile::CHUNK_OBJMESH:
|
||||||
|
|
||||||
this->ParseObjectChunk(&iRemaining);
|
this->ParseObjectChunk(iRemaining);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// NOTE: In several documentations in the internet this
|
// NOTE: In several documentations in the internet this
|
||||||
// chunk appears at different locations
|
// chunk appears at different locations
|
||||||
case Dot3DSFile::CHUNK_KEYFRAMER:
|
case Dot3DSFile::CHUNK_KEYFRAMER:
|
||||||
|
|
||||||
this->ParseKeyframeChunk(&iRemaining);
|
this->ParseKeyframeChunk(iRemaining);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Dot3DSFile::CHUNK_VERSION:
|
||||||
|
|
||||||
|
if (psChunk->Size >= 2+sizeof(Dot3DSFile::Chunk))
|
||||||
|
{
|
||||||
|
// print the version number
|
||||||
|
char szBuffer[128];
|
||||||
|
#if _MSC_VER >= 1400
|
||||||
|
::sprintf_s(szBuffer,"3DS file version chunk: %i",
|
||||||
|
(int) *((uint16_t*)this->mCurrent));
|
||||||
|
#else
|
||||||
|
::sprintf(szBuffer,"3DS file version chunk: %i",
|
||||||
|
(int) *((uint16_t*)this->mCurrent));
|
||||||
|
#endif
|
||||||
|
DefaultLogger::get()->info(szBuffer);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DefaultLogger::get()->warn("Invalid version chunk in 3DS file");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
if (pcCurNext < this->mCurrent)
|
if (pcCurNext < this->mCurrent)
|
||||||
|
@ -288,17 +321,17 @@ void Dot3DSImporter::ParseEditorChunk(int* piRemaining)
|
||||||
}
|
}
|
||||||
// Go to the starting position of the next top-level chunk
|
// Go to the starting position of the next top-level chunk
|
||||||
this->mCurrent = pcCurNext;
|
this->mCurrent = pcCurNext;
|
||||||
*piRemaining -= psChunk->Size;
|
piRemaining -= psChunk->Size;
|
||||||
if (0 >= *piRemaining)return;
|
if (0 >= piRemaining)return;
|
||||||
return this->ParseEditorChunk(piRemaining);
|
return this->ParseEditorChunk(piRemaining);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::ParseObjectChunk(int* piRemaining)
|
void Dot3DSImporter::ParseObjectChunk(int& piRemaining)
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
|
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
|
|
||||||
const unsigned char* pcCur = this->mCurrent;
|
const unsigned char* pcCur = this->mCurrent;
|
||||||
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
||||||
|
@ -329,13 +362,13 @@ void Dot3DSImporter::ParseObjectChunk(int* piRemaining)
|
||||||
|
|
||||||
this->mCurrent += iCnt;
|
this->mCurrent += iCnt;
|
||||||
iRemaining -= iCnt;
|
iRemaining -= iCnt;
|
||||||
this->ParseChunk(&iRemaining);
|
this->ParseChunk(iRemaining);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Dot3DSFile::CHUNK_MAT_MATERIAL:
|
case Dot3DSFile::CHUNK_MAT_MATERIAL:
|
||||||
|
|
||||||
this->mScene->mMaterials.push_back(Dot3DS::Material());
|
this->mScene->mMaterials.push_back(Dot3DS::Material());
|
||||||
this->ParseMaterialChunk(&iRemaining);
|
this->ParseMaterialChunk(iRemaining);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Dot3DSFile::CHUNK_AMBCOLOR:
|
case Dot3DSFile::CHUNK_AMBCOLOR:
|
||||||
|
@ -373,7 +406,7 @@ void Dot3DSImporter::ParseObjectChunk(int* piRemaining)
|
||||||
// chunk appears at different locations
|
// chunk appears at different locations
|
||||||
case Dot3DSFile::CHUNK_KEYFRAMER:
|
case Dot3DSFile::CHUNK_KEYFRAMER:
|
||||||
|
|
||||||
this->ParseKeyframeChunk(&iRemaining);
|
this->ParseKeyframeChunk(iRemaining);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -386,8 +419,8 @@ void Dot3DSImporter::ParseObjectChunk(int* piRemaining)
|
||||||
}
|
}
|
||||||
// Go to the starting position of the next top-level chunk
|
// Go to the starting position of the next top-level chunk
|
||||||
this->mCurrent = pcCurNext;
|
this->mCurrent = pcCurNext;
|
||||||
*piRemaining -= psChunk->Size;
|
piRemaining -= psChunk->Size;
|
||||||
if (0 >= *piRemaining)return;
|
if (0 >= piRemaining)return;
|
||||||
return this->ParseObjectChunk(piRemaining);
|
return this->ParseObjectChunk(piRemaining);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -395,17 +428,17 @@ void Dot3DSImporter::SkipChunk()
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
this->mCurrent += psChunk->Size - sizeof(Dot3DSFile::Chunk);
|
this->mCurrent += psChunk->Size - sizeof(Dot3DSFile::Chunk);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::ParseChunk(int* piRemaining)
|
void Dot3DSImporter::ParseChunk(int& piRemaining)
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
|
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
|
|
||||||
const unsigned char* pcCur = this->mCurrent;
|
const unsigned char* pcCur = this->mCurrent;
|
||||||
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
||||||
|
@ -417,7 +450,7 @@ void Dot3DSImporter::ParseChunk(int* piRemaining)
|
||||||
{
|
{
|
||||||
case Dot3DSFile::CHUNK_TRIMESH:
|
case Dot3DSFile::CHUNK_TRIMESH:
|
||||||
// this starts a new mesh
|
// this starts a new mesh
|
||||||
this->ParseMeshChunk(&iRemaining);
|
this->ParseMeshChunk(iRemaining);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
if (pcCurNext < this->mCurrent)
|
if (pcCurNext < this->mCurrent)
|
||||||
|
@ -430,17 +463,17 @@ void Dot3DSImporter::ParseChunk(int* piRemaining)
|
||||||
// Go to the starting position of the next top-level chunk
|
// Go to the starting position of the next top-level chunk
|
||||||
this->mCurrent = pcCurNext;
|
this->mCurrent = pcCurNext;
|
||||||
|
|
||||||
*piRemaining -= psChunk->Size;
|
piRemaining -= psChunk->Size;
|
||||||
if (0 >= *piRemaining)return;
|
if (0 >= piRemaining)return;
|
||||||
return this->ParseChunk(piRemaining);
|
return this->ParseChunk(piRemaining);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::ParseKeyframeChunk(int* piRemaining)
|
void Dot3DSImporter::ParseKeyframeChunk(int& piRemaining)
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
|
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
|
|
||||||
const unsigned char* pcCur = this->mCurrent;
|
const unsigned char* pcCur = this->mCurrent;
|
||||||
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
||||||
|
@ -452,7 +485,7 @@ void Dot3DSImporter::ParseKeyframeChunk(int* piRemaining)
|
||||||
{
|
{
|
||||||
case Dot3DSFile::CHUNK_TRACKINFO:
|
case Dot3DSFile::CHUNK_TRACKINFO:
|
||||||
// this starts a new mesh
|
// this starts a new mesh
|
||||||
this->ParseHierarchyChunk(&iRemaining);
|
this->ParseHierarchyChunk(iRemaining);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
if (pcCurNext < this->mCurrent)
|
if (pcCurNext < this->mCurrent)
|
||||||
|
@ -465,8 +498,8 @@ void Dot3DSImporter::ParseKeyframeChunk(int* piRemaining)
|
||||||
// Go to the starting position of the next top-level chunk
|
// Go to the starting position of the next top-level chunk
|
||||||
this->mCurrent = pcCurNext;
|
this->mCurrent = pcCurNext;
|
||||||
|
|
||||||
*piRemaining -= psChunk->Size;
|
piRemaining -= psChunk->Size;
|
||||||
if (0 >= *piRemaining)return;
|
if (0 >= piRemaining)return;
|
||||||
return this->ParseKeyframeChunk(piRemaining);
|
return this->ParseKeyframeChunk(piRemaining);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -487,12 +520,12 @@ void Dot3DSImporter::InverseNodeSearch(Dot3DS::Node* pcNode,Dot3DS::Node* pcCurr
|
||||||
return this->InverseNodeSearch(pcNode,pcCurrent->mParent);
|
return this->InverseNodeSearch(pcNode,pcCurrent->mParent);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::ParseHierarchyChunk(int* piRemaining)
|
void Dot3DSImporter::ParseHierarchyChunk(int& piRemaining)
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
|
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
|
|
||||||
const unsigned char* pcCur = this->mCurrent;
|
const unsigned char* pcCur = this->mCurrent;
|
||||||
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
||||||
|
@ -545,15 +578,14 @@ void Dot3DSImporter::ParseHierarchyChunk(int* piRemaining)
|
||||||
this->mCurrentNode = pcNode;
|
this->mCurrentNode = pcNode;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// (code for keyframe animation. however, this is currently not supported by Assimp)
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
case Dot3DSFile::CHUNK_TRACKPIVOT:
|
case Dot3DSFile::CHUNK_TRACKPIVOT:
|
||||||
|
|
||||||
this->mCurrentNode->vPivot = *((aiVector3D*)this->mCurrent);
|
// pivot = origin of rotation and scaling
|
||||||
|
this->mCurrentNode->vPivot = *((const aiVector3D*)this->mCurrent);
|
||||||
this->mCurrent += sizeof(aiVector3D);
|
this->mCurrent += sizeof(aiVector3D);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef AI_3DS_KEYFRAME_ANIMATION
|
||||||
|
|
||||||
case Dot3DSFile::CHUNK_TRACKPOS:
|
case Dot3DSFile::CHUNK_TRACKPOS:
|
||||||
|
|
||||||
|
@ -569,25 +601,31 @@ void Dot3DSImporter::ParseHierarchyChunk(int* piRemaining)
|
||||||
} pos[keys];
|
} pos[keys];
|
||||||
*/
|
*/
|
||||||
this->mCurrent += 10;
|
this->mCurrent += 10;
|
||||||
iTemp = *((uint16_t*)mCurrent);
|
iTemp = *((const uint16_t*)mCurrent);
|
||||||
|
|
||||||
this->mCurrent += sizeof(uint16_t) * 2;
|
this->mCurrent += sizeof(uint16_t) * 2;
|
||||||
|
|
||||||
if (0 != iTemp)
|
|
||||||
{
|
|
||||||
for (unsigned int i = 0; i < (unsigned int)iTemp;++i)
|
for (unsigned int i = 0; i < (unsigned int)iTemp;++i)
|
||||||
{
|
{
|
||||||
uint16_t sNum = *((uint16_t*)mCurrent);
|
uint16_t sNum = *((const uint16_t*)mCurrent);
|
||||||
this->mCurrent += sizeof(uint16_t);
|
this->mCurrent += sizeof(uint16_t);
|
||||||
|
|
||||||
if (0 == sNum)
|
aiVectorKey v;
|
||||||
{
|
v.mTime = (double)sNum;
|
||||||
|
|
||||||
this->mCurrent += sizeof(uint32_t);
|
this->mCurrent += sizeof(uint32_t);
|
||||||
this->mCurrentNode->vPosition = *((aiVector3D*)this->mCurrent);
|
v.mValue = *((const aiVector3D*)this->mCurrent);
|
||||||
this->mCurrent += sizeof(aiVector3D);
|
this->mCurrent += sizeof(aiVector3D);
|
||||||
|
|
||||||
|
// check whether we do already have this keyframe
|
||||||
|
for (std::vector<aiVectorKey>::const_iterator
|
||||||
|
i = this->mCurrentNode->aPositionKeys.begin();
|
||||||
|
i != this->mCurrentNode->aPositionKeys.end();++i)
|
||||||
|
{
|
||||||
|
if ((*i).mTime == v.mTime){v.mTime = -10e10f;break;}
|
||||||
}
|
}
|
||||||
else this->mCurrent += sizeof(uint32_t) + sizeof(aiVector3D);
|
// add the new keyframe
|
||||||
}
|
if (v.mTime != -10e10f)this->mCurrentNode->aPositionKeys.push_back(v);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -605,71 +643,38 @@ void Dot3DSImporter::ParseHierarchyChunk(int* piRemaining)
|
||||||
} pos[keys];
|
} pos[keys];
|
||||||
*/
|
*/
|
||||||
this->mCurrent += 10;
|
this->mCurrent += 10;
|
||||||
iTemp = *((uint16_t*)mCurrent);
|
iTemp = *((const uint16_t*)mCurrent);
|
||||||
|
|
||||||
this->mCurrent += sizeof(uint16_t) * 2;
|
this->mCurrent += sizeof(uint16_t) * 2;
|
||||||
if (0 != iTemp)
|
|
||||||
{
|
|
||||||
bool neg = false;
|
|
||||||
unsigned int iNum0 = 0;
|
|
||||||
for (unsigned int i = 0; i < (unsigned int)iTemp;++i)
|
for (unsigned int i = 0; i < (unsigned int)iTemp;++i)
|
||||||
{
|
{
|
||||||
uint16_t sNum = *((uint16_t*)mCurrent);
|
uint16_t sNum = *((const uint16_t*)mCurrent);
|
||||||
this->mCurrent += sizeof(uint16_t);
|
this->mCurrent += sizeof(uint16_t);
|
||||||
|
|
||||||
if (0 == sNum)
|
aiQuatKey v;
|
||||||
{
|
v.mTime = (double)sNum;
|
||||||
|
|
||||||
this->mCurrent += sizeof(uint32_t);
|
this->mCurrent += sizeof(uint32_t);
|
||||||
float fRadians = *((float*)this->mCurrent);
|
|
||||||
|
float fRadians = *((const float*)this->mCurrent);
|
||||||
this->mCurrent += sizeof(float);
|
this->mCurrent += sizeof(float);
|
||||||
aiVector3D vAxis = *((aiVector3D*)this->mCurrent);
|
|
||||||
|
aiVector3D vAxis = *((const aiVector3D*)this->mCurrent);
|
||||||
this->mCurrent += sizeof(aiVector3D);
|
this->mCurrent += sizeof(aiVector3D);
|
||||||
|
|
||||||
// some idiotic files have rotations with fRadians = 0 ...
|
// construct a rotation quaternion from the axis-angle pair
|
||||||
if (0.0f != fRadians)
|
v.mValue = aiQuaternion(vAxis,fRadians);
|
||||||
|
|
||||||
|
// check whether we do already have this keyframe
|
||||||
|
for (std::vector<aiQuatKey>::const_iterator
|
||||||
|
i = this->mCurrentNode->aRotationKeys.begin();
|
||||||
|
i != this->mCurrentNode->aRotationKeys.end();++i)
|
||||||
{
|
{
|
||||||
|
if ((*i).mTime == v.mTime){v.mTime = -10e10f;break;}
|
||||||
// get the rotation matrix around the axis
|
|
||||||
const float fSin = sinf(-fRadians);
|
|
||||||
const float fCos = cosf(-fRadians);
|
|
||||||
const float fOneMinusCos = 1.0f - fCos;
|
|
||||||
|
|
||||||
std::swap(vAxis.z,vAxis.y);
|
|
||||||
//vAxis.z *= -1.0f;
|
|
||||||
//vAxis.Normalize();
|
|
||||||
|
|
||||||
aiMatrix4x4 mRot = aiMatrix4x4(
|
|
||||||
(vAxis.x * vAxis.x) * fOneMinusCos + fCos,
|
|
||||||
(vAxis.x * vAxis.y) * fOneMinusCos /*-*/- (vAxis.z * fSin),
|
|
||||||
(vAxis.x * vAxis.z) * fOneMinusCos /*+*/+ (vAxis.y * fSin),
|
|
||||||
0.0f,
|
|
||||||
(vAxis.y * vAxis.x) * fOneMinusCos /*+*/+ (vAxis.z * fSin),
|
|
||||||
(vAxis.y * vAxis.y) * fOneMinusCos + fCos,
|
|
||||||
(vAxis.y * vAxis.z) * fOneMinusCos /*-*/- (vAxis.x * fSin),
|
|
||||||
0.0f,
|
|
||||||
(vAxis.z * vAxis.x) * fOneMinusCos /*-*/- (vAxis.y * fSin),
|
|
||||||
(vAxis.z * vAxis.y) * fOneMinusCos /*+*/+ (vAxis.x * fSin),
|
|
||||||
(vAxis.z * vAxis.z) * fOneMinusCos + fCos,
|
|
||||||
0.0f,0.0f,0.0f,0.0f,1.0f);
|
|
||||||
mRot.Transpose();
|
|
||||||
|
|
||||||
// build a chain of concatenated rotation matrix'
|
|
||||||
// if there are multiple track chunks for the same frame
|
|
||||||
// (there are some silly files usinf this ...)
|
|
||||||
if (0 != iNum0)
|
|
||||||
{
|
|
||||||
this->mCurrentNode->mRotation = this->mCurrentNode->mRotation * mRot;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// for the first time simply set the rotation matrix
|
|
||||||
this->mCurrentNode->mRotation = mRot;
|
|
||||||
}
|
|
||||||
iNum0++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else this->mCurrent += sizeof(uint32_t) + sizeof(aiVector3D) + sizeof(float);
|
|
||||||
}
|
}
|
||||||
|
// add the new keyframe
|
||||||
|
if (v.mTime != -10e10f)this->mCurrentNode->aRotationKeys.push_back(v);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -687,40 +692,45 @@ void Dot3DSImporter::ParseHierarchyChunk(int* piRemaining)
|
||||||
} pos[keys];
|
} pos[keys];
|
||||||
*/
|
*/
|
||||||
this->mCurrent += 10;
|
this->mCurrent += 10;
|
||||||
iTemp = *((uint16_t*)mCurrent);
|
iTemp = *((const uint16_t*)mCurrent);
|
||||||
|
|
||||||
this->mCurrent += sizeof(uint16_t) * 2;
|
this->mCurrent += sizeof(uint16_t) * 2;
|
||||||
|
|
||||||
if (0 != iTemp)
|
|
||||||
{
|
|
||||||
for (unsigned int i = 0; i < (unsigned int)iTemp;++i)
|
for (unsigned int i = 0; i < (unsigned int)iTemp;++i)
|
||||||
{
|
{
|
||||||
uint16_t sNum = *((uint16_t*)mCurrent);
|
uint16_t sNum = *((const uint16_t*)mCurrent);
|
||||||
this->mCurrent += sizeof(uint16_t);
|
this->mCurrent += sizeof(uint16_t);
|
||||||
if (0 == sNum)
|
|
||||||
{
|
aiVectorKey v;
|
||||||
|
v.mTime = (double)sNum;
|
||||||
|
|
||||||
this->mCurrent += sizeof(uint32_t);
|
this->mCurrent += sizeof(uint32_t);
|
||||||
aiVector3D vMe = *((aiVector3D*)this->mCurrent);
|
v.mValue = *((const aiVector3D*)this->mCurrent);
|
||||||
// ignore zero scalings
|
|
||||||
if (0.0f != vMe.x && 0.0f != vMe.y && 0.0f != vMe.z)
|
|
||||||
{
|
|
||||||
this->mCurrentNode->vScaling.x *= vMe.x;
|
|
||||||
this->mCurrentNode->vScaling.y *= vMe.y;
|
|
||||||
this->mCurrentNode->vScaling.z *= vMe.z;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DefaultLogger::get()->warn("Found zero scaling factors. "
|
|
||||||
"This will be ignored.");
|
|
||||||
}
|
|
||||||
this->mCurrent += sizeof(aiVector3D);
|
this->mCurrent += sizeof(aiVector3D);
|
||||||
|
|
||||||
|
// check whether we do already have this keyframe
|
||||||
|
for (std::vector<aiVectorKey>::const_iterator
|
||||||
|
i = this->mCurrentNode->aScalingKeys.begin();
|
||||||
|
i != this->mCurrentNode->aScalingKeys.end();++i)
|
||||||
|
{
|
||||||
|
if ((*i).mTime == v.mTime){v.mTime = -10e10f;break;}
|
||||||
}
|
}
|
||||||
else this->mCurrent += sizeof(uint32_t) + sizeof(aiVector3D);
|
// add the new keyframe
|
||||||
|
if (v.mTime != -10e10f)this->mCurrentNode->aScalingKeys.push_back(v);
|
||||||
|
|
||||||
|
if (v.mValue.x && v.mValue.y && v.mValue.z)
|
||||||
|
{
|
||||||
|
DefaultLogger::get()->warn("Found zero scaled axis in scaling keyframe");
|
||||||
|
++iCnt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// there are 3DS files that have only zero scalings
|
||||||
|
if (iTemp == iCnt)
|
||||||
|
{
|
||||||
|
DefaultLogger::get()->warn("All scaling keys are zero. They will be removed");
|
||||||
|
this->mCurrentNode->aScalingKeys.clear();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
#endif // end keyframe animation code
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
if (pcCurNext < this->mCurrent)
|
if (pcCurNext < this->mCurrent)
|
||||||
{
|
{
|
||||||
|
@ -732,19 +742,19 @@ void Dot3DSImporter::ParseHierarchyChunk(int* piRemaining)
|
||||||
// Go to the starting position of the next top-level chunk
|
// Go to the starting position of the next top-level chunk
|
||||||
this->mCurrent = pcCurNext;
|
this->mCurrent = pcCurNext;
|
||||||
|
|
||||||
*piRemaining -= psChunk->Size;
|
piRemaining -= psChunk->Size;
|
||||||
if (0 >= *piRemaining)return;
|
if (0 >= piRemaining)return;
|
||||||
return this->ParseHierarchyChunk(piRemaining);
|
return this->ParseHierarchyChunk(piRemaining);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::ParseFaceChunk(int* piRemaining)
|
void Dot3DSImporter::ParseFaceChunk(int& piRemaining)
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
|
|
||||||
Dot3DS::Mesh& mMesh = this->mScene->mMeshes.back();
|
Dot3DS::Mesh& mMesh = this->mScene->mMeshes.back();
|
||||||
|
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
|
|
||||||
const unsigned char* pcCur = this->mCurrent;
|
const unsigned char* pcCur = this->mCurrent;
|
||||||
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
||||||
|
@ -833,19 +843,19 @@ void Dot3DSImporter::ParseFaceChunk(int* piRemaining)
|
||||||
// Go to the starting position of the next chunk on this level
|
// Go to the starting position of the next chunk on this level
|
||||||
this->mCurrent = pcCurNext;
|
this->mCurrent = pcCurNext;
|
||||||
|
|
||||||
*piRemaining -= psChunk->Size;
|
piRemaining -= psChunk->Size;
|
||||||
if (0 >= *piRemaining)return;
|
if (0 >= piRemaining)return;
|
||||||
return ParseFaceChunk(piRemaining);
|
return ParseFaceChunk(piRemaining);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::ParseMeshChunk(int* piRemaining)
|
void Dot3DSImporter::ParseMeshChunk(int& piRemaining)
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
|
|
||||||
Dot3DS::Mesh& mMesh = this->mScene->mMeshes.back();
|
Dot3DS::Mesh& mMesh = this->mScene->mMeshes.back();
|
||||||
|
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
|
|
||||||
const unsigned char* pcCur = this->mCurrent;
|
const unsigned char* pcCur = this->mCurrent;
|
||||||
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
||||||
|
@ -866,11 +876,12 @@ void Dot3DSImporter::ParseMeshChunk(int* piRemaining)
|
||||||
while (iNum-- > 0)
|
while (iNum-- > 0)
|
||||||
{
|
{
|
||||||
mMesh.mPositions.push_back(*((aiVector3D*)this->mCurrent));
|
mMesh.mPositions.push_back(*((aiVector3D*)this->mCurrent));
|
||||||
mMesh.mPositions.back().z *= -1.0f;
|
aiVector3D& v = mMesh.mPositions.back();
|
||||||
|
//std::swap( v.y, v.z);
|
||||||
|
//v.y *= -1.0f;
|
||||||
this->mCurrent += sizeof(aiVector3D);
|
this->mCurrent += sizeof(aiVector3D);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Dot3DSFile::CHUNK_TRMATRIX:
|
case Dot3DSFile::CHUNK_TRMATRIX:
|
||||||
{
|
{
|
||||||
// http://www.gamedev.net/community/forums/topic.asp?topic_id=263063
|
// http://www.gamedev.net/community/forums/topic.asp?topic_id=263063
|
||||||
|
@ -879,43 +890,21 @@ void Dot3DSImporter::ParseMeshChunk(int* piRemaining)
|
||||||
this->mCurrent += 12 * sizeof(float);
|
this->mCurrent += 12 * sizeof(float);
|
||||||
|
|
||||||
mMesh.mMat.a1 = pf[0];
|
mMesh.mMat.a1 = pf[0];
|
||||||
mMesh.mMat.a2 = pf[1];
|
mMesh.mMat.b1 = pf[1];
|
||||||
mMesh.mMat.a3 = pf[2];
|
mMesh.mMat.c1 = pf[2];
|
||||||
mMesh.mMat.b1 = pf[3];
|
mMesh.mMat.a2 = pf[3];
|
||||||
mMesh.mMat.b2 = pf[4];
|
mMesh.mMat.b2 = pf[4];
|
||||||
mMesh.mMat.b3 = pf[5];
|
mMesh.mMat.c2 = pf[5];
|
||||||
mMesh.mMat.c1 = pf[6];
|
mMesh.mMat.a3 = pf[6];
|
||||||
mMesh.mMat.c2 = pf[7];
|
mMesh.mMat.b3 = pf[7];
|
||||||
mMesh.mMat.c3 = pf[8];
|
mMesh.mMat.c3 = pf[8];
|
||||||
mMesh.mMat.d1 = pf[9];
|
mMesh.mMat.a4 = pf[9];
|
||||||
mMesh.mMat.d2 = pf[10];
|
mMesh.mMat.b4 = pf[10];
|
||||||
mMesh.mMat.d3 = pf[11];
|
mMesh.mMat.c4 = pf[11];
|
||||||
|
//mMesh.mMat.Transpose(); // todo ----
|
||||||
std::swap((float&)mMesh.mMat.d2, (float&)mMesh.mMat.d3);
|
|
||||||
std::swap((float&)mMesh.mMat.a2, (float&)mMesh.mMat.a3);
|
|
||||||
std::swap((float&)mMesh.mMat.b1, (float&)mMesh.mMat.c1);
|
|
||||||
std::swap((float&)mMesh.mMat.c2, (float&)mMesh.mMat.b3);
|
|
||||||
std::swap((float&)mMesh.mMat.b2, (float&)mMesh.mMat.c3);
|
|
||||||
|
|
||||||
mMesh.mMat.Transpose();
|
|
||||||
|
|
||||||
//aiMatrix4x4 mInv = mMesh.mMat;
|
|
||||||
//mInv.Inverse();
|
|
||||||
|
|
||||||
//// invert the matrix and transform all vertices with it
|
|
||||||
//// (the origin of all vertices is 0|0|0 now)
|
|
||||||
//for (register unsigned int i = 0; i < mMesh.mPositions.size();++i)
|
|
||||||
// {
|
|
||||||
// aiVector3D a,c;
|
|
||||||
// a = mMesh.mPositions[i];
|
|
||||||
// c[0]= mInv[0][0]*a[0] + mInv[1][0]*a[1] + mInv[2][0]*a[2] + mInv[3][0];
|
|
||||||
// c[1]= mInv[0][1]*a[0] + mInv[1][1]*a[1] + mInv[2][1]*a[2] + mInv[3][1];
|
|
||||||
// c[2]= mInv[0][2]*a[0] + mInv[1][2]*a[1] + mInv[2][2]*a[2] + mInv[3][2];
|
|
||||||
// mMesh.mPositions[i] = c;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// now check whether the matrix has got a negative determinant
|
// now check whether the matrix has got a negative determinant
|
||||||
// If yes, we need to flip all vertices x axis ....
|
// If yes, we need to flip all vertices' x axis ....
|
||||||
// From lib3ds, mesh.c
|
// From lib3ds, mesh.c
|
||||||
if (mMesh.mMat.Determinant() < 0.0f)
|
if (mMesh.mMat.Determinant() < 0.0f)
|
||||||
{
|
{
|
||||||
|
@ -938,9 +927,9 @@ void Dot3DSImporter::ParseMeshChunk(int* piRemaining)
|
||||||
mMesh.mPositions[i] = c;
|
mMesh.mPositions[i] = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Dot3DSFile::CHUNK_MAPLIST:
|
case Dot3DSFile::CHUNK_MAPLIST:
|
||||||
|
|
||||||
iNum = *((uint16_t*)this->mCurrent);
|
iNum = *((uint16_t*)this->mCurrent);
|
||||||
|
@ -983,7 +972,7 @@ void Dot3DSImporter::ParseMeshChunk(int* piRemaining)
|
||||||
mMesh.mFaceMaterials.resize(mMesh.mFaces.size(),0xcdcdcdcd);
|
mMesh.mFaceMaterials.resize(mMesh.mFaces.size(),0xcdcdcdcd);
|
||||||
|
|
||||||
iRemaining = (int)(pcCurNext - this->mCurrent);
|
iRemaining = (int)(pcCurNext - this->mCurrent);
|
||||||
if (iRemaining > 0)this->ParseFaceChunk(&iRemaining);
|
if (iRemaining > 0)this->ParseFaceChunk(iRemaining);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -997,17 +986,17 @@ void Dot3DSImporter::ParseMeshChunk(int* piRemaining)
|
||||||
// Go to the starting position of the next chunk on this level
|
// Go to the starting position of the next chunk on this level
|
||||||
this->mCurrent = pcCurNext;
|
this->mCurrent = pcCurNext;
|
||||||
|
|
||||||
*piRemaining -= psChunk->Size;
|
piRemaining -= psChunk->Size;
|
||||||
if (0 >= *piRemaining)return;
|
if (0 >= piRemaining)return;
|
||||||
return ParseMeshChunk(piRemaining);
|
return ParseMeshChunk(piRemaining);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::ParseMaterialChunk(int* piRemaining)
|
void Dot3DSImporter::ParseMaterialChunk(int& piRemaining)
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
|
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
|
|
||||||
const unsigned char* pcCur = this->mCurrent;
|
const unsigned char* pcCur = this->mCurrent;
|
||||||
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
||||||
|
@ -1121,27 +1110,27 @@ void Dot3DSImporter::ParseMaterialChunk(int* piRemaining)
|
||||||
// parse texture chunks
|
// parse texture chunks
|
||||||
case Dot3DSFile::CHUNK_MAT_TEXTURE:
|
case Dot3DSFile::CHUNK_MAT_TEXTURE:
|
||||||
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
||||||
this->ParseTextureChunk(&iRemaining,&this->mScene->mMaterials.back().sTexDiffuse);
|
this->ParseTextureChunk(iRemaining,&this->mScene->mMaterials.back().sTexDiffuse);
|
||||||
break;
|
break;
|
||||||
case Dot3DSFile::CHUNK_MAT_BUMPMAP:
|
case Dot3DSFile::CHUNK_MAT_BUMPMAP:
|
||||||
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
||||||
this->ParseTextureChunk(&iRemaining,&this->mScene->mMaterials.back().sTexBump);
|
this->ParseTextureChunk(iRemaining,&this->mScene->mMaterials.back().sTexBump);
|
||||||
break;
|
break;
|
||||||
case Dot3DSFile::CHUNK_MAT_OPACMAP:
|
case Dot3DSFile::CHUNK_MAT_OPACMAP:
|
||||||
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
||||||
this->ParseTextureChunk(&iRemaining,&this->mScene->mMaterials.back().sTexOpacity);
|
this->ParseTextureChunk(iRemaining,&this->mScene->mMaterials.back().sTexOpacity);
|
||||||
break;
|
break;
|
||||||
case Dot3DSFile::CHUNK_MAT_MAT_SHINMAP:
|
case Dot3DSFile::CHUNK_MAT_MAT_SHINMAP:
|
||||||
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
||||||
this->ParseTextureChunk(&iRemaining,&this->mScene->mMaterials.back().sTexShininess);
|
this->ParseTextureChunk(iRemaining,&this->mScene->mMaterials.back().sTexShininess);
|
||||||
break;
|
break;
|
||||||
case Dot3DSFile::CHUNK_MAT_SPECMAP:
|
case Dot3DSFile::CHUNK_MAT_SPECMAP:
|
||||||
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
||||||
this->ParseTextureChunk(&iRemaining,&this->mScene->mMaterials.back().sTexSpecular);
|
this->ParseTextureChunk(iRemaining,&this->mScene->mMaterials.back().sTexSpecular);
|
||||||
break;
|
break;
|
||||||
case Dot3DSFile::CHUNK_MAT_SELFIMAP:
|
case Dot3DSFile::CHUNK_MAT_SELFIMAP:
|
||||||
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
iRemaining = (psChunk->Size - sizeof(Dot3DSFile::Chunk));
|
||||||
this->ParseTextureChunk(&iRemaining,&this->mScene->mMaterials.back().sTexEmissive);
|
this->ParseTextureChunk(iRemaining,&this->mScene->mMaterials.back().sTexEmissive);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
if (pcCurNext < this->mCurrent)
|
if (pcCurNext < this->mCurrent)
|
||||||
|
@ -1154,17 +1143,17 @@ void Dot3DSImporter::ParseMaterialChunk(int* piRemaining)
|
||||||
// Go to the starting position of the next chunk on this level
|
// Go to the starting position of the next chunk on this level
|
||||||
this->mCurrent = pcCurNext;
|
this->mCurrent = pcCurNext;
|
||||||
|
|
||||||
*piRemaining -= psChunk->Size;
|
piRemaining -= psChunk->Size;
|
||||||
if (0 >= *piRemaining)return;
|
if (0 >= piRemaining)return;
|
||||||
return ParseMaterialChunk(piRemaining);
|
return ParseMaterialChunk(piRemaining);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Dot3DSImporter::ParseTextureChunk(int* piRemaining,Dot3DS::Texture* pcOut)
|
void Dot3DSImporter::ParseTextureChunk(int& piRemaining,Dot3DS::Texture* pcOut)
|
||||||
{
|
{
|
||||||
const Dot3DSFile::Chunk* psChunk;
|
const Dot3DSFile::Chunk* psChunk;
|
||||||
|
|
||||||
this->ReadChunk(&psChunk);
|
this->ReadChunk(&psChunk);
|
||||||
if (NULL == psChunk)return;
|
|
||||||
|
|
||||||
const unsigned char* pcCur = this->mCurrent;
|
const unsigned char* pcCur = this->mCurrent;
|
||||||
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
const unsigned char* pcCurNext = pcCur + (psChunk->Size
|
||||||
|
@ -1246,8 +1235,8 @@ void Dot3DSImporter::ParseTextureChunk(int* piRemaining,Dot3DS::Texture* pcOut)
|
||||||
// Go to the starting position of the next chunk on this level
|
// Go to the starting position of the next chunk on this level
|
||||||
this->mCurrent = pcCurNext;
|
this->mCurrent = pcCurNext;
|
||||||
|
|
||||||
*piRemaining -= psChunk->Size;
|
piRemaining -= psChunk->Size;
|
||||||
if (0 >= *piRemaining)return;
|
if (0 >= piRemaining)return;
|
||||||
return ParseTextureChunk(piRemaining,pcOut);
|
return ParseTextureChunk(piRemaining,pcOut);
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -138,52 +138,52 @@ protected:
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Parse a main top-level chunk in the file
|
/** Parse a main top-level chunk in the file
|
||||||
*/
|
*/
|
||||||
void ParseMainChunk(int* piRemaining);
|
void ParseMainChunk(int& piRemaining);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Parse a top-level chunk in the file
|
/** Parse a top-level chunk in the file
|
||||||
*/
|
*/
|
||||||
void ParseChunk(int* piRemaining);
|
void ParseChunk(int& piRemaining);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Parse a top-level editor chunk in the file
|
/** Parse a top-level editor chunk in the file
|
||||||
*/
|
*/
|
||||||
void ParseEditorChunk(int* piRemaining);
|
void ParseEditorChunk(int& piRemaining);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Parse a top-level object chunk in the file
|
/** Parse a top-level object chunk in the file
|
||||||
*/
|
*/
|
||||||
void ParseObjectChunk(int* piRemaining);
|
void ParseObjectChunk(int& piRemaining);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Parse a material chunk in the file
|
/** Parse a material chunk in the file
|
||||||
*/
|
*/
|
||||||
void ParseMaterialChunk(int* piRemaining);
|
void ParseMaterialChunk(int& piRemaining);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Parse a mesh chunk in the file
|
/** Parse a mesh chunk in the file
|
||||||
*/
|
*/
|
||||||
void ParseMeshChunk(int* piRemaining);
|
void ParseMeshChunk(int& piRemaining);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Parse a face list chunk in the file
|
/** Parse a face list chunk in the file
|
||||||
*/
|
*/
|
||||||
void ParseFaceChunk(int* piRemaining);
|
void ParseFaceChunk(int& piRemaining);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Parse a keyframe chunk in the file
|
/** Parse a keyframe chunk in the file
|
||||||
*/
|
*/
|
||||||
void ParseKeyframeChunk(int* piRemaining);
|
void ParseKeyframeChunk(int& piRemaining);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Parse a hierarchy chunk in the file
|
/** Parse a hierarchy chunk in the file
|
||||||
*/
|
*/
|
||||||
void ParseHierarchyChunk(int* piRemaining);
|
void ParseHierarchyChunk(int& piRemaining);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Parse a texture chunk in the file
|
/** Parse a texture chunk in the file
|
||||||
*/
|
*/
|
||||||
void ParseTextureChunk(int* piRemaining,Dot3DS::Texture* pcOut);
|
void ParseTextureChunk(int& piRemaining,Dot3DS::Texture* pcOut);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Convert the meshes in the file
|
/** Convert the meshes in the file
|
||||||
|
|
|
@ -105,7 +105,7 @@ bool ASEImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler) const
|
||||||
void ASEImporter::InternReadFile(
|
void ASEImporter::InternReadFile(
|
||||||
const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
|
const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
|
||||||
{
|
{
|
||||||
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile));
|
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rt"));
|
||||||
|
|
||||||
// Check whether we can read from the file
|
// Check whether we can read from the file
|
||||||
if( file.get() == NULL)
|
if( file.get() == NULL)
|
||||||
|
@ -195,7 +195,7 @@ void ASEImporter::GenerateDefaultMaterial()
|
||||||
mat.mSpecular = aiColor3D(1.0f,1.0f,1.0f);
|
mat.mSpecular = aiColor3D(1.0f,1.0f,1.0f);
|
||||||
mat.mAmbient = aiColor3D(0.05f,0.05f,0.05f);
|
mat.mAmbient = aiColor3D(0.05f,0.05f,0.05f);
|
||||||
mat.mShading = Dot3DSFile::Gouraud;
|
mat.mShading = Dot3DSFile::Gouraud;
|
||||||
mat.mName = "$$$ASE_DEFAULT";
|
mat.mName = AI_DEFAULT_MATERIAL_NAME;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void ASEImporter::AddNodes(aiScene* pcScene,aiNode* pcParent,
|
void ASEImporter::AddNodes(aiScene* pcScene,aiNode* pcParent,
|
||||||
|
|
|
@ -41,19 +41,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
/** @file Implementation of the ASE parser class */
|
/** @file Implementation of the ASE parser class */
|
||||||
|
|
||||||
|
// internal headers
|
||||||
#include "TextureTransform.h"
|
#include "TextureTransform.h"
|
||||||
#include "ASELoader.h"
|
#include "ASELoader.h"
|
||||||
#include "MaterialSystem.h"
|
#include "MaterialSystem.h"
|
||||||
|
|
||||||
#include "../include/DefaultLogger.h"
|
|
||||||
#include "fast_atof.h"
|
#include "fast_atof.h"
|
||||||
|
|
||||||
|
// public ASSIMP headers
|
||||||
|
#include "../include/DefaultLogger.h"
|
||||||
#include "../include/IOStream.h"
|
#include "../include/IOStream.h"
|
||||||
#include "../include/IOSystem.h"
|
#include "../include/IOSystem.h"
|
||||||
#include "../include/aiMesh.h"
|
#include "../include/aiMesh.h"
|
||||||
#include "../include/aiScene.h"
|
#include "../include/aiScene.h"
|
||||||
#include "../include/aiAssert.h"
|
#include "../include/aiAssert.h"
|
||||||
|
|
||||||
|
// boost headers
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
@ -134,7 +136,7 @@ bool Parser::SkipToNextToken()
|
||||||
|
|
||||||
// increase the line number counter if necessary
|
// increase the line number counter if necessary
|
||||||
if (IsLineEnd(me))++this->iLineNumber;
|
if (IsLineEnd(me))++this->iLineNumber;
|
||||||
else if ('*' == me || '}' == me || '{' == me)return true;
|
if ('*' == me || '}' == me || '{' == me)return true;
|
||||||
else if ('\0' == me)return false;
|
else if ('\0' == me)return false;
|
||||||
|
|
||||||
++this->m_szFile;
|
++this->m_szFile;
|
||||||
|
|
|
@ -81,14 +81,10 @@ inline bool SkipLine( const char_t* in, const char_t** out)
|
||||||
{
|
{
|
||||||
while (*in != (char_t)'\r' && *in != (char_t)'\n' && *in != (char_t)'\0')in++;
|
while (*in != (char_t)'\r' && *in != (char_t)'\n' && *in != (char_t)'\0')in++;
|
||||||
|
|
||||||
if (*in == (char_t)'\0')
|
// files are opened in binary mode. Ergo there are both NL and CR
|
||||||
{
|
while (*in == (char_t)'\r' || *in == (char_t)'\n')in++;
|
||||||
*out = in;
|
*out = in;
|
||||||
return false;
|
return *in != (char_t)'\0';
|
||||||
}
|
|
||||||
in++;
|
|
||||||
*out = in;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------
|
||||||
template <class char_t>
|
template <class char_t>
|
||||||
|
@ -98,11 +94,12 @@ inline bool SkipLine( const char_t** inout)
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------
|
||||||
template <class char_t>
|
template <class char_t>
|
||||||
inline void SkipSpacesAndLineEnd( const char_t* in, const char_t** out)
|
inline bool SkipSpacesAndLineEnd( const char_t* in, const char_t** out)
|
||||||
{
|
{
|
||||||
while (*in == (char_t)' ' || *in == (char_t)'\t' ||
|
while (*in == (char_t)' ' || *in == (char_t)'\t' ||
|
||||||
*in == (char_t)'\r' || *in == (char_t)'\n')in++;
|
*in == (char_t)'\r' || *in == (char_t)'\n')in++;
|
||||||
*out = in;
|
*out = in;
|
||||||
|
return *in != '\0';
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------
|
||||||
template <class char_t>
|
template <class char_t>
|
||||||
|
|
|
@ -135,7 +135,7 @@ void PLYImporter::InternReadFile(
|
||||||
{
|
{
|
||||||
szMe += 6;
|
szMe += 6;
|
||||||
SkipLine(szMe,(const char**)&szMe);
|
SkipLine(szMe,(const char**)&szMe);
|
||||||
if(!PLY::DOM::ParseInstance(szMe,&sPlyDom, (unsigned int)fileSize))
|
if(!PLY::DOM::ParseInstance(szMe,&sPlyDom))
|
||||||
{
|
{
|
||||||
delete[] this->mBuffer;
|
delete[] this->mBuffer;
|
||||||
throw new ImportErrorException( "Invalid .ply file: Unable to build DOM (#1)");
|
throw new ImportErrorException( "Invalid .ply file: Unable to build DOM (#1)");
|
||||||
|
@ -156,7 +156,7 @@ void PLYImporter::InternReadFile(
|
||||||
|
|
||||||
// skip the line, parse the rest of the header and build the DOM
|
// skip the line, parse the rest of the header and build the DOM
|
||||||
SkipLine(szMe,(const char**)&szMe);
|
SkipLine(szMe,(const char**)&szMe);
|
||||||
if(!PLY::DOM::ParseInstanceBinary(szMe,&sPlyDom,bIsBE, (unsigned int)fileSize))
|
if(!PLY::DOM::ParseInstanceBinary(szMe,&sPlyDom,bIsBE))
|
||||||
{
|
{
|
||||||
delete[] this->mBuffer;
|
delete[] this->mBuffer;
|
||||||
throw new ImportErrorException( "Invalid .ply file: Unable to build DOM (#2)");
|
throw new ImportErrorException( "Invalid .ply file: Unable to build DOM (#2)");
|
||||||
|
|
|
@ -57,23 +57,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
void ValidateOut(const char* szCur, const char* szMax)
|
|
||||||
{
|
|
||||||
if (szCur > szMax)
|
|
||||||
{
|
|
||||||
throw new ImportErrorException("Buffer overflow. PLY file contains invalid indices");
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
PLY::EDataType PLY::Property::ParseDataType(const char* p_szIn,const char** p_szOut)
|
PLY::EDataType PLY::Property::ParseDataType(const char* p_szIn,const char** p_szOut)
|
||||||
{
|
{
|
||||||
ai_assert(NULL != p_szIn);
|
ai_assert(NULL != p_szIn);
|
||||||
ai_assert(NULL != p_szOut);
|
ai_assert(NULL != p_szOut);
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
|
|
||||||
PLY::EDataType eOut = PLY::EDT_INVALID;
|
PLY::EDataType eOut = PLY::EDT_INVALID;
|
||||||
|
|
||||||
|
@ -156,7 +145,6 @@ PLY::EDataType PLY::Property::ParseDataType(const char* p_szIn,const char** p_sz
|
||||||
DefaultLogger::get()->info("Found unknown data type in PLY file. This is OK");
|
DefaultLogger::get()->info("Found unknown data type in PLY file. This is OK");
|
||||||
}
|
}
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
return eOut;
|
return eOut;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -165,8 +153,6 @@ PLY::ESemantic PLY::Property::ParseSemantic(const char* p_szIn,const char** p_sz
|
||||||
ai_assert(NULL != p_szIn);
|
ai_assert(NULL != p_szIn);
|
||||||
ai_assert(NULL != p_szOut);
|
ai_assert(NULL != p_szOut);
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
|
|
||||||
PLY::ESemantic eOut = PLY::EST_INVALID;
|
PLY::ESemantic eOut = PLY::EST_INVALID;
|
||||||
if (0 == ASSIMP_strincmp(p_szIn,"red",3))
|
if (0 == ASSIMP_strincmp(p_szIn,"red",3))
|
||||||
{
|
{
|
||||||
|
@ -336,7 +322,6 @@ PLY::ESemantic PLY::Property::ParseSemantic(const char* p_szIn,const char** p_sz
|
||||||
{
|
{
|
||||||
eOut = PLY::EST_INVALID;
|
eOut = PLY::EST_INVALID;
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return eOut;
|
return eOut;
|
||||||
}
|
}
|
||||||
|
@ -351,7 +336,6 @@ bool PLY::Property::ParseProperty (const char* p_szIn,
|
||||||
// Forms supported:
|
// Forms supported:
|
||||||
// "property float x"
|
// "property float x"
|
||||||
// "property list uchar int vertex_index"
|
// "property list uchar int vertex_index"
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
|
|
||||||
// skip leading spaces
|
// skip leading spaces
|
||||||
|
@ -373,44 +357,36 @@ bool PLY::Property::ParseProperty (const char* p_szIn,
|
||||||
|
|
||||||
// seems to be a list.
|
// seems to be a list.
|
||||||
p_szIn += 5;
|
p_szIn += 5;
|
||||||
const char* szPass = szMax;
|
if(EDT_INVALID == (pOut->eFirstType = PLY::Property::ParseDataType(p_szIn, &p_szIn)))
|
||||||
if(EDT_INVALID == (pOut->eFirstType = PLY::Property::ParseDataType(p_szIn, &szPass)))
|
|
||||||
{
|
{
|
||||||
// unable to parse list size data type
|
// unable to parse list size data type
|
||||||
SkipLine(p_szIn,&p_szIn);
|
SkipLine(p_szIn,&p_szIn);
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
p_szIn = szPass;
|
|
||||||
if (!SkipSpaces(p_szIn,&p_szIn))return false;
|
if (!SkipSpaces(p_szIn,&p_szIn))return false;
|
||||||
szPass = szMax;
|
if(EDT_INVALID == (pOut->eType = PLY::Property::ParseDataType(p_szIn, &p_szIn)))
|
||||||
if(EDT_INVALID == (pOut->eType = PLY::Property::ParseDataType(p_szIn, &szPass)))
|
|
||||||
{
|
{
|
||||||
// unable to parse list data type
|
// unable to parse list data type
|
||||||
SkipLine(p_szIn,&p_szIn);
|
SkipLine(p_szIn,&p_szIn);
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
p_szIn = szPass;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char* szPass = szMax;
|
if(EDT_INVALID == (pOut->eType = PLY::Property::ParseDataType(p_szIn, &p_szIn)))
|
||||||
if(EDT_INVALID == (pOut->eType = PLY::Property::ParseDataType(p_szIn, &szPass)))
|
|
||||||
{
|
{
|
||||||
// unable to parse data type. Skip the property
|
// unable to parse data type. Skip the property
|
||||||
SkipLine(p_szIn,&p_szIn);
|
SkipLine(p_szIn,&p_szIn);
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
p_szIn = szPass;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SkipSpaces(p_szIn,&p_szIn))return false;
|
if (!SkipSpaces(p_szIn,&p_szIn))return false;
|
||||||
const char* szCur = p_szIn;
|
const char* szCur = p_szIn;
|
||||||
const char* szPass = szMax;
|
pOut->Semantic = PLY::Property::ParseSemantic(p_szIn, &p_szIn);
|
||||||
pOut->Semantic = PLY::Property::ParseSemantic(p_szIn, &szPass);
|
|
||||||
p_szIn = szPass;
|
|
||||||
|
|
||||||
if (PLY::EST_INVALID == pOut->Semantic)
|
if (PLY::EST_INVALID == pOut->Semantic)
|
||||||
{
|
{
|
||||||
|
@ -422,7 +398,6 @@ bool PLY::Property::ParseProperty (const char* p_szIn,
|
||||||
}
|
}
|
||||||
|
|
||||||
SkipSpacesAndLineEnd(p_szIn,&p_szIn);
|
SkipSpacesAndLineEnd(p_szIn,&p_szIn);
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -433,8 +408,6 @@ PLY::EElementSemantic PLY::Element::ParseSemantic(const char* p_szIn,
|
||||||
ai_assert(NULL != p_szIn);
|
ai_assert(NULL != p_szIn);
|
||||||
ai_assert(NULL != p_szOut);
|
ai_assert(NULL != p_szOut);
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
|
|
||||||
PLY::EElementSemantic eOut = PLY::EEST_INVALID;
|
PLY::EElementSemantic eOut = PLY::EEST_INVALID;
|
||||||
if (0 == ASSIMP_strincmp(p_szIn,"vertex",6))
|
if (0 == ASSIMP_strincmp(p_szIn,"vertex",6))
|
||||||
{
|
{
|
||||||
|
@ -474,7 +447,6 @@ PLY::EElementSemantic PLY::Element::ParseSemantic(const char* p_szIn,
|
||||||
{
|
{
|
||||||
eOut = PLY::EEST_INVALID;
|
eOut = PLY::EEST_INVALID;
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return eOut;
|
return eOut;
|
||||||
}
|
}
|
||||||
|
@ -488,7 +460,6 @@ bool PLY::Element::ParseElement (const char* p_szIn,
|
||||||
ai_assert(NULL != pOut);
|
ai_assert(NULL != pOut);
|
||||||
|
|
||||||
// Example format: "element vertex 8"
|
// Example format: "element vertex 8"
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
|
|
||||||
// skip leading spaces
|
// skip leading spaces
|
||||||
|
@ -506,10 +477,7 @@ bool PLY::Element::ParseElement (const char* p_szIn,
|
||||||
|
|
||||||
// parse the semantic of the element
|
// parse the semantic of the element
|
||||||
const char* szCur = p_szIn;
|
const char* szCur = p_szIn;
|
||||||
const char* szPass = szMax;
|
pOut->eSemantic = PLY::Element::ParseSemantic(p_szIn,&p_szIn);
|
||||||
pOut->eSemantic = PLY::Element::ParseSemantic(p_szIn,&szPass);
|
|
||||||
p_szIn = szPass;
|
|
||||||
|
|
||||||
if (PLY::EEST_INVALID == pOut->eSemantic)
|
if (PLY::EEST_INVALID == pOut->eSemantic)
|
||||||
{
|
{
|
||||||
// store the name of the semantic
|
// store the name of the semantic
|
||||||
|
@ -534,14 +502,11 @@ bool PLY::Element::ParseElement (const char* p_szIn,
|
||||||
|
|
||||||
PLY::Property* prop = new PLY::Property();
|
PLY::Property* prop = new PLY::Property();
|
||||||
|
|
||||||
const char* szPass = szMax;
|
if(!PLY::Property::ParseProperty(p_szIn,&p_szIn,prop))break;
|
||||||
if(!PLY::Property::ParseProperty(p_szIn,&szPass,prop))break;
|
|
||||||
p_szIn = szPass;
|
|
||||||
|
|
||||||
// add the property to the property list
|
// add the property to the property list
|
||||||
pOut->alProperties.push_back(prop);
|
pOut->alProperties.push_back(prop);
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -552,7 +517,6 @@ bool PLY::DOM::SkipComments (const char* p_szIn,
|
||||||
ai_assert(NULL != p_szIn);
|
ai_assert(NULL != p_szIn);
|
||||||
ai_assert(NULL != p_szOut);
|
ai_assert(NULL != p_szOut);
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
|
|
||||||
// skip spaces
|
// skip spaces
|
||||||
|
@ -568,7 +532,6 @@ bool PLY::DOM::SkipComments (const char* p_szIn,
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -591,11 +554,8 @@ bool PLY::DOM::ParseHeader (const char* p_szIn,const char** p_szOut)
|
||||||
PLY::DOM::SkipComments(p_szIn,&p_szIn);
|
PLY::DOM::SkipComments(p_szIn,&p_szIn);
|
||||||
|
|
||||||
PLY::Element* out = new PLY::Element();
|
PLY::Element* out = new PLY::Element();
|
||||||
const char* szPass = szMax;
|
if(PLY::Element::ParseElement(p_szIn,&p_szIn,out))
|
||||||
if(PLY::Element::ParseElement(p_szIn,&szPass,out))
|
|
||||||
{
|
{
|
||||||
p_szIn = szPass;
|
|
||||||
|
|
||||||
// add the element to the list of elements
|
// add the element to the list of elements
|
||||||
this->alElements.push_back(out);
|
this->alElements.push_back(out);
|
||||||
}
|
}
|
||||||
|
@ -608,7 +568,6 @@ bool PLY::DOM::ParseHeader (const char* p_szIn,const char** p_szOut)
|
||||||
// ignore unknown header elements
|
// ignore unknown header elements
|
||||||
}
|
}
|
||||||
SkipSpacesAndLineEnd(p_szIn,&p_szIn);
|
SkipSpacesAndLineEnd(p_szIn,&p_szIn);
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
|
|
||||||
DefaultLogger::get()->debug("PLY::DOM::ParseHeader() succeeded");
|
DefaultLogger::get()->debug("PLY::DOM::ParseHeader() succeeded");
|
||||||
|
@ -636,14 +595,10 @@ bool PLY::DOM::ParseElementInstanceLists (
|
||||||
for (;i != this->alElements.end();++i,++a)
|
for (;i != this->alElements.end();++i,++a)
|
||||||
{
|
{
|
||||||
*a = new PLY::ElementInstanceList((*i)); // reserve enough storage
|
*a = new PLY::ElementInstanceList((*i)); // reserve enough storage
|
||||||
|
PLY::ElementInstanceList::ParseInstanceList(p_szIn,&p_szIn,(*i),(*a));
|
||||||
const char* szPass = szMax;
|
|
||||||
PLY::ElementInstanceList::ParseInstanceList(p_szIn,&szPass,(*i),(*a));
|
|
||||||
p_szIn = szPass;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceLists() succeeded");
|
DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceLists() succeeded");
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -657,8 +612,6 @@ bool PLY::DOM::ParseElementInstanceListsBinary (
|
||||||
ai_assert(NULL != p_szOut);
|
ai_assert(NULL != p_szOut);
|
||||||
|
|
||||||
DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceListsBinary() begin");
|
DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceListsBinary() begin");
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
|
|
||||||
this->alElementData.resize(this->alElements.size());
|
this->alElementData.resize(this->alElements.size());
|
||||||
|
@ -670,34 +623,27 @@ bool PLY::DOM::ParseElementInstanceListsBinary (
|
||||||
for (;i != this->alElements.end();++i,++a)
|
for (;i != this->alElements.end();++i,++a)
|
||||||
{
|
{
|
||||||
*a = new PLY::ElementInstanceList((*i)); // reserve enough storage
|
*a = new PLY::ElementInstanceList((*i)); // reserve enough storage
|
||||||
const char* szPass = szMax;
|
PLY::ElementInstanceList::ParseInstanceListBinary(p_szIn,&p_szIn,(*i),(*a),p_bBE);
|
||||||
PLY::ElementInstanceList::ParseInstanceListBinary(p_szIn,&szPass,(*i),(*a),p_bBE);
|
|
||||||
p_szIn = szPass;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceListsBinary() succeeded");
|
DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceListsBinary() succeeded");
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool PLY::DOM::ParseInstanceBinary (const char* p_szIn,DOM* p_pcOut,bool p_bBE,unsigned int iSize)
|
bool PLY::DOM::ParseInstanceBinary (const char* p_szIn,DOM* p_pcOut,bool p_bBE)
|
||||||
{
|
{
|
||||||
ai_assert(NULL != p_szIn);
|
ai_assert(NULL != p_szIn);
|
||||||
ai_assert(NULL != p_pcOut);
|
ai_assert(NULL != p_pcOut);
|
||||||
|
|
||||||
DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() begin");
|
DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() begin");
|
||||||
|
|
||||||
const char* szMax = p_szIn + iSize;
|
if(!p_pcOut->ParseHeader(p_szIn,&p_szIn))
|
||||||
const char* szPass = szMax;
|
|
||||||
if(!p_pcOut->ParseHeader(p_szIn,&szPass))
|
|
||||||
{
|
{
|
||||||
DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() failure");
|
DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() failure");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
p_szIn = szPass;
|
if(!p_pcOut->ParseElementInstanceListsBinary(p_szIn,&p_szIn,p_bBE))
|
||||||
szPass = szMax;
|
|
||||||
if(!p_pcOut->ParseElementInstanceListsBinary(p_szIn,&szPass,p_bBE))
|
|
||||||
{
|
{
|
||||||
DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() failure");
|
DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() failure");
|
||||||
return false;
|
return false;
|
||||||
|
@ -706,23 +652,20 @@ bool PLY::DOM::ParseInstanceBinary (const char* p_szIn,DOM* p_pcOut,bool p_bBE,u
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool PLY::DOM::ParseInstance (const char* p_szIn,DOM* p_pcOut,unsigned int iSize)
|
bool PLY::DOM::ParseInstance (const char* p_szIn,DOM* p_pcOut)
|
||||||
{
|
{
|
||||||
ai_assert(NULL != p_szIn);
|
ai_assert(NULL != p_szIn);
|
||||||
ai_assert(NULL != p_pcOut);
|
ai_assert(NULL != p_pcOut);
|
||||||
|
|
||||||
DefaultLogger::get()->debug("PLY::DOM::ParseInstance() begin");
|
DefaultLogger::get()->debug("PLY::DOM::ParseInstance() begin");
|
||||||
|
|
||||||
const char* szMax = p_szIn + iSize;
|
|
||||||
const char* szPass = szMax;
|
if(!p_pcOut->ParseHeader(p_szIn,&p_szIn))
|
||||||
if(!p_pcOut->ParseHeader(p_szIn,&szPass))
|
|
||||||
{
|
{
|
||||||
DefaultLogger::get()->debug("PLY::DOM::ParseInstance() failure");
|
DefaultLogger::get()->debug("PLY::DOM::ParseInstance() failure");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
p_szIn = szPass;
|
if(!p_pcOut->ParseElementInstanceLists(p_szIn,&p_szIn))
|
||||||
szPass = szMax;
|
|
||||||
if(!p_pcOut->ParseElementInstanceLists(p_szIn,&szPass))
|
|
||||||
{
|
{
|
||||||
DefaultLogger::get()->debug("PLY::DOM::ParseInstance() failure");
|
DefaultLogger::get()->debug("PLY::DOM::ParseInstance() failure");
|
||||||
return false;
|
return false;
|
||||||
|
@ -763,15 +706,11 @@ bool PLY::ElementInstanceList::ParseInstanceList (
|
||||||
PLY::DOM::SkipComments(p_szIn,&p_szIn);
|
PLY::DOM::SkipComments(p_szIn,&p_szIn);
|
||||||
|
|
||||||
PLY::ElementInstance* out = new PLY::ElementInstance();
|
PLY::ElementInstance* out = new PLY::ElementInstance();
|
||||||
|
PLY::ElementInstance::ParseInstance(p_szIn, &p_szIn,pcElement, out);
|
||||||
const char* szPass = szMax;
|
|
||||||
PLY::ElementInstance::ParseInstance(p_szIn, &szPass,pcElement, out);
|
|
||||||
p_szIn = szPass;
|
|
||||||
// add it to the list
|
// add it to the list
|
||||||
p_pcOut->alInstances[i] = out;
|
p_pcOut->alInstances[i] = out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -788,9 +727,6 @@ bool PLY::ElementInstanceList::ParseInstanceListBinary (
|
||||||
ai_assert(NULL != pcElement);
|
ai_assert(NULL != pcElement);
|
||||||
ai_assert(NULL != p_pcOut);
|
ai_assert(NULL != p_pcOut);
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
|
||||||
|
|
||||||
// we can add special handling code for unknown element semantics since
|
// we can add special handling code for unknown element semantics since
|
||||||
// we can't skip it as a whole block (we don't know its exact size
|
// we can't skip it as a whole block (we don't know its exact size
|
||||||
// due to the fact that lists could be contained in the property list
|
// due to the fact that lists could be contained in the property list
|
||||||
|
@ -798,13 +734,10 @@ bool PLY::ElementInstanceList::ParseInstanceListBinary (
|
||||||
for (unsigned int i = 0; i < pcElement->NumOccur;++i)
|
for (unsigned int i = 0; i < pcElement->NumOccur;++i)
|
||||||
{
|
{
|
||||||
PLY::ElementInstance* out = new PLY::ElementInstance();
|
PLY::ElementInstance* out = new PLY::ElementInstance();
|
||||||
const char* szPass = szMax;
|
|
||||||
PLY::ElementInstance::ParseInstanceBinary(p_szIn, &p_szIn,pcElement, out, p_bBE);
|
PLY::ElementInstance::ParseInstanceBinary(p_szIn, &p_szIn,pcElement, out, p_bBE);
|
||||||
p_szIn = szPass;
|
|
||||||
// add it to the list
|
// add it to the list
|
||||||
p_pcOut->alInstances[i] = out;
|
p_pcOut->alInstances[i] = out;
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -825,15 +758,11 @@ bool PLY::ElementInstance::ParseInstance (
|
||||||
// allocate enough storage
|
// allocate enough storage
|
||||||
p_pcOut->alProperties.resize(pcElement->alProperties.size());
|
p_pcOut->alProperties.resize(pcElement->alProperties.size());
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
|
||||||
|
|
||||||
std::vector<PLY::PropertyInstance>::iterator i = p_pcOut->alProperties.begin();
|
std::vector<PLY::PropertyInstance>::iterator i = p_pcOut->alProperties.begin();
|
||||||
std::vector<PLY::Property*>::const_iterator a = pcElement->alProperties.begin();
|
std::vector<PLY::Property*>::const_iterator a = pcElement->alProperties.begin();
|
||||||
for (;i != p_pcOut->alProperties.end();++i,++a)
|
for (;i != p_pcOut->alProperties.end();++i,++a)
|
||||||
{
|
{
|
||||||
const char* szPass = szMax;
|
if(!(PLY::PropertyInstance::ParseInstance(p_szIn, &p_szIn,(*a),&(*i))))
|
||||||
if(!(PLY::PropertyInstance::ParseInstance(p_szIn, &szPass,(*a),&(*i))))
|
|
||||||
{
|
{
|
||||||
DefaultLogger::get()->warn("Unable to parse property instance. "
|
DefaultLogger::get()->warn("Unable to parse property instance. "
|
||||||
"Skipping this element instance");
|
"Skipping this element instance");
|
||||||
|
@ -844,9 +773,7 @@ bool PLY::ElementInstance::ParseInstance (
|
||||||
PLY::PropertyInstance::ValueUnion v = PLY::PropertyInstance::DefaultValue((*a)->eType);
|
PLY::PropertyInstance::ValueUnion v = PLY::PropertyInstance::DefaultValue((*a)->eType);
|
||||||
(*i).avList.push_back(v);
|
(*i).avList.push_back(v);
|
||||||
}
|
}
|
||||||
p_szIn = szPass;
|
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -863,9 +790,6 @@ bool PLY::ElementInstance::ParseInstanceBinary (
|
||||||
ai_assert(NULL != pcElement);
|
ai_assert(NULL != pcElement);
|
||||||
ai_assert(NULL != p_pcOut);
|
ai_assert(NULL != p_pcOut);
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
|
||||||
|
|
||||||
// allocate enough storage
|
// allocate enough storage
|
||||||
p_pcOut->alProperties.resize(pcElement->alProperties.size());
|
p_pcOut->alProperties.resize(pcElement->alProperties.size());
|
||||||
|
|
||||||
|
@ -873,8 +797,7 @@ bool PLY::ElementInstance::ParseInstanceBinary (
|
||||||
std::vector<PLY::Property*>::const_iterator a = pcElement->alProperties.begin();
|
std::vector<PLY::Property*>::const_iterator a = pcElement->alProperties.begin();
|
||||||
for (;i != p_pcOut->alProperties.end();++i,++a)
|
for (;i != p_pcOut->alProperties.end();++i,++a)
|
||||||
{
|
{
|
||||||
const char* szPass = szMax;
|
if(!(PLY::PropertyInstance::ParseInstanceBinary(p_szIn, &p_szIn,(*a),&(*i),p_bBE)))
|
||||||
if(!(PLY::PropertyInstance::ParseInstanceBinary(p_szIn, &szPass,(*a),&(*i),p_bBE)))
|
|
||||||
{
|
{
|
||||||
DefaultLogger::get()->warn("Unable to parse binary property instance. "
|
DefaultLogger::get()->warn("Unable to parse binary property instance. "
|
||||||
"Skipping this element instance");
|
"Skipping this element instance");
|
||||||
|
@ -882,9 +805,7 @@ bool PLY::ElementInstance::ParseInstanceBinary (
|
||||||
PLY::PropertyInstance::ValueUnion v = PLY::PropertyInstance::DefaultValue((*a)->eType);
|
PLY::PropertyInstance::ValueUnion v = PLY::PropertyInstance::DefaultValue((*a)->eType);
|
||||||
(*i).avList.push_back(v);
|
(*i).avList.push_back(v);
|
||||||
}
|
}
|
||||||
p_szIn = szPass;
|
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -897,7 +818,6 @@ bool PLY::PropertyInstance::ParseInstance (const char* p_szIn,const char** p_szO
|
||||||
ai_assert(NULL != prop);
|
ai_assert(NULL != prop);
|
||||||
ai_assert(NULL != p_pcOut);
|
ai_assert(NULL != p_pcOut);
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
|
|
||||||
// skip spaces at the beginning
|
// skip spaces at the beginning
|
||||||
|
@ -907,10 +827,7 @@ bool PLY::PropertyInstance::ParseInstance (const char* p_szIn,const char** p_szO
|
||||||
{
|
{
|
||||||
// parse the number of elements in the list
|
// parse the number of elements in the list
|
||||||
PLY::PropertyInstance::ValueUnion v;
|
PLY::PropertyInstance::ValueUnion v;
|
||||||
|
PLY::PropertyInstance::ParseValue(p_szIn, &p_szIn,prop->eFirstType,&v);
|
||||||
const char* szPass = szMax;
|
|
||||||
PLY::PropertyInstance::ParseValue(p_szIn, &szPass,prop->eFirstType,&v);
|
|
||||||
p_szIn = szPass;
|
|
||||||
|
|
||||||
// convert to unsigned int
|
// convert to unsigned int
|
||||||
unsigned int iNum = PLY::PropertyInstance::ConvertTo<unsigned int>(v,prop->eFirstType);
|
unsigned int iNum = PLY::PropertyInstance::ConvertTo<unsigned int>(v,prop->eFirstType);
|
||||||
|
@ -919,10 +836,7 @@ bool PLY::PropertyInstance::ParseInstance (const char* p_szIn,const char** p_szO
|
||||||
for (unsigned int i = 0; i < iNum;++i)
|
for (unsigned int i = 0; i < iNum;++i)
|
||||||
{
|
{
|
||||||
if (!SkipSpaces(p_szIn, &p_szIn))return false;
|
if (!SkipSpaces(p_szIn, &p_szIn))return false;
|
||||||
|
PLY::PropertyInstance::ParseValue(p_szIn, &p_szIn,prop->eType,&v);
|
||||||
const char* szPass = szMax;
|
|
||||||
PLY::PropertyInstance::ParseValue(p_szIn, &szPass,prop->eType,&v);
|
|
||||||
p_szIn = szPass;
|
|
||||||
p_pcOut->avList.push_back(v);
|
p_pcOut->avList.push_back(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -931,13 +845,10 @@ bool PLY::PropertyInstance::ParseInstance (const char* p_szIn,const char** p_szO
|
||||||
// parse the property
|
// parse the property
|
||||||
PLY::PropertyInstance::ValueUnion v;
|
PLY::PropertyInstance::ValueUnion v;
|
||||||
|
|
||||||
const char* szPass = szMax;
|
PLY::PropertyInstance::ParseValue(p_szIn, &p_szIn,prop->eType,&v);
|
||||||
PLY::PropertyInstance::ParseValue(p_szIn, &szPass,prop->eType,&v);
|
|
||||||
p_szIn = szPass;
|
|
||||||
p_pcOut->avList.push_back(v);
|
p_pcOut->avList.push_back(v);
|
||||||
}
|
}
|
||||||
SkipSpacesAndLineEnd(p_szIn, &p_szIn);
|
SkipSpacesAndLineEnd(p_szIn, &p_szIn);
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -950,16 +861,11 @@ bool PLY::PropertyInstance::ParseInstanceBinary (const char* p_szIn,const char**
|
||||||
ai_assert(NULL != prop);
|
ai_assert(NULL != prop);
|
||||||
ai_assert(NULL != p_pcOut);
|
ai_assert(NULL != p_pcOut);
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
|
||||||
|
|
||||||
if (prop->bIsList)
|
if (prop->bIsList)
|
||||||
{
|
{
|
||||||
// parse the number of elements in the list
|
// parse the number of elements in the list
|
||||||
PLY::PropertyInstance::ValueUnion v;
|
PLY::PropertyInstance::ValueUnion v;
|
||||||
const char* szPass = szMax;
|
PLY::PropertyInstance::ParseValueBinary(p_szIn, &p_szIn,prop->eFirstType,&v,p_bBE);
|
||||||
PLY::PropertyInstance::ParseValueBinary(p_szIn, &szPass,prop->eFirstType,&v,p_bBE);
|
|
||||||
p_szIn = szPass;
|
|
||||||
|
|
||||||
// convert to unsigned int
|
// convert to unsigned int
|
||||||
unsigned int iNum = PLY::PropertyInstance::ConvertTo<unsigned int>(v,prop->eFirstType);
|
unsigned int iNum = PLY::PropertyInstance::ConvertTo<unsigned int>(v,prop->eFirstType);
|
||||||
|
@ -967,9 +873,7 @@ bool PLY::PropertyInstance::ParseInstanceBinary (const char* p_szIn,const char**
|
||||||
// parse all list elements
|
// parse all list elements
|
||||||
for (unsigned int i = 0; i < iNum;++i)
|
for (unsigned int i = 0; i < iNum;++i)
|
||||||
{
|
{
|
||||||
const char* szPass = szMax;
|
PLY::PropertyInstance::ParseValueBinary(p_szIn, &p_szIn,prop->eType,&v,p_bBE);
|
||||||
PLY::PropertyInstance::ParseValueBinary(p_szIn, &szPass,prop->eType,&v,p_bBE);
|
|
||||||
p_szIn = szPass;
|
|
||||||
p_pcOut->avList.push_back(v);
|
p_pcOut->avList.push_back(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -977,12 +881,9 @@ bool PLY::PropertyInstance::ParseInstanceBinary (const char* p_szIn,const char**
|
||||||
{
|
{
|
||||||
// parse the property
|
// parse the property
|
||||||
PLY::PropertyInstance::ValueUnion v;
|
PLY::PropertyInstance::ValueUnion v;
|
||||||
const char* szPass = szMax;
|
PLY::PropertyInstance::ParseValueBinary(p_szIn, &p_szIn,prop->eType,&v,p_bBE);
|
||||||
PLY::PropertyInstance::ParseValueBinary(p_szIn, &szPass,prop->eType,&v,p_bBE);
|
|
||||||
p_szIn = szPass;
|
|
||||||
p_pcOut->avList.push_back(v);
|
p_pcOut->avList.push_back(v);
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1013,9 +914,6 @@ bool PLY::PropertyInstance::ParseValue(const char* p_szIn,const char** p_szOut,
|
||||||
ai_assert(NULL != p_szOut);
|
ai_assert(NULL != p_szOut);
|
||||||
ai_assert(NULL != out);
|
ai_assert(NULL != out);
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
|
||||||
|
|
||||||
switch (eType)
|
switch (eType)
|
||||||
{
|
{
|
||||||
case EDT_UInt:
|
case EDT_UInt:
|
||||||
|
@ -1060,9 +958,9 @@ bool PLY::PropertyInstance::ParseValue(const char* p_szIn,const char** p_szOut,
|
||||||
out->fDouble = (double)f;
|
out->fDouble = (double)f;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
*p_szOut = p_szIn;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1078,9 +976,6 @@ bool PLY::PropertyInstance::ParseValueBinary(
|
||||||
ai_assert(NULL != p_szOut);
|
ai_assert(NULL != p_szOut);
|
||||||
ai_assert(NULL != out);
|
ai_assert(NULL != out);
|
||||||
|
|
||||||
const char* szMax = *p_szOut;
|
|
||||||
*p_szOut = p_szIn;
|
|
||||||
|
|
||||||
switch (eType)
|
switch (eType)
|
||||||
{
|
{
|
||||||
case EDT_UInt:
|
case EDT_UInt:
|
||||||
|
@ -1163,9 +1058,9 @@ bool PLY::PropertyInstance::ParseValueBinary(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
*p_szOut = p_szIn;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ValidateOut(p_szIn,szMax);
|
|
||||||
*p_szOut = p_szIn;
|
*p_szOut = p_szIn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -481,9 +481,9 @@ public:
|
||||||
|
|
||||||
//! Parse the DOM for a PLY file. The input string is assumed
|
//! Parse the DOM for a PLY file. The input string is assumed
|
||||||
//! to be terminated with zero
|
//! to be terminated with zero
|
||||||
static bool ParseInstance (const char* p_szIn,DOM* p_pcOut, unsigned int iLen);
|
static bool ParseInstance (const char* p_szIn,DOM* p_pcOut);
|
||||||
static bool ParseInstanceBinary (const char* p_szIn,
|
static bool ParseInstanceBinary (const char* p_szIn,
|
||||||
DOM* p_pcOut,bool p_bBE, unsigned int iLen);
|
DOM* p_pcOut,bool p_bBE);
|
||||||
|
|
||||||
//! Skip all comment lines after this
|
//! Skip all comment lines after this
|
||||||
static bool SkipComments (const char* p_szIn,const char** p_szOut);
|
static bool SkipComments (const char* p_szIn,const char** p_szOut);
|
||||||
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
/*
|
||||||
|
Open Asset Import Library (ASSIMP)
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright (c) 2006-2008, ASSIMP Development Team
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use of this software in source and binary forms,
|
||||||
|
with or without modification, are permitted provided that the
|
||||||
|
following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer in the documentation and/or other
|
||||||
|
materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the ASSIMP team, nor the names of its
|
||||||
|
contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior
|
||||||
|
written permission of the ASSIMP Development Team.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @file Defines a helper class, "CommentRemover", which can be
|
||||||
|
* used to remove comments (single and multi line) from a text file.
|
||||||
|
*/
|
||||||
|
#include "../include/aiTypes.h"
|
||||||
|
#include "../include/DefaultLogger.h"
|
||||||
|
#include "../include/aiAssert.h"
|
||||||
|
|
||||||
|
#include "RemoveComments.h"
|
||||||
|
|
||||||
|
namespace Assimp
|
||||||
|
{
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CommentRemover::RemoveLineComments(const char* szComment,
|
||||||
|
char* szBuffer, char chReplacement /* = ' ' */)
|
||||||
|
{
|
||||||
|
// validate parameters
|
||||||
|
ai_assert(NULL != szComment && NULL != szBuffer && *szComment);
|
||||||
|
|
||||||
|
while (*szBuffer)
|
||||||
|
{
|
||||||
|
if (*szBuffer == *szComment)
|
||||||
|
{
|
||||||
|
if (0 == ::strcmp(szBuffer+1,szComment+1))
|
||||||
|
{
|
||||||
|
while (*szBuffer != '\r' && *szBuffer != '\n' && *szBuffer)
|
||||||
|
*szBuffer++ = chReplacement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
++szBuffer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CommentRemover::RemoveMultiLineComments(const char* szCommentStart,
|
||||||
|
const char* szCommentEnd,char* szBuffer,
|
||||||
|
char chReplacement)
|
||||||
|
{
|
||||||
|
// validate parameters
|
||||||
|
ai_assert(NULL != szCommentStart && NULL != szCommentEnd &&
|
||||||
|
NULL != szBuffer && '\0' != *szCommentStart && '\0' != *szCommentEnd);
|
||||||
|
|
||||||
|
const size_t len = ::strlen(szCommentEnd);
|
||||||
|
|
||||||
|
while (*szBuffer)
|
||||||
|
{
|
||||||
|
if (*szBuffer == *szCommentStart)
|
||||||
|
{
|
||||||
|
if (0 == ::strcmp(szBuffer+1,szCommentStart+1))
|
||||||
|
{
|
||||||
|
while (*szBuffer)
|
||||||
|
{
|
||||||
|
if (*szBuffer == *szCommentEnd)
|
||||||
|
{
|
||||||
|
if (0 == ::strcmp(szBuffer+1,szCommentEnd+1))
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < len;++i)
|
||||||
|
*szBuffer++ = chReplacement;
|
||||||
|
goto __continue_outer; // WUHHHAAAAHHAA!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*szBuffer++ = chReplacement;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
++szBuffer;
|
||||||
|
__continue_outer:
|
||||||
|
int i = 4; // NOP dummy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}; // !! Assimp
|
|
@ -0,0 +1,89 @@
|
||||||
|
/*
|
||||||
|
Open Asset Import Library (ASSIMP)
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright (c) 2006-2008, ASSIMP Development Team
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use of this software in source and binary forms,
|
||||||
|
with or without modification, are permitted provided that the
|
||||||
|
following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer in the documentation and/or other
|
||||||
|
materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the ASSIMP team, nor the names of its
|
||||||
|
contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior
|
||||||
|
written permission of the ASSIMP Development Team.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @file Declares a helper class, "CommentRemover", which can be
|
||||||
|
* used to remove comments (single and multi line) from a text file.
|
||||||
|
*/
|
||||||
|
#ifndef AI_REMOVE_COMMENTS_H_INC
|
||||||
|
#define AI_REMOVE_COMMENTS_H_INC
|
||||||
|
|
||||||
|
#include "../include/aiAssert.h"
|
||||||
|
|
||||||
|
namespace Assimp
|
||||||
|
{
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
/** \brief Helper class to remove single and multi line comments from a file
|
||||||
|
*
|
||||||
|
* Some mesh formats like MD5 have comments that are quite similar
|
||||||
|
* to those in C or C++ so this code has been moved to a separate
|
||||||
|
* module.
|
||||||
|
*/
|
||||||
|
class CommentRemover
|
||||||
|
{
|
||||||
|
// class cannot be instanced
|
||||||
|
CommentRemover() {}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! Remove single-line comments. The end of a line is
|
||||||
|
//! expected to be either NL or CR or NLCR.
|
||||||
|
//! \param szComment The start sequence of the comment, e.g. "//"
|
||||||
|
//! \param szBuffer Buffer to work with
|
||||||
|
//! \param chReplacement Character to be used as replacement
|
||||||
|
//! for commented lines. By default this is ' '
|
||||||
|
static void RemoveLineComments(const char* szComment,
|
||||||
|
char* szBuffer, char chReplacement = ' ');
|
||||||
|
|
||||||
|
//! Remove multi-line comments. The end of a line is
|
||||||
|
//! expected to be either NL or CR or NLCR. Multi-line comments
|
||||||
|
//! may not be nested (as in C).
|
||||||
|
//! \param szCommentStart The start sequence of the comment, e.g. "/*"
|
||||||
|
//! \param szCommentEnd The end sequence of the comment, e.g. "*/"
|
||||||
|
//! \param szBuffer Buffer to work with
|
||||||
|
//! \param chReplacement Character to be used as replacement
|
||||||
|
//! for commented lines. By default this is ' '
|
||||||
|
static void RemoveMultiLineComments(const char* szCommentStart,
|
||||||
|
const char* szCommentEnd,char* szBuffer,
|
||||||
|
char chReplacement = ' ');
|
||||||
|
};
|
||||||
|
} // ! Assimp
|
||||||
|
|
||||||
|
#endif // !! AI_REMOVE_COMMENTS_H_INC
|
|
@ -41,11 +41,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
/** @file Implementation of the SMD importer class */
|
/** @file Implementation of the SMD importer class */
|
||||||
|
|
||||||
|
// internal headers
|
||||||
#include "MaterialSystem.h"
|
#include "MaterialSystem.h"
|
||||||
#include "SMDLoader.h"
|
#include "SMDLoader.h"
|
||||||
#include "StringComparison.h"
|
#include "StringComparison.h"
|
||||||
#include "fast_atof.h"
|
#include "fast_atof.h"
|
||||||
|
|
||||||
|
// public headers
|
||||||
#include "../include/DefaultLogger.h"
|
#include "../include/DefaultLogger.h"
|
||||||
#include "../include/IOStream.h"
|
#include "../include/IOStream.h"
|
||||||
#include "../include/IOSystem.h"
|
#include "../include/IOSystem.h"
|
||||||
|
@ -53,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "../include/aiScene.h"
|
#include "../include/aiScene.h"
|
||||||
#include "../include/aiAssert.h"
|
#include "../include/aiAssert.h"
|
||||||
|
|
||||||
|
// boost headers
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
@ -105,7 +108,7 @@ bool SMDImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler) const
|
||||||
void SMDImporter::InternReadFile(
|
void SMDImporter::InternReadFile(
|
||||||
const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
|
const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
|
||||||
{
|
{
|
||||||
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile));
|
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rt"));
|
||||||
|
|
||||||
// Check whether we can read from the file
|
// Check whether we can read from the file
|
||||||
if( file.get() == NULL)
|
if( file.get() == NULL)
|
||||||
|
@ -123,6 +126,9 @@ void SMDImporter::InternReadFile(
|
||||||
this->bHasUVs = true;
|
this->bHasUVs = true;
|
||||||
this->iLineNumber = 1;
|
this->iLineNumber = 1;
|
||||||
|
|
||||||
|
// append a terminal 0
|
||||||
|
this->mBuffer[this->iFileSize] = '\0';
|
||||||
|
|
||||||
// reserve enough space for ... hm ... 10 textures
|
// reserve enough space for ... hm ... 10 textures
|
||||||
this->aszTextures.reserve(10);
|
this->aszTextures.reserve(10);
|
||||||
|
|
||||||
|
@ -137,15 +143,49 @@ void SMDImporter::InternReadFile(
|
||||||
// parse the file ...
|
// parse the file ...
|
||||||
this->ParseFile();
|
this->ParseFile();
|
||||||
|
|
||||||
|
// if there are no triangles it seems to be an animation SMD,
|
||||||
|
// containing only the animation skeleton.
|
||||||
|
if (this->asTriangles.empty())
|
||||||
|
{
|
||||||
|
if (this->asBones.empty())
|
||||||
|
{
|
||||||
|
throw new ImportErrorException("No triangles and no bones have "
|
||||||
|
"been found in the file. This file seems to be invalid.");
|
||||||
|
}
|
||||||
|
// set the flag in the scene structure which indicates
|
||||||
|
// that there is nothing than an animation skeleton
|
||||||
|
pScene->mFlags |= AI_SCENE_FLAGS_ANIM_SKELETON_ONLY;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this->asBones.empty())
|
||||||
|
{
|
||||||
|
// check whether all bones have been initialized
|
||||||
|
for (std::vector<SMD::Bone>::const_iterator
|
||||||
|
i = this->asBones.begin();
|
||||||
|
i != this->asBones.end();++i)
|
||||||
|
{
|
||||||
|
if (!(*i).mName.length())
|
||||||
|
{
|
||||||
|
DefaultLogger::get()->warn("Not all bones have been initialized");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// now fix invalid time values and make sure the animation starts at frame 0
|
// now fix invalid time values and make sure the animation starts at frame 0
|
||||||
this->FixTimeValues();
|
this->FixTimeValues();
|
||||||
|
|
||||||
// compute absolute bone transformation matrices
|
// compute absolute bone transformation matrices
|
||||||
this->ComputeAbsoluteBoneTransformations();
|
this->ComputeAbsoluteBoneTransformations();
|
||||||
|
}
|
||||||
|
if (!(pScene->mFlags & AI_SCENE_FLAGS_ANIM_SKELETON_ONLY))
|
||||||
|
{
|
||||||
// create output meshes
|
// create output meshes
|
||||||
this->CreateOutputMeshes();
|
this->CreateOutputMeshes();
|
||||||
|
|
||||||
|
// build an output material list
|
||||||
|
this->CreateOutputMaterials();
|
||||||
|
}
|
||||||
|
|
||||||
// build the output animation
|
// build the output animation
|
||||||
this->CreateOutputAnimations();
|
this->CreateOutputAnimations();
|
||||||
|
|
||||||
|
@ -310,10 +350,9 @@ void SMDImporter::CreateOutputMeshes()
|
||||||
for (unsigned int iVert = 0; iVert < 3;++iVert)
|
for (unsigned int iVert = 0; iVert < 3;++iVert)
|
||||||
{
|
{
|
||||||
float fSum = 0.0f;
|
float fSum = 0.0f;
|
||||||
for (unsigned int iBone = 0;iBone < face.avVertices[0].aiBoneLinks.size();++iBone)
|
for (unsigned int iBone = 0;iBone < face.avVertices[iVert].aiBoneLinks.size();++iBone)
|
||||||
{
|
{
|
||||||
TempWeightListEntry& pairval = face.avVertices[iVert].aiBoneLinks[iBone];
|
TempWeightListEntry& pairval = face.avVertices[iVert].aiBoneLinks[iBone];
|
||||||
|
|
||||||
if (pairval.first >= this->asBones.size())
|
if (pairval.first >= this->asBones.size())
|
||||||
{
|
{
|
||||||
DefaultLogger::get()->error("[SMD/VTA] Bone index overflow. "
|
DefaultLogger::get()->error("[SMD/VTA] Bone index overflow. "
|
||||||
|
@ -322,17 +361,36 @@ void SMDImporter::CreateOutputMeshes()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
aaiBones[pairval.first].push_back(TempWeightListEntry(iNum,pairval.second));
|
aaiBones[pairval.first].push_back(TempWeightListEntry(iNum,pairval.second));
|
||||||
|
|
||||||
fSum += pairval.second;
|
fSum += pairval.second;
|
||||||
}
|
}
|
||||||
// if the sum of all vertex weights is not 1.0 we must assign
|
// if the sum of all vertex weights is not 1.0 we must assign
|
||||||
// the rest to the vertex' parent node. Well, at least the doc says
|
// the rest to the vertex' parent node. Well, at least the doc says
|
||||||
// we should ...
|
// we should ...
|
||||||
if (fSum <= 0.995f)
|
if (fSum <= 1.0f)
|
||||||
|
{
|
||||||
|
if (face.avVertices[iVert].iParentNode >= this->asBones.size())
|
||||||
|
{
|
||||||
|
DefaultLogger::get()->error("[SMD/VTA] Bone index overflow. "
|
||||||
|
"The index of the vertex parent bone is invalid. "
|
||||||
|
"The remaining weights will be normalized to 1.0");
|
||||||
|
|
||||||
|
if (fSum)
|
||||||
|
{
|
||||||
|
fSum = 1 / fSum;
|
||||||
|
for (unsigned int iBone = 0;iBone < face.avVertices[iVert].aiBoneLinks.size();++iBone)
|
||||||
|
{
|
||||||
|
TempWeightListEntry& pairval = face.avVertices[iVert].aiBoneLinks[iBone];
|
||||||
|
if (pairval.first >= this->asBones.size())continue;
|
||||||
|
aaiBones[pairval.first].back().second *= fSum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
aaiBones[face.avVertices[iVert].iParentNode].push_back(
|
aaiBones[face.avVertices[iVert].iParentNode].push_back(
|
||||||
TempWeightListEntry(iNum,1.0f-fSum));
|
TempWeightListEntry(iNum,1.0f-fSum));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pcMesh->mFaces[iFace].mIndices[iVert] = iNum++;
|
pcMesh->mFaces[iFace].mIndices[iVert] = iNum++;
|
||||||
}
|
}
|
||||||
|
@ -375,7 +433,7 @@ void SMDImporter::CreateOutputMeshes()
|
||||||
// add bone child nodes
|
// add bone child nodes
|
||||||
void SMDImporter::AddBoneChildren(aiNode* pcNode, uint32_t iParent)
|
void SMDImporter::AddBoneChildren(aiNode* pcNode, uint32_t iParent)
|
||||||
{
|
{
|
||||||
ai_assert(NULL != pcNode && 0 != pcNode->mNumChildren && NULL != pcNode->mChildren);
|
ai_assert(NULL != pcNode && 0 == pcNode->mNumChildren && NULL == pcNode->mChildren);
|
||||||
|
|
||||||
// first count ...
|
// first count ...
|
||||||
for (unsigned int i = 0; i < this->asBones.size();++i)
|
for (unsigned int i = 0; i < this->asBones.size();++i)
|
||||||
|
@ -399,42 +457,72 @@ void SMDImporter::AddBoneChildren(aiNode* pcNode, uint32_t iParent)
|
||||||
|
|
||||||
// store the local transformation matrix of the bind pose
|
// store the local transformation matrix of the bind pose
|
||||||
pc->mTransformation = bone.sAnim.asKeys[bone.sAnim.iFirstTimeKey].matrix;
|
pc->mTransformation = bone.sAnim.asKeys[bone.sAnim.iFirstTimeKey].matrix;
|
||||||
|
pc->mParent = pcNode;
|
||||||
|
|
||||||
|
// add children to this node, too
|
||||||
|
AddBoneChildren(pc,i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// create output nodes
|
// create output nodes
|
||||||
void SMDImporter::CreateOutputNodes()
|
void SMDImporter::CreateOutputNodes()
|
||||||
{
|
{
|
||||||
// create one root node that renders all meshes
|
|
||||||
this->pScene->mRootNode = new aiNode();
|
this->pScene->mRootNode = new aiNode();
|
||||||
::strcpy(this->pScene->mRootNode->mName.data, "SMD_root");
|
if (!(this->pScene->mFlags & AI_SCENE_FLAGS_ANIM_SKELETON_ONLY))
|
||||||
this->pScene->mRootNode->mName.length = 8;
|
{
|
||||||
|
// create one root node that renders all meshes
|
||||||
this->pScene->mRootNode->mNumMeshes = this->pScene->mNumMeshes;
|
this->pScene->mRootNode->mNumMeshes = this->pScene->mNumMeshes;
|
||||||
this->pScene->mRootNode->mMeshes = new unsigned int[this->pScene->mNumMeshes];
|
this->pScene->mRootNode->mMeshes = new unsigned int[this->pScene->mNumMeshes];
|
||||||
for (unsigned int i = 0; i < this->pScene->mNumMeshes;++i)
|
for (unsigned int i = 0; i < this->pScene->mNumMeshes;++i)
|
||||||
this->pScene->mRootNode->mMeshes[i] = i;
|
this->pScene->mRootNode->mMeshes[i] = i;
|
||||||
|
}
|
||||||
|
|
||||||
// now add all bones as dummy sub nodes to the graph
|
// now add all bones as dummy sub nodes to the graph
|
||||||
this->AddBoneChildren(this->pScene->mRootNode,(uint32_t)-1);
|
this->AddBoneChildren(this->pScene->mRootNode,(uint32_t)-1);
|
||||||
|
|
||||||
|
// if we have only one bone we can even remove the root node
|
||||||
|
if (this->pScene->mFlags & AI_SCENE_FLAGS_ANIM_SKELETON_ONLY &&
|
||||||
|
1 == this->pScene->mRootNode->mNumChildren)
|
||||||
|
{
|
||||||
|
aiNode* pcOldRoot = this->pScene->mRootNode;
|
||||||
|
this->pScene->mRootNode = pcOldRoot->mChildren[0];
|
||||||
|
pcOldRoot->mChildren[0] = NULL;
|
||||||
|
delete pcOldRoot;
|
||||||
|
|
||||||
|
this->pScene->mRootNode->mParent = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
::strcpy(this->pScene->mRootNode->mName.data, "<SMD_root>");
|
||||||
|
this->pScene->mRootNode->mName.length = 10;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// create output animations
|
// create output animations
|
||||||
void SMDImporter::CreateOutputAnimations()
|
void SMDImporter::CreateOutputAnimations()
|
||||||
{
|
{
|
||||||
|
unsigned int iNumBones = 0;
|
||||||
|
for (std::vector<SMD::Bone>::const_iterator
|
||||||
|
i = this->asBones.begin();
|
||||||
|
i != this->asBones.end();++i)
|
||||||
|
{
|
||||||
|
if ((*i).bIsUsed)++iNumBones;
|
||||||
|
}
|
||||||
|
if (!iNumBones)
|
||||||
|
{
|
||||||
|
// just make sure this case doesn't occur ... (it could occur
|
||||||
|
// if the file was invalid)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this->pScene->mNumAnimations = 1;
|
this->pScene->mNumAnimations = 1;
|
||||||
this->pScene->mAnimations = new aiAnimation*[1];
|
this->pScene->mAnimations = new aiAnimation*[1];
|
||||||
aiAnimation*& anim = this->pScene->mAnimations[0] = new aiAnimation();
|
aiAnimation*& anim = this->pScene->mAnimations[0] = new aiAnimation();
|
||||||
|
|
||||||
anim->mDuration = this->dLengthOfAnim;
|
anim->mDuration = this->dLengthOfAnim;
|
||||||
|
anim->mNumBones = iNumBones;
|
||||||
anim->mTicksPerSecond = 25.0; // FIXME: is this correct?
|
anim->mTicksPerSecond = 25.0; // FIXME: is this correct?
|
||||||
|
|
||||||
// this->pScene->mAnimations[0]->mNumBones = 0;
|
|
||||||
for (std::vector<SMD::Bone>::const_iterator
|
|
||||||
i = this->asBones.begin();
|
|
||||||
i != this->asBones.end();++i)
|
|
||||||
{
|
|
||||||
if ((*i).bIsUsed)++anim->mNumBones;
|
|
||||||
}
|
|
||||||
aiBoneAnim** pp = anim->mBones = new aiBoneAnim*[anim->mNumBones];
|
aiBoneAnim** pp = anim->mBones = new aiBoneAnim*[anim->mNumBones];
|
||||||
|
|
||||||
// now build valid keys
|
// now build valid keys
|
||||||
|
@ -492,8 +580,10 @@ void SMDImporter::ComputeAbsoluteBoneTransformations()
|
||||||
for (unsigned int i = 0; i < bone.sAnim.asKeys.size();++i)
|
for (unsigned int i = 0; i < bone.sAnim.asKeys.size();++i)
|
||||||
{
|
{
|
||||||
double d = std::min(bone.sAnim.asKeys[i].dTime,dMin);
|
double d = std::min(bone.sAnim.asKeys[i].dTime,dMin);
|
||||||
if (d < dMin) {
|
if (d < dMin)
|
||||||
dMin = d; iIndex = i;
|
{
|
||||||
|
dMin = d;
|
||||||
|
iIndex = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bone.sAnim.iFirstTimeKey = iIndex;
|
bone.sAnim.iFirstTimeKey = iIndex;
|
||||||
|
@ -541,7 +631,7 @@ void SMDImporter::ComputeAbsoluteBoneTransformations()
|
||||||
void SMDImporter::CreateOutputMaterials()
|
void SMDImporter::CreateOutputMaterials()
|
||||||
{
|
{
|
||||||
this->pScene->mNumMaterials = (unsigned int)this->aszTextures.size();
|
this->pScene->mNumMaterials = (unsigned int)this->aszTextures.size();
|
||||||
this->pScene->mMaterials = new aiMaterial*[std::min(1u, this->pScene->mNumMaterials)];
|
this->pScene->mMaterials = new aiMaterial*[std::max(1u, this->pScene->mNumMaterials)];
|
||||||
|
|
||||||
for (unsigned int iMat = 0; iMat < this->pScene->mNumMaterials;++iMat)
|
for (unsigned int iMat = 0; iMat < this->pScene->mNumMaterials;++iMat)
|
||||||
{
|
{
|
||||||
|
@ -556,7 +646,7 @@ void SMDImporter::CreateOutputMaterials()
|
||||||
#endif
|
#endif
|
||||||
pcMat->AddProperty(&szName,AI_MATKEY_NAME);
|
pcMat->AddProperty(&szName,AI_MATKEY_NAME);
|
||||||
|
|
||||||
strcpy(szName.data, this->aszTextures[iMat].c_str() );
|
::strcpy(szName.data, this->aszTextures[iMat].c_str() );
|
||||||
szName.length = this->aszTextures[iMat].length();
|
szName.length = this->aszTextures[iMat].length();
|
||||||
pcMat->AddProperty(&szName,AI_MATKEY_TEXTURE_DIFFUSE(0));
|
pcMat->AddProperty(&szName,AI_MATKEY_TEXTURE_DIFFUSE(0));
|
||||||
}
|
}
|
||||||
|
@ -594,7 +684,7 @@ void SMDImporter::ParseFile()
|
||||||
// read line per line ...
|
// read line per line ...
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if(!SkipSpaces(szCurrent,&szCurrent)) break;
|
if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
|
||||||
|
|
||||||
// "version <n> \n", <n> should be 1 for hl and hl² SMD files
|
// "version <n> \n", <n> should be 1 for hl and hl² SMD files
|
||||||
if (0 == ASSIMP_strincmp(szCurrent,"version",7) &&
|
if (0 == ASSIMP_strincmp(szCurrent,"version",7) &&
|
||||||
|
@ -607,55 +697,43 @@ void SMDImporter::ParseFile()
|
||||||
DefaultLogger::get()->warn("SMD.version is not 1. This "
|
DefaultLogger::get()->warn("SMD.version is not 1. This "
|
||||||
"file format is not known. Continuing happily ...");
|
"file format is not known. Continuing happily ...");
|
||||||
}
|
}
|
||||||
|
//continue;
|
||||||
}
|
}
|
||||||
// "nodes\n" - Starts the node section
|
// "nodes\n" - Starts the node section
|
||||||
else if (0 == ASSIMP_strincmp(szCurrent,"nodes",5) &&
|
if (0 == ASSIMP_strincmp(szCurrent,"nodes",5) &&
|
||||||
IsSpaceOrNewLine(*(szCurrent+5)))
|
IsSpaceOrNewLine(*(szCurrent+5)))
|
||||||
{
|
{
|
||||||
szCurrent += 6;
|
szCurrent += 6;
|
||||||
this->ParseNodesSection(szCurrent,&szCurrent);
|
this->ParseNodesSection(szCurrent,&szCurrent);
|
||||||
|
//continue;
|
||||||
}
|
}
|
||||||
// "triangles\n" - Starts the triangle section
|
// "triangles\n" - Starts the triangle section
|
||||||
else if (0 == ASSIMP_strincmp(szCurrent,"triangles",9) &&
|
if (0 == ASSIMP_strincmp(szCurrent,"triangles",9) &&
|
||||||
IsSpaceOrNewLine(*(szCurrent+9)))
|
IsSpaceOrNewLine(*(szCurrent+9)))
|
||||||
{
|
{
|
||||||
szCurrent += 10;
|
szCurrent += 10;
|
||||||
this->ParseTrianglesSection(szCurrent,&szCurrent);
|
this->ParseTrianglesSection(szCurrent,&szCurrent);
|
||||||
|
//continue;
|
||||||
}
|
}
|
||||||
// "vertexanimation\n" - Starts the vertex animation section
|
// "vertexanimation\n" - Starts the vertex animation section
|
||||||
else if (0 == ASSIMP_strincmp(szCurrent,"vertexanimation",15) &&
|
if (0 == ASSIMP_strincmp(szCurrent,"vertexanimation",15) &&
|
||||||
IsSpaceOrNewLine(*(szCurrent+15)))
|
IsSpaceOrNewLine(*(szCurrent+15)))
|
||||||
{
|
{
|
||||||
this->bHasUVs = false;
|
this->bHasUVs = false;
|
||||||
szCurrent += 16;
|
szCurrent += 16;
|
||||||
this->ParseVASection(szCurrent,&szCurrent);
|
this->ParseVASection(szCurrent,&szCurrent);
|
||||||
|
//continue;
|
||||||
}
|
}
|
||||||
// "skeleton\n" - Starts the skeleton section
|
// "skeleton\n" - Starts the skeleton section
|
||||||
else if (0 == ASSIMP_strincmp(szCurrent,"skeleton",8) &&
|
if (0 == ASSIMP_strincmp(szCurrent,"skeleton",8) &&
|
||||||
IsSpaceOrNewLine(*(szCurrent+8)))
|
IsSpaceOrNewLine(*(szCurrent+8)))
|
||||||
{
|
{
|
||||||
szCurrent += 9;
|
szCurrent += 9;
|
||||||
this->ParseSkeletonSection(szCurrent,&szCurrent);
|
this->ParseSkeletonSection(szCurrent,&szCurrent);
|
||||||
|
//continue;
|
||||||
}
|
}
|
||||||
else SkipLine(szCurrent,&szCurrent);
|
else SkipLine(szCurrent,&szCurrent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there are no triangles, we can't load the model
|
|
||||||
if (this->asTriangles.empty())
|
|
||||||
{
|
|
||||||
throw new ImportErrorException("No triangles have been found in the file");
|
|
||||||
}
|
|
||||||
// check whether all bones have been initialized
|
|
||||||
for (std::vector<SMD::Bone>::const_iterator
|
|
||||||
i = this->asBones.begin();
|
|
||||||
i != this->asBones.end();++i)
|
|
||||||
{
|
|
||||||
if (!(*i).mName.length())
|
|
||||||
{
|
|
||||||
DefaultLogger::get()->warn("Not all bones have been initialized");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -701,6 +779,8 @@ void SMDImporter::ParseTrianglesSection(const char* szCurrent,
|
||||||
// and so on until we reach a token that looks quite similar to "end"
|
// and so on until we reach a token that looks quite similar to "end"
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
|
||||||
|
|
||||||
// "end\n" - Ends the triangles section
|
// "end\n" - Ends the triangles section
|
||||||
if (0 == ASSIMP_strincmp(szCurrent,"end",3) &&
|
if (0 == ASSIMP_strincmp(szCurrent,"end",3) &&
|
||||||
IsSpaceOrNewLine(*(szCurrent+3)))
|
IsSpaceOrNewLine(*(szCurrent+3)))
|
||||||
|
@ -721,6 +801,8 @@ void SMDImporter::ParseVASection(const char* szCurrent,
|
||||||
unsigned int iCurIndex = 0;
|
unsigned int iCurIndex = 0;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
|
||||||
|
|
||||||
// "end\n" - Ends the "vertexanimation" section
|
// "end\n" - Ends the "vertexanimation" section
|
||||||
if (0 == ASSIMP_strincmp(szCurrent,"end",3) &&
|
if (0 == ASSIMP_strincmp(szCurrent,"end",3) &&
|
||||||
IsSpaceOrNewLine(*(szCurrent+3)))
|
IsSpaceOrNewLine(*(szCurrent+3)))
|
||||||
|
@ -730,7 +812,7 @@ void SMDImporter::ParseVASection(const char* szCurrent,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// "time <n>\n"
|
// "time <n>\n"
|
||||||
else if (0 == ASSIMP_strincmp(szCurrent,"time",4) &&
|
if (0 == ASSIMP_strincmp(szCurrent,"time",4) &&
|
||||||
IsSpaceOrNewLine(*(szCurrent+4)))
|
IsSpaceOrNewLine(*(szCurrent+4)))
|
||||||
{
|
{
|
||||||
szCurrent += 5;
|
szCurrent += 5;
|
||||||
|
@ -767,6 +849,8 @@ void SMDImporter::ParseSkeletonSection(const char* szCurrent,
|
||||||
int iTime = 0;
|
int iTime = 0;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
|
||||||
|
|
||||||
// "end\n" - Ends the skeleton section
|
// "end\n" - Ends the skeleton section
|
||||||
if (0 == ASSIMP_strincmp(szCurrent,"end",3) &&
|
if (0 == ASSIMP_strincmp(szCurrent,"end",3) &&
|
||||||
IsSpaceOrNewLine(*(szCurrent+3)))
|
IsSpaceOrNewLine(*(szCurrent+3)))
|
||||||
|
@ -796,6 +880,7 @@ void SMDImporter::ParseNodeInfo(const char* szCurrent,
|
||||||
const char** szCurrentOut)
|
const char** szCurrentOut)
|
||||||
{
|
{
|
||||||
unsigned int iBone = 0;
|
unsigned int iBone = 0;
|
||||||
|
SkipSpacesAndLineEnd(szCurrent,&szCurrent);
|
||||||
if(!this->ParseUnsignedInt(szCurrent,&szCurrent,iBone) || !SkipSpaces(szCurrent,&szCurrent))
|
if(!this->ParseUnsignedInt(szCurrent,&szCurrent,iBone) || !SkipSpaces(szCurrent,&szCurrent))
|
||||||
{
|
{
|
||||||
this->LogErrorNoThrow("Unexpected EOF/EOL while parsing bone index");
|
this->LogErrorNoThrow("Unexpected EOF/EOL while parsing bone index");
|
||||||
|
@ -836,6 +921,8 @@ void SMDImporter::ParseNodeInfo(const char* szCurrent,
|
||||||
++szEnd;
|
++szEnd;
|
||||||
}
|
}
|
||||||
bone.mName = std::string(szCurrent,iBone);
|
bone.mName = std::string(szCurrent,iBone);
|
||||||
|
szCurrent = szEnd;
|
||||||
|
|
||||||
// the only negative bone parent index that could occur is -1 AFAIK
|
// the only negative bone parent index that could occur is -1 AFAIK
|
||||||
if(!this->ParseSignedInt(szCurrent,&szCurrent,(int&)bone.iParent))
|
if(!this->ParseSignedInt(szCurrent,&szCurrent,(int&)bone.iParent))
|
||||||
{
|
{
|
||||||
|
@ -933,11 +1020,13 @@ void SMDImporter::ParseTriangle(const char* szCurrent,
|
||||||
}
|
}
|
||||||
|
|
||||||
// read the texture file name
|
// read the texture file name
|
||||||
const char* szEnd = szCurrent;
|
const char* szLast = szCurrent;
|
||||||
while (!IsSpaceOrNewLine(*szEnd++));
|
while (!IsSpaceOrNewLine(*szCurrent++));
|
||||||
|
|
||||||
face.iTexture = this->GetTextureIndex(std::string(szCurrent,
|
face.iTexture = this->GetTextureIndex(std::string(szLast,
|
||||||
(uintptr_t)szEnd-(uintptr_t)szCurrent));
|
(uintptr_t)szCurrent-(uintptr_t)szLast));
|
||||||
|
|
||||||
|
this->SkipLine(szCurrent,&szCurrent);
|
||||||
|
|
||||||
// load three vertices
|
// load three vertices
|
||||||
for (unsigned int iVert = 0; iVert < 3;++iVert)
|
for (unsigned int iVert = 0; iVert < 3;++iVert)
|
||||||
|
@ -945,6 +1034,7 @@ void SMDImporter::ParseTriangle(const char* szCurrent,
|
||||||
this->ParseVertex(szCurrent,&szCurrent,
|
this->ParseVertex(szCurrent,&szCurrent,
|
||||||
face.avVertices[iVert]);
|
face.avVertices[iVert]);
|
||||||
}
|
}
|
||||||
|
*szCurrentOut = szCurrent;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Parse a float
|
// Parse a float
|
||||||
|
|
|
@ -355,16 +355,16 @@ protected:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
inline void SkipSpacesAndLineEnd( const char* in, const char** out)
|
inline bool SkipSpacesAndLineEnd( const char* in, const char** out)
|
||||||
{
|
{
|
||||||
::SkipSpacesAndLineEnd(in,out);
|
|
||||||
++iLineNumber;
|
++iLineNumber;
|
||||||
|
return ::SkipSpacesAndLineEnd(in,out);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/** Buffer to hold the loaded file */
|
/** Buffer to hold the loaded file */
|
||||||
const char* mBuffer;
|
char* mBuffer;
|
||||||
|
|
||||||
/** Output scene to be filled
|
/** Output scene to be filled
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -155,7 +155,10 @@ void ValidateDSProcess::Execute( aiScene* pScene)
|
||||||
this->Validate(pScene->mMeshes[i]);
|
this->Validate(pScene->mMeshes[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else this->ReportError("aiScene::mNumMeshes is 0. At least one mesh must be there");
|
else if (!(this->mScene->mFlags & AI_SCENE_FLAGS_ANIM_SKELETON_ONLY))
|
||||||
|
{
|
||||||
|
this->ReportError("aiScene::mNumMeshes is 0. At least one mesh must be there");
|
||||||
|
}
|
||||||
|
|
||||||
// validate all animations
|
// validate all animations
|
||||||
if (pScene->mNumAnimations)
|
if (pScene->mNumAnimations)
|
||||||
|
@ -185,6 +188,11 @@ void ValidateDSProcess::Execute( aiScene* pScene)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (this->mScene->mFlags & AI_SCENE_FLAGS_ANIM_SKELETON_ONLY)
|
||||||
|
{
|
||||||
|
this->ReportError("aiScene::mNumAnimations is 0 and the "
|
||||||
|
"AI_SCENE_FLAGS_ANIM_SKELETON_ONLY flag is set.");
|
||||||
|
}
|
||||||
|
|
||||||
// validate all textures
|
// validate all textures
|
||||||
if (pScene->mNumTextures)
|
if (pScene->mNumTextures)
|
||||||
|
@ -240,6 +248,17 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
|
||||||
pMesh->mMaterialIndex,this->mScene->mNumMaterials-1);
|
pMesh->mMaterialIndex,this->mScene->mNumMaterials-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->mScene->mFlags & AI_SCENE_FLAGS_ANIM_SKELETON_ONLY)
|
||||||
|
{
|
||||||
|
if (pMesh->mNumVertices || pMesh->mVertices ||
|
||||||
|
pMesh->mNumFaces || pMesh->mFaces)
|
||||||
|
{
|
||||||
|
this->ReportWarning("The mesh contains vertices and faces although "
|
||||||
|
"the AI_SCENE_FLAGS_ANIM_SKELETON_ONLY flag is set");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// positions must always be there ...
|
// positions must always be there ...
|
||||||
if (!pMesh->mNumVertices || !pMesh->mVertices)
|
if (!pMesh->mNumVertices || !pMesh->mVertices)
|
||||||
{
|
{
|
||||||
|
@ -307,6 +326,7 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
|
||||||
"although the previous channel was NULL.",i);
|
"although the previous channel was NULL.",i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// now validate all bones
|
// now validate all bones
|
||||||
if (pMesh->HasBones())
|
if (pMesh->HasBones())
|
||||||
|
@ -316,6 +336,13 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
|
||||||
this->ReportError("aiMesh::mBones is NULL (aiMesh::mNumBones is %i)",
|
this->ReportError("aiMesh::mBones is NULL (aiMesh::mNumBones is %i)",
|
||||||
pMesh->mNumBones);
|
pMesh->mNumBones);
|
||||||
}
|
}
|
||||||
|
float* afSum = NULL;
|
||||||
|
if (pMesh->mNumVertices)
|
||||||
|
{
|
||||||
|
afSum = new float[pMesh->mNumVertices];
|
||||||
|
for (unsigned int i = 0; i < pMesh->mNumVertices;++i)
|
||||||
|
afSum[i] = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
// check whether there are duplicate bone names
|
// check whether there are duplicate bone names
|
||||||
for (unsigned int i = 0; i < pMesh->mNumBones;++i)
|
for (unsigned int i = 0; i < pMesh->mNumBones;++i)
|
||||||
|
@ -325,7 +352,7 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
|
||||||
this->ReportError("aiMesh::mBones[%i] is NULL (aiMesh::mNumBones is %i)",
|
this->ReportError("aiMesh::mBones[%i] is NULL (aiMesh::mNumBones is %i)",
|
||||||
i,pMesh->mNumBones);
|
i,pMesh->mNumBones);
|
||||||
}
|
}
|
||||||
this->Validate(pMesh,pMesh->mBones[i]);
|
this->Validate(pMesh,pMesh->mBones[i],afSum);
|
||||||
|
|
||||||
for (unsigned int a = i+1; a < pMesh->mNumBones;++a)
|
for (unsigned int a = i+1; a < pMesh->mNumBones;++a)
|
||||||
{
|
{
|
||||||
|
@ -336,11 +363,22 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// check whether all bone weights for a vertex sum to 1.0 ...
|
||||||
|
for (unsigned int i = 0; i < pMesh->mNumVertices;++i)
|
||||||
|
{
|
||||||
|
if (afSum[i] && (afSum[i] <= 0.995 || afSum[i] >= 1.005))
|
||||||
|
{
|
||||||
|
delete[] afSum;
|
||||||
|
this->ReportError("aiMesh::mVertices[%i]: The sum of all bone "
|
||||||
|
"weights isn't 1.0f (sum is %f)",i,afSum[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete[] afSum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void ValidateDSProcess::Validate( const aiMesh* pMesh,
|
void ValidateDSProcess::Validate( const aiMesh* pMesh,
|
||||||
const aiBone* pBone)
|
const aiBone* pBone,float* afSum)
|
||||||
{
|
{
|
||||||
this->Validate(&pBone->mName);
|
this->Validate(&pBone->mName);
|
||||||
|
|
||||||
|
@ -355,8 +393,8 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh,
|
||||||
{
|
{
|
||||||
this->ReportWarning("aiBone::mWeights[%i].mWeight has an invalid value",i);
|
this->ReportWarning("aiBone::mWeights[%i].mWeight has an invalid value",i);
|
||||||
}
|
}
|
||||||
|
afSum[pBone->mWeights[i].mVertexId] += pBone->mWeights[i].mWeight;
|
||||||
}
|
}
|
||||||
// TODO: check whether all bone weights for a vertex sum to 1.0 ...
|
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void ValidateDSProcess::Validate( const aiAnimation* pAnimation)
|
void ValidateDSProcess::Validate( const aiAnimation* pAnimation)
|
||||||
|
@ -606,9 +644,10 @@ void ValidateDSProcess::Validate( const aiAnimation* pAnimation,
|
||||||
for (unsigned int a = 0; a < mesh->mNumBones;++a)
|
for (unsigned int a = 0; a < mesh->mNumBones;++a)
|
||||||
{
|
{
|
||||||
if (mesh->mBones[a]->mName == pBoneAnim->mBoneName)
|
if (mesh->mBones[a]->mName == pBoneAnim->mBoneName)
|
||||||
break;
|
goto __break_out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
__break_out:
|
||||||
if (i == this->mScene->mNumMeshes)
|
if (i == this->mScene->mNumMeshes)
|
||||||
{
|
{
|
||||||
this->ReportWarning("aiBoneAnim::mBoneName is %s. However, no bone with this name was found",
|
this->ReportWarning("aiBoneAnim::mBoneName is %s. However, no bone with this name was found",
|
||||||
|
|
|
@ -115,7 +115,7 @@ protected:
|
||||||
* @param pMesh Input mesh
|
* @param pMesh Input mesh
|
||||||
* @param pBone Input bone
|
* @param pBone Input bone
|
||||||
*/
|
*/
|
||||||
void Validate( const aiMesh* pMesh,const aiBone* pBone);
|
void Validate( const aiMesh* pMesh,const aiBone* pBone,float* afSum);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Validates an animation
|
/** Validates an animation
|
||||||
|
|
|
@ -106,8 +106,11 @@ struct aiBoneAnim
|
||||||
|
|
||||||
~aiBoneAnim()
|
~aiBoneAnim()
|
||||||
{
|
{
|
||||||
|
if (mNumPositionKeys)
|
||||||
delete [] mPositionKeys;
|
delete [] mPositionKeys;
|
||||||
|
if (mNumRotationKeys)
|
||||||
delete [] mRotationKeys;
|
delete [] mRotationKeys;
|
||||||
|
if (mNumScalingKeys)
|
||||||
delete [] mScalingKeys;
|
delete [] mScalingKeys;
|
||||||
}
|
}
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
@ -144,11 +147,14 @@ struct aiAnimation
|
||||||
}
|
}
|
||||||
|
|
||||||
~aiAnimation()
|
~aiAnimation()
|
||||||
|
{
|
||||||
|
if (mNumBones)
|
||||||
{
|
{
|
||||||
for( unsigned int a = 0; a < mNumBones; a++)
|
for( unsigned int a = 0; a < mNumBones; a++)
|
||||||
delete mBones[a];
|
delete mBones[a];
|
||||||
delete [] mBones;
|
delete [] mBones;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@ struct aiFace
|
||||||
//! Default destructor. Delete the index array
|
//! Default destructor. Delete the index array
|
||||||
~aiFace()
|
~aiFace()
|
||||||
{
|
{
|
||||||
|
if (mNumIndices)
|
||||||
delete [] mIndices;
|
delete [] mIndices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +203,7 @@ struct aiBone
|
||||||
//! Destructor to delete the array of vertex weights
|
//! Destructor to delete the array of vertex weights
|
||||||
~aiBone()
|
~aiBone()
|
||||||
{
|
{
|
||||||
delete [] mWeights;
|
if (mNumWeights)delete [] mWeights;
|
||||||
}
|
}
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
};
|
};
|
||||||
|
@ -366,9 +367,10 @@ struct aiMesh
|
||||||
}
|
}
|
||||||
|
|
||||||
~aiMesh()
|
~aiMesh()
|
||||||
|
{
|
||||||
|
if ( mNumVertices) // fix to make this work for invalid scenes, too
|
||||||
{
|
{
|
||||||
delete [] mVertices;
|
delete [] mVertices;
|
||||||
delete [] mFaces;
|
|
||||||
delete [] mNormals;
|
delete [] mNormals;
|
||||||
delete [] mTangents;
|
delete [] mTangents;
|
||||||
delete [] mBitangents;
|
delete [] mBitangents;
|
||||||
|
@ -376,10 +378,18 @@ struct aiMesh
|
||||||
delete [] mTextureCoords[a];
|
delete [] mTextureCoords[a];
|
||||||
for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; a++)
|
for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; a++)
|
||||||
delete [] mColors[a];
|
delete [] mColors[a];
|
||||||
|
}
|
||||||
|
if ( mNumBones) // fix to make this work for invalid scenes, too
|
||||||
|
{
|
||||||
for( unsigned int a = 0; a < mNumBones; a++)
|
for( unsigned int a = 0; a < mNumBones; a++)
|
||||||
delete mBones[a];
|
delete mBones[a];
|
||||||
delete [] mBones;
|
delete [] mBones;
|
||||||
}
|
}
|
||||||
|
if ( mNumFaces) // fix to make this work for invalid scenes, too
|
||||||
|
{
|
||||||
|
delete [] mFaces;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//! Check whether the mesh contains positions. Should always return true
|
//! Check whether the mesh contains positions. Should always return true
|
||||||
inline bool HasPositions() const
|
inline bool HasPositions() const
|
||||||
|
|
|
@ -112,6 +112,12 @@ struct aiNode
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//! @def AI_SCENE_FLAGS_ANIM_SKELETON_ONLY
|
||||||
|
//! Specifies that no model but only an animation skeleton has been
|
||||||
|
//! imported. There are no materials in this case. There are no
|
||||||
|
//! textures in this case. But there is a node graph, animation channels
|
||||||
|
//! and propably meshes with bones.
|
||||||
|
#define AI_SCENE_FLAGS_ANIM_SKELETON_ONLY 0x1
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
/** The root structure of the imported data.
|
/** The root structure of the imported data.
|
||||||
|
@ -121,6 +127,11 @@ struct aiNode
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
struct aiScene
|
struct aiScene
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/** Any combination of the AI_SCENE_FLAGS_XXX flags */
|
||||||
|
unsigned int mFlags;
|
||||||
|
|
||||||
|
|
||||||
/** The root node of the hierarchy.
|
/** The root node of the hierarchy.
|
||||||
*
|
*
|
||||||
* There will always be at least the root node if the import
|
* There will always be at least the root node if the import
|
||||||
|
@ -189,6 +200,7 @@ struct aiScene
|
||||||
mNumMaterials = 0; mMaterials = NULL;
|
mNumMaterials = 0; mMaterials = NULL;
|
||||||
mNumAnimations = 0; mAnimations = NULL;
|
mNumAnimations = 0; mAnimations = NULL;
|
||||||
mNumTextures = 0; mTextures = NULL;
|
mNumTextures = 0; mTextures = NULL;
|
||||||
|
mFlags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
|
@ -196,19 +208,31 @@ struct aiScene
|
||||||
{
|
{
|
||||||
// delete all subobjects recursively
|
// delete all subobjects recursively
|
||||||
delete mRootNode;
|
delete mRootNode;
|
||||||
|
if (mNumMeshes) // fix to make the d'tor work for invalid scenes, too
|
||||||
|
{
|
||||||
for( unsigned int a = 0; a < mNumMeshes; a++)
|
for( unsigned int a = 0; a < mNumMeshes; a++)
|
||||||
delete mMeshes[a];
|
delete mMeshes[a];
|
||||||
delete [] mMeshes;
|
delete [] mMeshes;
|
||||||
|
}
|
||||||
|
if (mNumMaterials) // fix to make the d'tor work for invalid scenes, too
|
||||||
|
{
|
||||||
for( unsigned int a = 0; a < mNumMaterials; a++)
|
for( unsigned int a = 0; a < mNumMaterials; a++)
|
||||||
delete mMaterials[a];
|
delete mMaterials[a];
|
||||||
delete [] mMaterials;
|
delete [] mMaterials;
|
||||||
|
}
|
||||||
|
if (mNumAnimations) // fix to make the d'tor work for invalid scenes, too
|
||||||
|
{
|
||||||
for( unsigned int a = 0; a < mNumAnimations; a++)
|
for( unsigned int a = 0; a < mNumAnimations; a++)
|
||||||
delete mAnimations[a];
|
delete mAnimations[a];
|
||||||
delete [] mAnimations;
|
delete [] mAnimations;
|
||||||
|
}
|
||||||
|
if (mNumTextures) // fix to make the d'tor work for invalid scenes, too
|
||||||
|
{
|
||||||
for( unsigned int a = 0; a < mNumTextures; a++)
|
for( unsigned int a = 0; a < mNumTextures; a++)
|
||||||
delete mTextures[a];
|
delete mTextures[a];
|
||||||
delete [] mTextures;
|
delete [] mTextures;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1031\deflangfe1031\themelang1031\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f34\fbidi \froman\fcharset1\fprq2{\*\panose 02040503050406030204}Cambria Math;}
|
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1031\deflangfe1031\themelang1031\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}
|
||||||
{\f39\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}MS Reference Sans Serif;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
{\f39\fbidi \fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}MS Reference Sans Serif;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||||
{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
|
{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
|
||||||
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||||
{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
|
{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
|
||||||
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f40\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f41\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f41\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f42\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||||
{\f43\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
{\f44\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f45\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f46\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f47\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||||
{\f47\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f430\fbidi \fswiss\fcharset238\fprq2 MS Reference Sans Serif CE;}
|
{\f48\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f49\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f381\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f382\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}
|
||||||
{\f431\fbidi \fswiss\fcharset204\fprq2 MS Reference Sans Serif Cyr;}{\f433\fbidi \fswiss\fcharset161\fprq2 MS Reference Sans Serif Greek;}{\f434\fbidi \fswiss\fcharset162\fprq2 MS Reference Sans Serif Tur;}
|
{\f384\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f385\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f388\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f431\fbidi \fswiss\fcharset238\fprq2 MS Reference Sans Serif CE;}
|
||||||
{\f437\fbidi \fswiss\fcharset186\fprq2 MS Reference Sans Serif Baltic;}{\f438\fbidi \fswiss\fcharset163\fprq2 MS Reference Sans Serif (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
|
{\f432\fbidi \fswiss\fcharset204\fprq2 MS Reference Sans Serif Cyr;}{\f434\fbidi \fswiss\fcharset161\fprq2 MS Reference Sans Serif Greek;}{\f435\fbidi \fswiss\fcharset162\fprq2 MS Reference Sans Serif Tur;}
|
||||||
|
{\f438\fbidi \fswiss\fcharset186\fprq2 MS Reference Sans Serif Baltic;}{\f439\fbidi \fswiss\fcharset163\fprq2 MS Reference Sans Serif (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
|
||||||
{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
|
{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||||
{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
|
{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||||
{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||||
|
@ -32,10 +33,10 @@
|
||||||
\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031
|
\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031
|
||||||
\snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
|
\snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
|
||||||
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
|
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
|
||||||
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031
|
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1031\langfe1031\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1031\langfenp1031
|
||||||
\snext11 \ssemihidden \sunhideused \sqformat Normal Table;}}{\*\rsidtbl \rsid3942873\rsid5053873\rsid5338181\rsid6912689\rsid7213193\rsid8068556\rsid9465848\rsid13463017}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0
|
\snext11 \ssemihidden \sunhideused \sqformat Normal Table;}}{\*\rsidtbl \rsid2432159\rsid3942873\rsid5053873\rsid5113869\rsid5338181\rsid6912689\rsid6976329\rsid7213193\rsid8068556\rsid9465848\rsid13463017}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0
|
||||||
\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Alexander Gessler}{\creatim\yr2008\mo5\dy13\hr12\min5}{\revtim\yr2008\mo5\dy13\hr12\min23}{\version8}{\edmins0}{\nofpages4}{\nofwords1365}{\nofchars6976}{\nofcharsws8325}{\vern32893}}
|
\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Alexander Gessler}{\creatim\yr2008\mo5\dy13\hr12\min5}{\revtim\yr2008\mo7\dy8\hr13\min6}{\version11}{\edmins0}{\nofpages5}{\nofwords1505}{\nofchars7670}
|
||||||
{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1134\gutter0\ltrsect
|
{\nofcharsws9157}{\vern32895}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1134\gutter0\ltrsect
|
||||||
\deftab708\widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves1\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120
|
\deftab708\widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves1\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120
|
||||||
\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale91\viewzk1\rsidroot13463017 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang
|
\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale91\viewzk1\rsidroot13463017 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang
|
||||||
{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}
|
{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}
|
||||||
|
@ -46,23 +47,24 @@
|
||||||
\par }{\rtlch\fcs1 \ab\af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Document version 1.0, April 2008
|
\par }{\rtlch\fcs1 \ab\af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Document version 1.0, April 2008
|
||||||
\par }{\rtlch\fcs1 \ab\af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873
|
\par }{\rtlch\fcs1 \ab\af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873
|
||||||
\par }\pard \ltrpar\ql \fi-360\li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 I.\tab
|
\par }\pard \ltrpar\ql \fi-360\li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 I.\tab
|
||||||
\hich\af39\dbch\af31505\loch\f39 Usage\hich\af39\dbch\af31505\loch\f39
|
Usage
|
||||||
\par }\pard \ltrpar\qj \li340\ri850\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin850\lin340\itap0\pararsid5338181 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
\par }\pard \ltrpar\qj \li340\ri850\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin850\lin340\itap0\pararsid5338181 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
||||||
The ASSIMP Viewer Utility is a small and fast stand-alone viewer utility which is us\hich\af39\dbch\af31505\loch\f39
|
The ASSIMP Viewer Utility is a small and fast stand-alone viewer utility which is us\hich\af39\dbch\af31505\loch\f39
|
||||||
ing the ASSIMP library to import assets from files. It consists of a single executable file and has no external dependencies. It displays assets with even highly complex materials and bone animations correctly.
|
ing the ASSIMP library to import assets from files. It consists of a single executable file and has no external dependencies. It displays assets with even highly complex materials and bone animations correctly.
|
||||||
\par \hich\af39\dbch\af31505\loch\f39 AssimpView allows you to modify the textures \hich\af39\dbch\af31505\loch\f39
|
\par \hich\af39\dbch\af31505\loch\f39 AssimpView allows you to modify the textures \hich\af39\dbch\af31505\loch\f39 and material properties sets of your models at runtime, }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
||||||
and material properties sets of your models at runtime, easy and fast per Drag&Drop. Furthermore it can visualize normals, UV sets, bounding boxes ... It allows artists and engine }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid6976329 \hich\af39\dbch\af31505\loch\f39 easily}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
||||||
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 programmers}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
and fast per Drag&Drop. Furthermore it can visualize normals, UV sets, bounding boxes ... It allows artists and engine }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39
|
||||||
to work together with maximal efficiency and find the ideal mod\hich\af39\dbch\af31505\loch\f39 el format for your internal workflow.
|
programmers}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 to work together with maximal efficiency and find the ideal mode\hich\af39\dbch\af31505\loch\f39
|
||||||
|
l format for your internal workflow.
|
||||||
\par }{\rtlch\fcs1 \ab\af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 System requirements}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
\par }{\rtlch\fcs1 \ab\af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 System requirements}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
\hich\af39\dbch\af31505\loch\f39 :
|
\hich\af39\dbch\af31505\loch\f39 :
|
||||||
\par }\pard \ltrpar\qj \fi-360\li700\ri850\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin850\lin700\itap0\pararsid5338181 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab
|
\par }\pard \ltrpar\qj \fi-360\li700\ri850\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin850\lin700\itap0\pararsid5338181 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab
|
||||||
\hich\af39\dbch\af31505\loch\f39 A Direct3D 9.0c compliant video card with at least support for Shader Model 2.0.}{\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181
|
\hich\af39\dbch\af31505\loch\f39 A Direct3D 9.0c compliant video card with }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid6976329 \hich\af39\dbch\af31505\loch\f39 at least}{\rtlch\fcs1 \af39\afs20
|
||||||
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab \hich\af39\dbch\af31505\loch\f39 Shader Model 3.0 cards are recommended. Shader Model 2.0 cards always render the lighting in low-quality and hav
|
\ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 support for Shader Model 2.0.}{\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
\hich\af39\dbch\af31505\loch\f39 e some limitations concerning complex materials.}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab \hich\af39\dbch\af31505\loch\f39 Shader Model 3.0 cards are recommended. Shader Model 2.0 cards always render the lighting in low-quality and have
|
||||||
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab \hich\af39\dbch\af31505\loch\f39
|
\hich\af39\dbch\af31505\loch\f39 some limitations concerning complex materials.
|
||||||
Windows 2000 or higher. AssimpView should also run on older versions, with DirectX 9 installed, but this has never been tested. If you're a proud owner of such a version and AssimpView works for you, let u\hich\af39\dbch\af31505\loch\f39 s know.}{
|
\par -\tab \hich\af39\dbch\af31505\loch\f39 Windows 2000 or higher. AssimpView should also run on older versions, with DirectX 9 installed, but this has never been tested. If you're a proud owner of such a version and AssimpView works for you, let u
|
||||||
\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid8068556\charrsid8068556
|
\hich\af39\dbch\af31505\loch\f39 s know.}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid8068556\charrsid8068556
|
||||||
\par }\pard \ltrpar\ql \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
\par }\pard \ltrpar\ql \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
||||||
\par }\pard \ltrpar\ql \fi-360\li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 II.\tab
|
\par }\pard \ltrpar\ql \fi-360\li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 II.\tab
|
||||||
User interface
|
User interface
|
||||||
|
@ -85,17 +87,17 @@ The menu bar provides access to the viewer\hich\f39 \rquote \loch\f39 s basic op
|
||||||
": Save a snapshot of the viewer to a file. The snapshot does only include the preview panel, the rest of the user interface is not visible. Saved screenshots have no watermarks. This is }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
": Save a snapshot of the viewer to a file. The snapshot does only include the preview panel, the rest of the user interface is not visible. Saved screenshots have no watermarks. This is }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 Open Source}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Software!
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 Open Source}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Software!
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Reset View}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Reset View}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Reset the viewing position and direction to the default settings. This is: Camera position at 0|0|0, looking at 0|0|1.
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 "\hich\af39\dbch\af31505\loch\f39 : Reset the viewing position and direction to the default settings. This is: Camera position at 0|0|0, looking at 0|0|1.
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Memory consumption}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Memory consumption}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Display a box with approximated memory statistics. Note that the total memory consumption needn'\hich\af39\dbch\af31505\loch\f39
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Display a box with approximated memory statistics. Note that the total memory consumption needn't be equal to \hich\af39\dbch\af31505\loch\f39
|
||||||
t be equal to the physical memory allocated to the process (as displayed by Windows }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 Task Manager}{\rtlch\fcs1 \af39\afs16
|
the physical memory allocated to the process (as displayed by Windows }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 Task Manager}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ). The memory consumption does only refer to the memory required for the asset itself, not for the rest of the viewer.
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ). The memory consumption does only refer to the memory required for the asset itself, not for the rest of the viewer.
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Setup file associations}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Setup file associations}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Associate al\hich\af39\dbch\af31505\loch\f39 l file formats which can be read by ASSIMP with the viewer. If you double }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Associate all file format\hich\af39\dbch\af31505\loch\f39 s which can be read by ASSIMP with the viewer. If you double }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 click}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 click}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
||||||
on such a file in Windows Explorer, it will be automatically opened with AssimpView.
|
on such a file in Windows Explorer, it will be automatically opened with AssimpView.
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Recent files}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Recent files}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Displays a popup menu with a list of recently opened assets. Simply cli\hich\af39\dbch\af31505\loch\f39 ck on one to reload it.
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Displays a popup menu with a list of recently opened assets. Simply click on one to r\hich\af39\dbch\af31505\loch\f39 eload it.
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Clear history}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Clear history}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Clear the file history
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Clear the file history
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Quit}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Quit}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
|
@ -114,13 +116,13 @@ low, errors in red, debug messages in blue and status }{\rtlch\fcs1 \af39\afs16
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Clear log}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Clear log}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 " Clear the contents of the log window
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 " Clear the contents of the log window
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Original normals}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Original normals}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Specifies that the original norma\hich\af39\dbch\af31505\loch\f39
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Specifies that the origin\hich\af39\dbch\af31505\loch\f39
|
||||||
l set from the model file is used in the preview. Normally this is the best choice, as smoothing groups etc. are handled correctly, but there are many models out there which have invalid or corrupt normal sets. However, if a model has no normal set, ASSIM
|
al normal set from the model file is used in the preview. Normally this is the best choice, as smoothing groups etc. are handled correctly, but there are many models out there which have invalid or corrupt normal sets. However, if a model has no normal se
|
||||||
\hich\af39\dbch\af31505\loch\f39 P\hich\af39\dbch\af31505\loch\f39 computes a smooth normal set for it. "Original normals" is in this case equivalent to "Smooth normals"
|
\hich\af39\dbch\af31505\loch\f39 t\hich\af39\dbch\af31505\loch\f39 , ASSIMP computes a smooth normal set for it. "Original normals" is in this case equivalent to "Smooth normals"
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Smooth normals}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Smooth normals}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Specifies that a smoothed, per-vertex, normal set is used in the preview window.
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Specifies that a smoothed, per-vertex, normal set is used in the preview window.
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Hard normals}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Hard normals}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Specifies that a hard, per-face\hich\af39\dbch\af31505\loch\f39 , normal set is used
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Specifies that a hard, \hich\af39\dbch\af31505\loch\f39 per-face, normal set is used
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Flip normals}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Flip normals}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Flip all normal vectors
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": Flip all normal vectors
|
||||||
\par }\pard \ltrpar\qj \fi-360\li720\ri850\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin850\lin720\itap0\pararsid5338181 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -}{\rtlch\fcs1 \af39\afs20
|
\par }\pard \ltrpar\qj \fi-360\li720\ri850\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin850\lin720\itap0\pararsid5338181 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -}{\rtlch\fcs1 \af39\afs20
|
||||||
|
@ -130,22 +132,23 @@ l set from the model file is used in the preview. Normally this is the best choi
|
||||||
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5338181 \hich\af39\dbch\af31505\loch\f39 are supported as skyboxes) as background image for the viewer.
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5338181 \hich\af39\dbch\af31505\loch\f39 are supported as skyboxes) as background image for the viewer.
|
||||||
\par }\pard \ltrpar\qj \fi-360\li720\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin720\itap0\pararsid3942873 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \tab }{\rtlch\fcs1 \af39\afs16
|
\par }\pard \ltrpar\qj \fi-360\li720\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin720\itap0\pararsid3942873 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \tab }{\rtlch\fcs1 \af39\afs16
|
||||||
\ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017
|
\ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017
|
||||||
\hich\af39\dbch\af31505\loch\f39 Set color}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 ": Displays a color picker where you can choose
|
\hich\af39\dbch\af31505\loch\f39 Set color}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39
|
||||||
\hich\af39\dbch\af31505\loch\f39 a new background color for the viewer.
|
": Displays a color picker where you can choose a new background color for the viewer.
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Load skybox}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Load skybox}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 ": Opens a file system dialog where you can select a skybox as background image. Accepted file formats are: *.dds, *.hdr.
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 ": Opens a file system dialog where you can select a skybox as background image. Accepted file formats are: *.dds, *.hdr.
|
||||||
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Load texture}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Load texture}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 ": Opens a file system dialog where you can select a texture as \hich\af39\dbch\af31505\loch\f39
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 ": Opens a \hich\af39\dbch\af31505\loch\f39
|
||||||
background image. If the format of the texture doesn't fit to the proportions of the preview window, the texture will be stretched. }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid3942873
|
file system dialog where you can select a texture as background image. If the format of the texture doesn't fit to the proportions of the preview window, the texture will be stretched. }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid3942873
|
||||||
\par }\pard \ltrpar\qj \fi-12\li720\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin720\itap0\pararsid3942873 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017
|
\par }\pard \ltrpar\qj \fi-12\li720\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin720\itap0\pararsid3942873 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017
|
||||||
\hich\af39\dbch\af31505\loch\f39 Accepted file formats are: *.jpg;*.png;*.tif;*.tga;*.dds;*.hdr;*.ppm;*.bmp
|
\hich\af39\dbch\af31505\loch\f39 Accepted file formats are: *.jpg;*.png;*.tif;*.tga;*.dds;*.hdr;*.ppm;*\hich\af39\dbch\af31505\loch\f39 .bmp
|
||||||
\par }\pard \ltrpar\ql \fi-360\li720\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 - "}{\rtlch\fcs1
|
\par }\pard \ltrpar\ql \fi-360\li720\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 - "}{\rtlch\fcs1
|
||||||
\ab\af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ?}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": }{
|
\ab\af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ?}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 ": }{
|
||||||
\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Help and feedback}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Help and feedback}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
|
|
||||||
\par \tab }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \tab }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Feedback}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017
|
\b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Feedback}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017
|
||||||
\hich\af39\dbch\af31505\loch\f39 ": Opens a p\hich\af39\dbch\af31505\loch\f39 opup menu with two options:
|
\hich\af39\dbch\af31505\loch\f39 ": Opens a popup menu with two options:
|
||||||
\par }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid8068556 \tab }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 * "}{
|
\par }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid8068556 \tab }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 * "}{
|
||||||
\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Report bug}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 Report bug}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 ": Report a bug in AssimpView or in Assimp
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid13463017 \hich\af39\dbch\af31505\loch\f39 ": Report a bug in AssimpView or in Assimp
|
||||||
|
@ -156,7 +159,10 @@ background image. If the format of the texture doesn't fit to the proportions of
|
||||||
\hich\af39\dbch\af31505\loch\f39 exotic file formats?
|
\hich\af39\dbch\af31505\loch\f39 exotic file formats?
|
||||||
\par }\pard \ltrpar\qj \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0\pararsid13463017 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \hich\f39
|
\par }\pard \ltrpar\qj \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0\pararsid13463017 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \hich\f39
|
||||||
The side panel \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Statistics}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
The side panel \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Statistics}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
\loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 displays rendering statistics. The meanings of the fi\hich\af39\dbch\af31505\loch\f39 elds change if you change between normal and texture/material mode.
|
\loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 di\hich\af39\dbch\af31505\loch\f39 splays rendering statistics. The meanings of the fields change if you change between normal}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
||||||
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 , node a\hich\af39\dbch\af31505\loch\f39 nd texture or }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 material}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 view}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
||||||
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 mode.
|
||||||
\par }\pard \ltrpar\qj \li340\ri1474\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1474\lin340\itap0\pararsid13463017 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
\par }\pard \ltrpar\qj \li340\ri1474\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1474\lin340\itap0\pararsid13463017 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
||||||
Normal view mode:
|
Normal view mode:
|
||||||
\par }\pard \ltrpar\qj \li340\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin340\itap0\pararsid5053873 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \tab }{\rtlch\fcs1 \af39\afs16
|
\par }\pard \ltrpar\qj \li340\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin340\itap0\pararsid5053873 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \tab }{\rtlch\fcs1 \af39\afs16
|
||||||
|
@ -169,46 +175,86 @@ er of faces (= triangles) in the asset
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": Number of nodes in the scenegraph, including the root node
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": Number of nodes in the scenegraph, including the root node
|
||||||
\par }\pard \ltrpar\qj \fi-368\li708\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin708\itap0\pararsid5053873 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \tab
|
\par }\pard \ltrpar\qj \fi-368\li708\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin708\itap0\pararsid5053873 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \tab
|
||||||
\hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 Mats:}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 Mats:}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 " Number of different materials found in the mesh. Most loaders \tab remove unreferenced materials.
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 " Number of different materials f}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 ound in the mesh. Most loaders }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 remove unreferenced materials.
|
||||||
\par }\pard \ltrpar\qj \li700\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin700\itap0\pararsid5053873 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873
|
\par }\pard \ltrpar\qj \li700\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin700\itap0\pararsid5053873 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873
|
||||||
\hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 Mesh}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 Mesh}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": Number of }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689\charrsid5053873
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": Number of }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689\charrsid5053873
|
||||||
\hich\af39\dbch\af31505\loch\f39 sub meshes}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 . Each mesh has only one material \tab assigned, so thi
|
\hich\af39\dbch\af31505\loch\f39 sub meshes}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 . Each mesh h}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\hich\af39\dbch\af31505\loch\f39 s number is in most cases equal to or higher than the \tab number of materials.
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 as only one material \tab assigned, so }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 this number\hich\af39\dbch\af31505\loch\f39 is in most cas}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6976329 \hich\af39\dbch\af31505\loch\f39 es equal to or higher than the }{
|
||||||
|
\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 number of materials.
|
||||||
\par \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 Shd}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 Shd}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": Number of unique shaders created}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": Number of unique shaders created}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873
|
||||||
\hich\af39\dbch\af31505\loch\f39 for this asset. If AssimpView }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39
|
\hich\af39\dbch\af31505\loch\f39 for this asset. If AssimpView }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39
|
||||||
detects that two materials can be rendered using }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 the same }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
detects that two materials can be rendered using }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 the same }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 Shader}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 code,
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 Shader}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 code, but with }{\rtlch\fcs1
|
||||||
\hich\af39\dbch\af31505\loch\f39 but \hich\af39\dbch\af31505\loch\f39 with }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 different}{\rtlch\fcs1 \af39\afs16
|
\af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 different}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873
|
||||||
\ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689\charrsid5053873
|
\hich\af39\dbch\af31505\loch\f39 }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 parameterizations}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\hich\af39\dbch\af31505\loch\f39 parameterizations}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 , it do}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 , it do}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 es
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 esn't create the }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 Shader}{\rtlch\fcs1
|
\hich\af39\dbch\af31505\loch\f39 n't create the }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689 \hich\af39\dbch\af31505\loch\f39 Shader}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 twice. }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 twice. }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39
|
||||||
\hich\af39\dbch\af31505\loch\f39 Most engines do so, too.
|
Most engines do so, too. }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6976329 \hich\af39\dbch\af31505\loch\f39 This allows you to \hich\af39\dbch\af31505\loch\f39 approximate\hich\af39\dbch\af31505\loch\f39 the
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 rendering const for the asset.}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873
|
||||||
\par \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 Time}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\par \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 Time}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": Time required for loading, in seco}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": Time required for loading, in seco}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873
|
||||||
\hich\af39\dbch\af31505\loch\f39 nds. This time is the raw time }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 the process spent in Assimp loading the mod}{
|
\hich\af39\dbch\af31505\loch\f39 nds. This time is the raw time }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 the process spent in Assimp loading the mod}{
|
||||||
\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 el itself, it does not include }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 el itself, it does not include }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 texture loading, }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689\charrsid5053873
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 texture loading, }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6912689\charrsid5053873
|
||||||
\hich\af39\dbch\af31505\loch\f39 Shader}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 compilation ...
|
\hich\af39\dbch\af31505\loch\f39 Shader}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5113869\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 compilation...}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
|
\par }\pard \ltrpar\qj \li340\ri1474\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1474\lin340\itap0\pararsid6976329 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid6976329 \hich\af39\dbch\af31505\loch\f39
|
||||||
|
Texture view mode\hich\af39\dbch\af31505\loch\f39 :
|
||||||
|
\par }\pard \ltrpar\qj \li340\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin340\itap0\pararsid6976329 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid6976329 \tab }{\rtlch\fcs1 \af39\afs16
|
||||||
|
\ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6976329\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39
|
||||||
|
Width}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6976329\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 Width of the texture, in pixels}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6976329\charrsid5053873
|
||||||
|
\par \tab \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 Height}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid6976329 \hich\af39\dbch\af31505\loch\f39 ":}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 \hich\af39\dbch\af31505\loch\f39
|
||||||
|
Height of the texture in pixels
|
||||||
|
\par }\pard \ltrpar\qj \li708\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin708\itap0\pararsid2432159 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6976329\charrsid5053873
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 Format}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid6976329\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39
|
||||||
|
Format of the texture. This will normally be ARGB8. Other possible \hich\af39\dbch\af31505\loch\f39 valu\hich\af39\dbch\af31505\loch\f39 e\hich\af39\dbch\af31505\loch\f39 s are:\hich\af39\dbch\af31505\loch\f39 \hich\af39\dbch\af31505\loch\f39 RRG565
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 , ARGB16f\hich\af39\dbch\af31505\loch\f39 , ARGB32F. Embedded textures are always converted \hich\af39\dbch\af31505\loch\f39 to ARGB8 format, even if they\loch\af39\dbch\af31505\hich\f39 \rquote
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 re stored\hich\af39\dbch\af31505\loch\f39 in the file\hich\af39\dbch\af31505\loch\f39 with a higher color\hich\af39\dbch\af31505\loch\f39 \hich\af39\dbch\af31505\loch\f39 depth.}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid6976329
|
||||||
|
\par }\pard \ltrpar\qj \fi368\li340\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin340\itap0\pararsid2432159 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159\charrsid5053873
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 UV}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39
|
||||||
|
UV channel used by the texture. Normally this is the first channel.}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159\charrsid5053873
|
||||||
|
\par }\pard \ltrpar\qj \li340\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin340\itap0\pararsid2432159 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159\charrsid5053873 \tab
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 * }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
|
\b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 MIPs}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 ":
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 \hich\af39\dbch\af31505\loch\f39 Number of MIP map levels created for the textur\hich\af39\dbch\af31505\loch\f39 e
|
||||||
|
\par }\pard \ltrpar\qj \li708\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin708\itap0\pararsid2432159 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159\charrsid5053873
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 * }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
|
\b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 Blend}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 ":
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 \hich\af39\dbch\af31505\loch\f39 Strength of the texture. The \hich\af39\dbch\af31505\loch\f39 color value obtained from\hich\af39\dbch\af31505\loch\f39 the texture is \hich\af39\dbch\af31505\loch\f39 multiplied
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 \hich\af39\dbch\af31505\loch\f39 with this factor to calculate the final color.
|
||||||
|
\par }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 Op}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid2432159 \hich\af39\dbch\af31505\loch\f39 Blend operation used to combine this texture with the corresponding \hich\af39\dbch\af31505\loch\f39 material color \hich\af39\dbch\af31505\loch\f39 (
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 or the previous texture\hich\af39\dbch\af31505\loch\f39 ).
|
||||||
|
\par }\pard \ltrpar\qj \li340\ri1474\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1474\lin340\itap0\pararsid6976329 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid6976329 \hich\af39\dbch\af31505\loch\f39
|
||||||
|
Always visible\hich\af39\dbch\af31505\loch\f39 :}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid6976329\charrsid6976329
|
||||||
\par }\pard \ltrpar\qj \li700\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin700\itap0\pararsid9465848 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873
|
\par }\pard \ltrpar\qj \li700\ri1208\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin1208\lin700\itap0\pararsid9465848 {\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873
|
||||||
\hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 FPS}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\hich\af39\dbch\af31505\loch\f39 * "}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \b\i\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 FPS}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": Current frame rate, in frames per se}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 ": Cur\hich\af39\dbch\af31505\loch\f39 rent frame rate, in frames per se}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
\hich\af39\dbch\af31505\loch\f39 cond. Note that this number }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid13463017\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 is }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 cond. Note that this number }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid13463017\charrsid5053873
|
||||||
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 not really exact.}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39
|
\hich\af39\dbch\af31505\loch\f39 is }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid5053873 \hich\af39\dbch\af31505\loch\f39 not really exact.}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0
|
||||||
It is only an approximation to the real frame rate. The maximum frame rate \hich\af39\dbch\af31505\loch\f39 will\hich\af39\dbch\af31505\loch\f39 \hich\af39\dbch\af31505\loch\f39 never be reached since there is a 10 ms blocker included (
|
\f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873 \hich\af39\dbch\af31505\loch\f39 It is only an approximation to the real frame rate. The maximum frame rate will never be reached since there is a 10 ms blocker included (to work around good }{
|
||||||
\hich\af39\dbch\af31505\loch\f39 to work around good old AMD timing bug\hich\af39\dbch\af31505\loch\f39 )}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid9465848
|
\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid6976329 \hich\af39\dbch\af31505\loch\f39 our }{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5053873
|
||||||
|
\hich\af39\dbch\af31505\loch\f39 old AMD timing b\hich\af39\dbch\af31505\loch\f39 ug)}{\rtlch\fcs1 \af39\afs16 \ltrch\fcs0 \f39\fs16\lang1033\langfe1031\langnp1033\insrsid5338181\charrsid9465848
|
||||||
\par }\pard \ltrpar\ql \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \hich\f39 The \'93}{
|
\par }\pard \ltrpar\ql \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \hich\f39 The \'93}{
|
||||||
\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Rendering}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Rendering}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
\loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 panel provides rendering-related options, such as wireframe/normal visualization.}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid9465848
|
\loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 panel provides rendering-related options, such as wireframe/normal visualization.}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid9465848
|
||||||
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \hich\f39 \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \hich\f39 \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
\hich\af39\dbch\af31505\loch\f39 Interaction}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 bundles all input related options.
|
\hich\af39\dbch\af31505\loch\f39 Interaction}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 bundles all input related options.
|
||||||
\par \hich\af39\dbch\af31505\loch\f39 The main \hich\af39\dbch\af31505\loch\f39 component is the large viewer panel where the assets are displayed. Status messages (e.g. if a texture could not be loaded)}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
\par \hich\af39\dbch\af31505\loch\f39 The main \hich\af39\dbch\af31505\loch\f39 component is the large viewer panel where the assets are displayed. Status messages (e.g. if a texture could not be loaded)}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
||||||
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid9465848 \hich\af39\dbch\af31505\loch\f39 \hich\af39\dbch\af31505\loch\f39 are displayed in the upper-right}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid9465848 \hich\af39\dbch\af31505\loch\f39 are displayed in the upper-right}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 edge.
|
||||||
\hich\af39\dbch\af31505\loch\f39 edge.}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid9465848 \hich\af39\dbch\af31505\loch\f39
|
}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid9465848 \hich\af39\dbch\af31505\loch\f39 Yellow messages are simple information messages, red messages are error messages. Green messa\hich\af39\dbch\af31505\loch\f39
|
||||||
Yellow messages are simple information messages, red messages are error messages. Green messages\hich\af39\dbch\af31505\loch\f39 , however, are coming from heart ;-)}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
ges, however, are coming from heart ;-)}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
|
||||||
\par }{\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181
|
\par }{\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
\par }\pard \ltrpar\ql \fi-360\li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 III.\tab Input
|
\par }\pard \ltrpar\ql \fi-360\li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 III.\tab Input
|
||||||
\par }\pard \ltrpar\ql \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \hich\f39
|
\par }\pard \ltrpar\ql \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \hich\f39
|
||||||
|
@ -221,46 +267,45 @@ The input mode depends on the selected input behavior. If \'84}{\rtlch\fcs1 \ai\
|
||||||
\par \loch\af39\dbch\af31505\hich\f39 \lquote }{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Arrow left\hich\f39 \rquote }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
\par \loch\af39\dbch\af31505\hich\f39 \lquote }{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Arrow left\hich\f39 \rquote }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
||||||
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \tab = Move to the left
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \tab = Move to the left
|
||||||
\par \loch\af39\dbch\af31505\hich\f39 \lquote }{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Arrow down}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
\par \loch\af39\dbch\af31505\hich\f39 \lquote }{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Arrow down}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
||||||
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \rquote \loch\f39 \tab = Move backwards
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \rquote \loch\f39 \tab \hich\af39\dbch\af31505\loch\f39 = Move backwards
|
||||||
\par \loch\af39\dbch\af31505\hich\f39 \lquote }{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Arrow right}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
\par \loch\af39\dbch\af31505\hich\f39 \lquote }{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Arrow right}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
||||||
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \rquote \loch\f39 \tab = Move to the right
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \rquote \loch\f39 \tab = Move to the right
|
||||||
\par }\pard \ltrpar\ql \fi340\li0\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
\par }\pard \ltrpar\ql \fi340\li0\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
||||||
The mouse specifies the view direction. This is the typical FPS input behavior.
|
The mouse specifies the view direction. This is the typical FPS input behavior.
|
||||||
\par }{\rtlch\fcs1 \ab\af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Otherwise\hich\af39\dbch\af31505\loch\f39 \hich\f39 , if \'84}{\rtlch\fcs1 \ab\ai\af39\afs20 \ltrch\fcs0
|
\par }{\rtlch\fcs1 \ab\af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 \hich\f39 Otherwise, if \'84}{\rtlch\fcs1 \ab\ai\af39\afs20 \ltrch\fcs0
|
||||||
\b\i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Zoom/Rotate}{\rtlch\fcs1 \ab\af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39
|
\b\i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Zoom/Rotate}{\rtlch\fcs1 \ab\af39\afs20 \ltrch\fcs0 \b\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39
|
||||||
is enabled:
|
is enabled:
|
||||||
\par }\pard \ltrpar\ql \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1
|
\par }\pard \ltrpar\ql \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1
|
||||||
\ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Left Mouse Button}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
\ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Left Mouse Button}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
\loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 = Keep pressed and move the mouse to rotate the asset around its local axes. Inside the yellow circle: x/y-axis, outside: Z-axis. To rotate around one axis only use the axis snap-ins (yellow squares with a
|
\loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 = Keep pressed and move the mouse to rotate the asset around its\hich\af39\dbch\af31505\loch\f39
|
||||||
\hich\af39\dbch\af31505\loch\f39 cross inside).
|
local axes. Inside the yellow circle: x/y-axis, outside: Z-axis. To rotate around one axis only use the axis snap-ins (yellow squares with a cross inside).
|
||||||
\par \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Right Mouse Button}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
\par \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Right Mouse Button}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
||||||
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 = Keep pressed and move the mouse to rotate the light source(s) around their x and y axes.
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 = Keep pressed and move the mouse to rotate the light source(s) around their x\hich\af39\dbch\af31505\loch\f39 and y axes.
|
||||||
\par \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Middle Mouse Button}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
\par \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Middle Mouse Button}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
||||||
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 = Keep pressed and move the mouse from the left to the right or the other way round to increase/decrease t\hich\af39\dbch\af31505\loch\f39
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 = Keep pressed and move the mouse from the left to the right or the other way round to increase/decrease the intensity of the light source(s)
|
||||||
he intensity of the light source(s)
|
|
||||||
\par \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Right }{\rtlch\fcs1 \ab\ai\af39\afs20 \ltrch\fcs0
|
\par \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Right }{\rtlch\fcs1 \ab\ai\af39\afs20 \ltrch\fcs0
|
||||||
\b\i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 AND}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Left Mouse Button}{
|
\b\i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 AND}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Left Mouse Button}{
|
||||||
\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 = Keep pressed and move the mouse to rotate skybox (if existing) around the global x/y axes.
|
\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 = Keep pressed and move the mouse to rotate skybo\hich\af39\dbch\af31505\loch\f39
|
||||||
|
x (if existing) around the global x/y axes.
|
||||||
\par \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Mouse wheel}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
\par \loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Mouse wheel}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0
|
||||||
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 = Zoom in/out
|
\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 = Zoom in/out
|
||||||
\par }\pard \ltrpar\ql \fi-360\li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 IV.\tab }{\rtlch\fcs1
|
\par }\pard \ltrpar\ql \fi-360\li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 IV.\tab }{\rtlch\fcs1
|
||||||
\af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Rendering
|
\af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Rendering
|
||||||
\par }\pard \ltrpar\ql \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
\par }\pard \ltrpar\ql \li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
||||||
Enabling MultiSampling improves rendering\hich\af39\dbch\af31505\loch\f39 quality. MultiSampling is activated by default. The highest quality MultiSampling mode supported by the video card is used.
|
Enabling MultiSampling improves rendering quality. MultiSampling is activated by default. The highest quality MultiSampling mode supported by the video card is used.
|
||||||
\par \hich\af39\dbch\af31505\loch\f39 MultiSampling is especially useful to remove line artifacts in wireframe/normals mode. Note that the transition between normal and \hich\af39\dbch\af31505\loch\f39 multisampled rendering may take a few seconds.
|
\par \hich\af39\dbch\af31505\loch\f39 Mult\hich\af39\dbch\af31505\loch\f39 iSampling is especially useful to remove line artifacts in wireframe/normals mode. Note that the transition between normal and multisampled rendering may take a few seconds.
|
||||||
\par \hich\af39\dbch\af31505\loch\f39 \hich\f39 Rendering is done via Direct3D\'99\loch\f39 \hich\f39 9.0c. Note that the \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
\par \hich\af39\dbch\af31505\loch\f39 \hich\f39 Rendering is done via Direct3D\'99\loch\f39 \hich\f39 9.0c. Note that the \'93}{\rtlch\fcs1 \ai\af39\afs20 \ltrch\fcs0 \i\f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39
|
||||||
Low-quality lighting}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 -Option is not available for PS 2.0 cards. Lighting on PS 2.0 cards is always low quality.
|
Low-quality lighting}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \loch\af39\dbch\af31505\hich\f39 \'94\loch\f39 -Option \hich\af39\dbch\af31505\loch\f39
|
||||||
|
is not available for PS 2.0 cards. Lighting on PS 2.0 cards is always low quality.
|
||||||
\par
|
\par
|
||||||
\par }\pard \ltrpar\ql \fi-360\li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 V.\tab }{\rtlch\fcs1
|
\par }\pard \ltrpar\ql \fi-360\li340\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin340\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 V.\tab }{\rtlch\fcs1
|
||||||
\af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Known issues
|
\af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181 \hich\af39\dbch\af31505\loch\f39 Known issues
|
||||||
\par }\pard \ltrpar\ql \fi-360\li700\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin700\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab \hich\af39\dbch\af31505\loch\f39
|
\par }\pard \ltrpar\ql \fi-360\li700\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin700\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab \hich\af39\dbch\af31505\loch\f39
|
||||||
If a loading process is \hich\af39\dbch\af31505\loch\f39 canceled it is not guaranteed that further loading processes will succeed. ASSIMP Viewer might even crash in this case. }{\rtlch\fcs1 \af39\afs24 \ltrch\fcs0
|
If a loading process is canceled it is not guaranteed that further loading processes will succeed. ASSIMP Viewer might even crash in this case. }{\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
|
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab \hich\af39\dbch\af31505\loch\f39 Some v\hich\af39\dbch\af31505\loch\f39
|
||||||
|
ery complex materials involving real time reflection/refraction are not displayed properly.}{\rtlch\fcs1 \af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
|
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab \hich\af39\dbch\af31505\loch\f39 When rendering non-opaque objects some triangle artifacts might occur.}{\rtlch\fcs1 \af39\afs24 \ltrch\fcs0
|
||||||
\f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181
|
\f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181
|
||||||
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab \hich\af39\dbch\af31505\loch\f39 Some very complex materials involving real time reflection/refraction are not displayed properly.}{\rtlch\fcs1
|
|
||||||
\af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181
|
|
||||||
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\lang1033\langfe1031\langnp1033\insrsid5338181 -\tab \hich\af39\dbch\af31505\loch\f39 When rendering non-opaque objects\hich\af39\dbch\af31505\loch\f39 some triangle artifacts might occur.}{\rtlch\fcs1
|
|
||||||
\af39\afs24 \ltrch\fcs0 \f39\fs24\lang1033\langfe1031\langnp1033\insrsid5338181
|
|
||||||
\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8
|
\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8
|
||||||
72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7
|
72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7
|
||||||
2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b
|
2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b
|
||||||
|
@ -366,8 +411,8 @@ fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f000000000000000000000000a034
|
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f000000000000000000000000b080
|
||||||
b356e3b4c801feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
|
05aceae0c801feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
|
||||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
|
||||||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
|
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000105000000000000}}
|
0000000000000000000000000000000000000000000000000105000000000000}}
|
|
@ -0,0 +1,55 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Open Asset Import Library - Frequently Asked Questions (FAQ)</title>
|
||||||
|
<meta name="keywords" content="ASSIMP Open Asset Import Library free Open Source 3d Model Import Library C C++ Java MDL X OBJ MD2 MD3 PLY " />
|
||||||
|
<meta name="description" content="Open Asset Import Library" />
|
||||||
|
<link href="css/faq_style.css" rel="stylesheet" type="text/css" media="screen"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="header">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
<div id="posts_fl">
|
||||||
|
<div class="post_fl">
|
||||||
|
|
||||||
|
<h1>ASSIMP - Frequently Asked Questions (FAQ)</h2>
|
||||||
|
|
||||||
|
<h4>Can I use the library for a commercial product?</h4>
|
||||||
|
Yes. ASSIMP is licensed under a modified BSD license. Its contents in just one sentence: you may use the library for free, in commercial or non-commercial applications, but you must include our license with your product and you may not advertise with us.
|
||||||
|
|
||||||
|
<h4>Is ASSIMP able to export assets?</h4>
|
||||||
|
No. ASSIMP is an <b>import</b> library. It is intended to be used to import assets exported from programs like 3ds max into game engines. Normally you won't need to export the assets again.
|
||||||
|
|
||||||
|
|
||||||
|
<h4>For which languages is the API provided?</h4>
|
||||||
|
The ASSIMP API is provided both as a plain-C interface and as an object-oriented C++ interface, which is the main API. All ports (jAssimp, Assimp.net, ...) and even the C-style API are just wrappers around this interface. Therefore, if your project allows the use of C++, you should use the C++-API.
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Is the library thread-safe?</h4>
|
||||||
|
Yes. ASSIMP is completely thread-safe, as long as you create an extra 'Importer' instance for each thread. The C-API and all ports are doing this automatically for you.
|
||||||
|
|
||||||
|
<h4>Who are you (the guys behind ASSIMP)?</h4>
|
||||||
|
Most of use are professional software developers from Germany, but not in GameDev business. Graphics/game programming is a hobby for all of us.
|
||||||
|
|
||||||
|
<h4>Can I write a new loader for the library?</h4>
|
||||||
|
Sure, as long as you're able to write stable code and the format is not too exotic ... We'd highly appreciate any help. When you're finished, contact us and we're going to test it. If it works well, it will be included with the next release of the library.
|
||||||
|
|
||||||
|
<h4>I love you. May I marry all of you?</h4>
|
||||||
|
We're sorry, but this is absolutely not possible.
|
||||||
|
|
||||||
|
<br><br><br><br><br><br><br>
|
||||||
|
<p><a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=226462&type=2" width="125" height="37" border="0" alt="SourceForge.net Logo"
|
||||||
|
/></a></p>
|
||||||
|
|
||||||
|
</div></div></div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,243 @@
|
||||||
|
Creative Commons </>
|
||||||
|
|
||||||
|
Creative Commons Legal Code
|
||||||
|
|
||||||
|
*Attribution 2.5*
|
||||||
|
|
||||||
|
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||||
|
LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
|
||||||
|
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION
|
||||||
|
ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE
|
||||||
|
INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||||
|
ITS USE.
|
||||||
|
|
||||||
|
/License/
|
||||||
|
|
||||||
|
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
|
||||||
|
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
|
||||||
|
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
|
||||||
|
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
||||||
|
|
||||||
|
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
|
||||||
|
TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE
|
||||||
|
RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS
|
||||||
|
AND CONDITIONS.
|
||||||
|
|
||||||
|
*1. Definitions*
|
||||||
|
|
||||||
|
1. *"Collective Work"* means a work, such as a periodical issue,
|
||||||
|
anthology or encyclopedia, in which the Work in its entirety in
|
||||||
|
unmodified form, along with a number of other contributions,
|
||||||
|
constituting separate and independent works in themselves, are
|
||||||
|
assembled into a collective whole. A work that constitutes a
|
||||||
|
Collective Work will not be considered a Derivative Work (as
|
||||||
|
defined below) for the purposes of this License.
|
||||||
|
2. *"Derivative Work"* means a work based upon the Work or upon the
|
||||||
|
Work and other pre-existing works, such as a translation, musical
|
||||||
|
arrangement, dramatization, fictionalization, motion picture
|
||||||
|
version, sound recording, art reproduction, abridgment,
|
||||||
|
condensation, or any other form in which the Work may be recast,
|
||||||
|
transformed, or adapted, except that a work that constitutes a
|
||||||
|
Collective Work will not be considered a Derivative Work for the
|
||||||
|
purpose of this License. For the avoidance of doubt, where the
|
||||||
|
Work is a musical composition or sound recording, the
|
||||||
|
synchronization of the Work in timed-relation with a moving image
|
||||||
|
("synching") will be considered a Derivative Work for the purpose
|
||||||
|
of this License.
|
||||||
|
3. *"Licensor"* means the individual or entity that offers the Work
|
||||||
|
under the terms of this License.
|
||||||
|
4. *"Original Author"* means the individual or entity who created the
|
||||||
|
Work.
|
||||||
|
5. *"Work"* means the copyrightable work of authorship offered under
|
||||||
|
the terms of this License.
|
||||||
|
6. *"You"* means an individual or entity exercising rights under this
|
||||||
|
License who has not previously violated the terms of this License
|
||||||
|
with respect to the Work, or who has received express permission
|
||||||
|
from the Licensor to exercise rights under this License despite a
|
||||||
|
previous violation.
|
||||||
|
|
||||||
|
*2. Fair Use Rights.* Nothing in this license is intended to reduce,
|
||||||
|
limit, or restrict any rights arising from fair use, first sale or other
|
||||||
|
limitations on the exclusive rights of the copyright owner under
|
||||||
|
copyright law or other applicable laws.
|
||||||
|
|
||||||
|
*3. License Grant.* Subject to the terms and conditions of this License,
|
||||||
|
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
|
||||||
|
perpetual (for the duration of the applicable copyright) license to
|
||||||
|
exercise the rights in the Work as stated below:
|
||||||
|
|
||||||
|
1. to reproduce the Work, to incorporate the Work into one or more
|
||||||
|
Collective Works, and to reproduce the Work as incorporated in the
|
||||||
|
Collective Works;
|
||||||
|
2. to create and reproduce Derivative Works;
|
||||||
|
3. to distribute copies or phonorecords of, display publicly, perform
|
||||||
|
publicly, and perform publicly by means of a digital audio
|
||||||
|
transmission the Work including as incorporated in Collective Works;
|
||||||
|
4. to distribute copies or phonorecords of, display publicly, perform
|
||||||
|
publicly, and perform publicly by means of a digital audio
|
||||||
|
transmission Derivative Works.
|
||||||
|
5.
|
||||||
|
|
||||||
|
For the avoidance of doubt, where the work is a musical composition:
|
||||||
|
|
||||||
|
1. *Performance Royalties Under Blanket Licenses*. Licensor
|
||||||
|
waives the exclusive right to collect, whether individually
|
||||||
|
or via a performance rights society (e.g. ASCAP, BMI,
|
||||||
|
SESAC), royalties for the public performance or public
|
||||||
|
digital performance (e.g. webcast) of the Work.
|
||||||
|
2. *Mechanical Rights and Statutory Royalties*. Licensor waives
|
||||||
|
the exclusive right to collect, whether individually or via
|
||||||
|
a music rights agency or designated agent (e.g. Harry Fox
|
||||||
|
Agency), royalties for any phonorecord You create from the
|
||||||
|
Work ("cover version") and distribute, subject to the
|
||||||
|
compulsory license created by 17 USC Section 115 of the US
|
||||||
|
Copyright Act (or the equivalent in other jurisdictions).
|
||||||
|
6. *Webcasting Rights and Statutory Royalties*. For the avoidance of
|
||||||
|
doubt, where the Work is a sound recording, Licensor waives the
|
||||||
|
exclusive right to collect, whether individually or via a
|
||||||
|
performance-rights society (e.g. SoundExchange), royalties for the
|
||||||
|
public digital performance (e.g. webcast) of the Work, subject to
|
||||||
|
the compulsory license created by 17 USC Section 114 of the US
|
||||||
|
Copyright Act (or the equivalent in other jurisdictions).
|
||||||
|
|
||||||
|
The above rights may be exercised in all media and formats whether now
|
||||||
|
known or hereafter devised. The above rights include the right to make
|
||||||
|
such modifications as are technically necessary to exercise the rights
|
||||||
|
in other media and formats. All rights not expressly granted by Licensor
|
||||||
|
are hereby reserved.
|
||||||
|
|
||||||
|
*4. Restrictions.*The license granted in Section 3 above is expressly
|
||||||
|
made subject to and limited by the following restrictions:
|
||||||
|
|
||||||
|
1. You may distribute, publicly display, publicly perform, or
|
||||||
|
publicly digitally perform the Work only under the terms of this
|
||||||
|
License, and You must include a copy of, or the Uniform Resource
|
||||||
|
Identifier for, this License with every copy or phonorecord of the
|
||||||
|
Work You distribute, publicly display, publicly perform, or
|
||||||
|
publicly digitally perform. You may not offer or impose any terms
|
||||||
|
on the Work that alter or restrict the terms of this License or
|
||||||
|
the recipients' exercise of the rights granted hereunder. You may
|
||||||
|
not sublicense the Work. You must keep intact all notices that
|
||||||
|
refer to this License and to the disclaimer of warranties. You may
|
||||||
|
not distribute, publicly display, publicly perform, or publicly
|
||||||
|
digitally perform the Work with any technological measures that
|
||||||
|
control access or use of the Work in a manner inconsistent with
|
||||||
|
the terms of this License Agreement. The above applies to the Work
|
||||||
|
as incorporated in a Collective Work, but this does not require
|
||||||
|
the Collective Work apart from the Work itself to be made subject
|
||||||
|
to the terms of this License. If You create a Collective Work,
|
||||||
|
upon notice from any Licensor You must, to the extent practicable,
|
||||||
|
remove from the Collective Work any credit as required by clause
|
||||||
|
4(b), as requested. If You create a Derivative Work, upon notice
|
||||||
|
from any Licensor You must, to the extent practicable, remove from
|
||||||
|
the Derivative Work any credit as required by clause 4(b), as
|
||||||
|
requested.
|
||||||
|
2. If you distribute, publicly display, publicly perform, or publicly
|
||||||
|
digitally perform the Work or any Derivative Works or Collective
|
||||||
|
Works, You must keep intact all copyright notices for the Work and
|
||||||
|
provide, reasonable to the medium or means You are utilizing: (i)
|
||||||
|
the name of the Original Author (or pseudonym, if applicable) if
|
||||||
|
supplied, and/or (ii) if the Original Author and/or Licensor
|
||||||
|
designate another party or parties (e.g. a sponsor institute,
|
||||||
|
publishing entity, journal) for attribution in Licensor's
|
||||||
|
copyright notice, terms of service or by other reasonable means,
|
||||||
|
the name of such party or parties; the title of the Work if
|
||||||
|
supplied; to the extent reasonably practicable, the Uniform
|
||||||
|
Resource Identifier, if any, that Licensor specifies to be
|
||||||
|
associated with the Work, unless such URI does not refer to the
|
||||||
|
copyright notice or licensing information for the Work; and in the
|
||||||
|
case of a Derivative Work, a credit identifying the use of the
|
||||||
|
Work in the Derivative Work (e.g., "French translation of the Work
|
||||||
|
by Original Author," or "Screenplay based on original Work by
|
||||||
|
Original Author"). Such credit may be implemented in any
|
||||||
|
reasonable manner; provided, however, that in the case of a
|
||||||
|
Derivative Work or Collective Work, at a minimum such credit will
|
||||||
|
appear where any other comparable authorship credit appears and in
|
||||||
|
a manner at least as prominent as such other comparable authorship
|
||||||
|
credit.
|
||||||
|
|
||||||
|
*5. Representations, Warranties and Disclaimer*
|
||||||
|
|
||||||
|
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
|
||||||
|
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
|
||||||
|
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
|
||||||
|
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
|
||||||
|
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
|
||||||
|
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||||
|
EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
|
||||||
|
|
||||||
|
*6. Limitation on Liability.* EXCEPT TO THE EXTENT REQUIRED BY
|
||||||
|
APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL
|
||||||
|
THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY
|
||||||
|
DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF
|
||||||
|
LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
*7. Termination*
|
||||||
|
|
||||||
|
1. This License and the rights granted hereunder will terminate
|
||||||
|
automatically upon any breach by You of the terms of this License.
|
||||||
|
Individuals or entities who have received Derivative Works or
|
||||||
|
Collective Works from You under this License, however, will not
|
||||||
|
have their licenses terminated provided such individuals or
|
||||||
|
entities remain in full compliance with those licenses. Sections
|
||||||
|
1, 2, 5, 6, 7, and 8 will survive any termination of this License.
|
||||||
|
2. Subject to the above terms and conditions, the license granted
|
||||||
|
here is perpetual (for the duration of the applicable copyright in
|
||||||
|
the Work). Notwithstanding the above, Licensor reserves the right
|
||||||
|
to release the Work under different license terms or to stop
|
||||||
|
distributing the Work at any time; provided, however that any such
|
||||||
|
election will not serve to withdraw this License (or any other
|
||||||
|
license that has been, or is required to be, granted under the
|
||||||
|
terms of this License), and this License will continue in full
|
||||||
|
force and effect unless terminated as stated above.
|
||||||
|
|
||||||
|
*8. Miscellaneous*
|
||||||
|
|
||||||
|
1. Each time You distribute or publicly digitally perform the Work or
|
||||||
|
a Collective Work, the Licensor offers to the recipient a license
|
||||||
|
to the Work on the same terms and conditions as the license
|
||||||
|
granted to You under this License.
|
||||||
|
2. Each time You distribute or publicly digitally perform a
|
||||||
|
Derivative Work, Licensor offers to the recipient a license to the
|
||||||
|
original Work on the same terms and conditions as the license
|
||||||
|
granted to You under this License.
|
||||||
|
3. If any provision of this License is invalid or unenforceable under
|
||||||
|
applicable law, it shall not affect the validity or enforceability
|
||||||
|
of the remainder of the terms of this License, and without further
|
||||||
|
action by the parties to this agreement, such provision shall be
|
||||||
|
reformed to the minimum extent necessary to make such provision
|
||||||
|
valid and enforceable.
|
||||||
|
4. No term or provision of this License shall be deemed waived and no
|
||||||
|
breach consented to unless such waiver or consent shall be in
|
||||||
|
writing and signed by the party to be charged with such waiver or
|
||||||
|
consent.
|
||||||
|
5. This License constitutes the entire agreement between the parties
|
||||||
|
with respect to the Work licensed here. There are no
|
||||||
|
understandings, agreements or representations with respect to the
|
||||||
|
Work not specified here. Licensor shall not be bound by any
|
||||||
|
additional provisions that may appear in any communication from
|
||||||
|
You. This License may not be modified without the mutual written
|
||||||
|
agreement of the Licensor and You.
|
||||||
|
|
||||||
|
Creative Commons is not a party to this License, and makes no warranty
|
||||||
|
whatsoever in connection with the Work. Creative Commons will not be
|
||||||
|
liable to You or any party on any legal theory for any damages
|
||||||
|
whatsoever, including without limitation any general, special,
|
||||||
|
incidental or consequential damages arising in connection to this
|
||||||
|
license. Notwithstanding the foregoing two (2) sentences, if Creative
|
||||||
|
Commons has expressly identified itself as the Licensor hereunder, it
|
||||||
|
shall have all rights and obligations of Licensor.
|
||||||
|
|
||||||
|
Except for the limited purpose of indicating to the public that the Work
|
||||||
|
is licensed under the CCPL, neither party will use the trademark
|
||||||
|
"Creative Commons" or any related trademark or logo of Creative Commons
|
||||||
|
without the prior written consent of Creative Commons. Any permitted use
|
||||||
|
will be in compliance with Creative Commons' then-current trademark
|
||||||
|
usage guidelines, as may be published on its website or otherwise made
|
||||||
|
available upon request from time to time.
|
||||||
|
|
||||||
|
Creative Commons may be contacted at http://creativecommons.org/
|
||||||
|
<http://creativecommons.org>.
|
||||||
|
|
||||||
|
« Back to Commons Deed <./>
|
|
@ -0,0 +1,177 @@
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background: #777777;
|
||||||
|
font: normal 11px Tahoma, Arial, Helvetica, sans-serif;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||||
|
color: #F49500;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p, blockquote, ul, ol {
|
||||||
|
line-height: 18px;
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
padding-left: 20px;
|
||||||
|
background: url(../images/img05.gif) repeat-y;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #F49500;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header */
|
||||||
|
|
||||||
|
#header {
|
||||||
|
width: 760px;
|
||||||
|
height: 180px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header h1, #header h2 {
|
||||||
|
/*text-transform: lowercase;*/
|
||||||
|
font-weight: normal;
|
||||||
|
color: #ffffff; //#FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header h1 {
|
||||||
|
float: left;
|
||||||
|
padding: 120px 0 0 20px;
|
||||||
|
font-size: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header h2 {
|
||||||
|
float: right;
|
||||||
|
padding: 134px 20px 0 0;
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Menu */
|
||||||
|
|
||||||
|
#menu {
|
||||||
|
width: 760px;
|
||||||
|
height: 50px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
padding: 17px 20px 0 20px;
|
||||||
|
background: url(../images/img03.gif) no-repeat;
|
||||||
|
text-transform: uppercase;
|
||||||
|
text-decoration: none;
|
||||||
|
font: bold 12px "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||||
|
color: #D8D8D8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a:hover {
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu .first a {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Content */
|
||||||
|
|
||||||
|
#content {
|
||||||
|
width: 720px;
|
||||||
|
margin: 0 auto 20px auto;
|
||||||
|
padding: 20px;
|
||||||
|
background: #FFFFFF url(../images/img04.jpg) repeat-x left bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Posts */
|
||||||
|
|
||||||
|
#posts {
|
||||||
|
float: left;
|
||||||
|
width: 480px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Posts - full length */
|
||||||
|
|
||||||
|
#posts_fl {
|
||||||
|
float: center;
|
||||||
|
width: 680px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Links */
|
||||||
|
|
||||||
|
#links {
|
||||||
|
float: right;
|
||||||
|
width: 200px;
|
||||||
|
padding-left: 20px;
|
||||||
|
background: url(../images/img05.gif) repeat-y;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li ul {
|
||||||
|
padding: 5px 0 30px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li li {
|
||||||
|
padding: 7px 10px;
|
||||||
|
background: url(../images/img06.gif) repeat-x left bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li h2 {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Footer */
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
height: 100px;
|
||||||
|
padding: 20px;
|
||||||
|
background: #2D2D2D url(../images/img07.gif) repeat-x;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer p {
|
||||||
|
text-align: center;
|
||||||
|
color: #999999;
|
||||||
|
}
|
|
@ -0,0 +1,220 @@
|
||||||
|
#lightbox{ position: absolute; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;}
|
||||||
|
#lightbox img{ width: auto; height: auto;}
|
||||||
|
#lightbox a img{ border: none; }
|
||||||
|
|
||||||
|
#outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; }
|
||||||
|
#imageContainer{ padding: 10px; }
|
||||||
|
|
||||||
|
#loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; }
|
||||||
|
#hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; }
|
||||||
|
#imageContainer>#hoverNav{ left: 0;}
|
||||||
|
#hoverNav a{ outline: none;}
|
||||||
|
|
||||||
|
#prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; }
|
||||||
|
#prevLink { left: 0; float: left;}
|
||||||
|
#nextLink { right: 0; float: right;}
|
||||||
|
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
|
||||||
|
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }
|
||||||
|
|
||||||
|
#imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; }
|
||||||
|
|
||||||
|
#imageData{ padding:0 10px; color: #666; }
|
||||||
|
#imageData #imageDetails{ width: 70%; float: left; text-align: left; }
|
||||||
|
#imageData #caption{ font-weight: bold; }
|
||||||
|
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
|
||||||
|
#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;}
|
||||||
|
|
||||||
|
#overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
Design by Free CSS Templates
|
||||||
|
http://www.freecsstemplates.org
|
||||||
|
Released for free under a Creative Commons Attribution 2.5 License
|
||||||
|
*/
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background: #777777 url(../images/img01.jpg) repeat-x;
|
||||||
|
font: normal 11px Tahoma, Arial, Helvetica, sans-serif;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3 {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||||
|
color: #F49500;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p, blockquote, ul, ol {
|
||||||
|
line-height: 18px;
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
padding-left: 20px;
|
||||||
|
background: url(../images/img05.gif) repeat-y;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #F49500;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header */
|
||||||
|
|
||||||
|
#header {
|
||||||
|
width: 760px;
|
||||||
|
height: 180px;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: url(../images/img02.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
#header h1, #header h2 {
|
||||||
|
/*text-transform: lowercase;*/
|
||||||
|
font-weight: normal;
|
||||||
|
color: #ffffff; //#FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header h1 {
|
||||||
|
float: left;
|
||||||
|
padding: 120px 0 0 20px;
|
||||||
|
font-size: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header h2 {
|
||||||
|
float: right;
|
||||||
|
padding: 134px 20px 0 0;
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Menu */
|
||||||
|
|
||||||
|
#menu {
|
||||||
|
width: 760px;
|
||||||
|
height: 50px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
padding: 17px 20px 0 20px;
|
||||||
|
background: url(../images/img03.gif) no-repeat;
|
||||||
|
text-transform: uppercase;
|
||||||
|
text-decoration: none;
|
||||||
|
font: bold 12px "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||||
|
color: #D8D8D8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a:hover {
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu .first a {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Content */
|
||||||
|
|
||||||
|
#content {
|
||||||
|
width: 720px;
|
||||||
|
margin: 0 auto 20px auto;
|
||||||
|
padding: 20px;
|
||||||
|
background: #FFFFFF url(../images/img04.jpg) repeat-x left bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Posts */
|
||||||
|
|
||||||
|
#posts {
|
||||||
|
float: left;
|
||||||
|
width: 480px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Posts - full length */
|
||||||
|
|
||||||
|
#posts_fl {
|
||||||
|
float: center;
|
||||||
|
width: 680px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Links */
|
||||||
|
|
||||||
|
#links {
|
||||||
|
float: right;
|
||||||
|
width: 200px;
|
||||||
|
padding-left: 20px;
|
||||||
|
background: url(../images/img05.gif) repeat-y;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li ul {
|
||||||
|
padding: 5px 0 30px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li li {
|
||||||
|
padding: 7px 10px;
|
||||||
|
background: url(../images/img06.gif) repeat-x left bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#links li h2 {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Footer */
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
height: 100px;
|
||||||
|
padding: 20px;
|
||||||
|
background: #2D2D2D url(../images/img07.gif) repeat-x;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer p {
|
||||||
|
text-align: center;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 49 B |
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 979 B |
After Width: | Height: | Size: 723 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 178 KiB |
After Width: | Height: | Size: 321 B |
After Width: | Height: | Size: 863 B |
After Width: | Height: | Size: 44 B |
After Width: | Height: | Size: 43 B |
After Width: | Height: | Size: 97 B |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.8 KiB |
|
@ -0,0 +1,101 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Open Asset Import Library</title>
|
||||||
|
<meta name="keywords" content="ASSIMP Open Asset Import Library free Open Source 3d Model Import Library C C++ Java MDL X OBJ MD2 MD3 PLY " />
|
||||||
|
<meta name="description" content="Open Asset Import Library" />
|
||||||
|
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen"/>
|
||||||
|
<script src="js/prototype.js" type="text/javascript"></script>
|
||||||
|
<script src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
|
||||||
|
<script src="js/lightbox.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="header">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- end #header -->
|
||||||
|
<div id="menu">
|
||||||
|
<ul>
|
||||||
|
<li class="first"><a href="#" accesskey="1" title="">About</a></li>
|
||||||
|
<li><a href="main_features.html" accesskey="2" title="">Features</a></li>
|
||||||
|
<li><a href="main_viewer.html" accesskey="7" title="">Viewer</a></li>
|
||||||
|
<li><a href="main_doc.html" accesskey="3" title="">Documentation</a></li>
|
||||||
|
<li><a href="main_downloads.html" accesskey="4" title="">Downloads</a></li>
|
||||||
|
<li><a href="main_license.html" accesskey="8" title="">License</a></li>
|
||||||
|
<li><a href="main_contact.html" accesskey="5" title="">Contact</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- end #menu -->
|
||||||
|
<div id="content">
|
||||||
|
<div id="posts">
|
||||||
|
<div class="post">
|
||||||
|
<h2 class="title">Welcome</h2>
|
||||||
|
<div class="story">
|
||||||
|
<p>The <strong>Open Asset Import Library</strong> (Short name: ASSIMP) is a free library to import various well-known 3D model formats into applications. The library has been designed for maximum stability and efficiency. Written in C++, it is licensed under a <strong>modified BSD license</strong>. The API is provided for both C and C++, ports for other languages like Java, C# and Python are also available or in development. </p>
|
||||||
|
|
||||||
|
<p>The library is developed and maintained by Alexander "Aramis" Gessler, Thomas "Schrompf" Schulze, Kim "Kimmi" Kulling and Rainer "Guru" Schmidt.</p>
|
||||||
|
|
||||||
|
<p>Current version: <strong>1.0 beta</strong></p>
|
||||||
|
|
||||||
|
<p><a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=226462&type=2" width="125" height="37" border="0" alt="SourceForge.net Logo"
|
||||||
|
/></a></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post">
|
||||||
|
<h2 class="title">Feature overview</h2>
|
||||||
|
<div class="story">
|
||||||
|
<ul>
|
||||||
|
<li>Imports all model formats in a shared in-memory data format which can easily be read and processed by applications. </li>
|
||||||
|
<li>PostProcessingSteps: Transform the imported models in the form that fits best to your needs (e.g. vertex layout optimization, tangent space calculation ...)</li> <li>Fully featured model viewer (<a href="main_viewer.html">more</a>) included with the library</li>
|
||||||
|
<li>
|
||||||
|
No external dependencies except boost. All loaders are stand-alone implementations, no external format libs are required.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Supported file formats (see the <a href="main_features.html">Features</a> page for a complete list):</p>
|
||||||
|
<ul>
|
||||||
|
<li>Wavefront OBJ</li>
|
||||||
|
<li>Quake I MDL</li>
|
||||||
|
<li>3D Studio Max 3DS</li>
|
||||||
|
<li>3D Studio Max ASE</li>
|
||||||
|
<li>DirectX X</li>
|
||||||
|
<li>Conitec 3D GameStudio MDL (MDL2, MDl3, MDL4, MDL5, MDL7)</li>
|
||||||
|
<li>Conitec 3D GameStudio HMP (HMP4, HMP5, HMP7)</li>
|
||||||
|
<li>Quake II MD2</li>
|
||||||
|
<li>Quake III MD3</li>
|
||||||
|
<li>Return To Castle Wolfenstein MDC</li>
|
||||||
|
<li>Ravensoft MDR</li>
|
||||||
|
<li>Valve SMD</li>
|
||||||
|
<li>Stanford PLY</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end #posts -->
|
||||||
|
<div id="links">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<h2>Screenshots</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="screenshots/sshot1.png" title="A futuristic weapon, modelled in 3ds max and exported to ASE" rel="lightbox"><img src="screenshots/sshot1s.png"> </a></li>
|
||||||
|
<li><a href="screenshots/sshot2.png" title="A low-poly tree in Conitec's MDL7 file format. Model by Rainer Prokein (http://reinerstileset.4players.de)" rel="lightbox"><img src="screenshots/sshot2s.png"> </a></li>
|
||||||
|
<li><a href="screenshots/sshot3.png" title="Stanford dragon with 0.8 mio triangles loaded from a PLY file" rel="lightbox"><img src="screenshots/sshot3s.png"> </a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- end #links -->
|
||||||
|
<div style="clear: both;"> </div>
|
||||||
|
</div>
|
||||||
|
<!-- end #content -->
|
||||||
|
<div id="footer">
|
||||||
|
<p id="legal">Copyright © 2008 ASSIMP Team. Design template by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a></p>
|
||||||
|
</div>
|
||||||
|
<!-- end #footer -->
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,136 @@
|
||||||
|
// script.aculo.us builder.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
|
||||||
|
|
||||||
|
// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
||||||
|
//
|
||||||
|
// script.aculo.us is freely distributable under the terms of an MIT-style license.
|
||||||
|
// For details, see the script.aculo.us web site: http://script.aculo.us/
|
||||||
|
|
||||||
|
var Builder = {
|
||||||
|
NODEMAP: {
|
||||||
|
AREA: 'map',
|
||||||
|
CAPTION: 'table',
|
||||||
|
COL: 'table',
|
||||||
|
COLGROUP: 'table',
|
||||||
|
LEGEND: 'fieldset',
|
||||||
|
OPTGROUP: 'select',
|
||||||
|
OPTION: 'select',
|
||||||
|
PARAM: 'object',
|
||||||
|
TBODY: 'table',
|
||||||
|
TD: 'table',
|
||||||
|
TFOOT: 'table',
|
||||||
|
TH: 'table',
|
||||||
|
THEAD: 'table',
|
||||||
|
TR: 'table'
|
||||||
|
},
|
||||||
|
// note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
|
||||||
|
// due to a Firefox bug
|
||||||
|
node: function(elementName) {
|
||||||
|
elementName = elementName.toUpperCase();
|
||||||
|
|
||||||
|
// try innerHTML approach
|
||||||
|
var parentTag = this.NODEMAP[elementName] || 'div';
|
||||||
|
var parentElement = document.createElement(parentTag);
|
||||||
|
try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
|
||||||
|
parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
|
||||||
|
} catch(e) {}
|
||||||
|
var element = parentElement.firstChild || null;
|
||||||
|
|
||||||
|
// see if browser added wrapping tags
|
||||||
|
if(element && (element.tagName.toUpperCase() != elementName))
|
||||||
|
element = element.getElementsByTagName(elementName)[0];
|
||||||
|
|
||||||
|
// fallback to createElement approach
|
||||||
|
if(!element) element = document.createElement(elementName);
|
||||||
|
|
||||||
|
// abort if nothing could be created
|
||||||
|
if(!element) return;
|
||||||
|
|
||||||
|
// attributes (or text)
|
||||||
|
if(arguments[1])
|
||||||
|
if(this._isStringOrNumber(arguments[1]) ||
|
||||||
|
(arguments[1] instanceof Array) ||
|
||||||
|
arguments[1].tagName) {
|
||||||
|
this._children(element, arguments[1]);
|
||||||
|
} else {
|
||||||
|
var attrs = this._attributes(arguments[1]);
|
||||||
|
if(attrs.length) {
|
||||||
|
try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
|
||||||
|
parentElement.innerHTML = "<" +elementName + " " +
|
||||||
|
attrs + "></" + elementName + ">";
|
||||||
|
} catch(e) {}
|
||||||
|
element = parentElement.firstChild || null;
|
||||||
|
// workaround firefox 1.0.X bug
|
||||||
|
if(!element) {
|
||||||
|
element = document.createElement(elementName);
|
||||||
|
for(attr in arguments[1])
|
||||||
|
element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
|
||||||
|
}
|
||||||
|
if(element.tagName.toUpperCase() != elementName)
|
||||||
|
element = parentElement.getElementsByTagName(elementName)[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// text, or array of children
|
||||||
|
if(arguments[2])
|
||||||
|
this._children(element, arguments[2]);
|
||||||
|
|
||||||
|
return element;
|
||||||
|
},
|
||||||
|
_text: function(text) {
|
||||||
|
return document.createTextNode(text);
|
||||||
|
},
|
||||||
|
|
||||||
|
ATTR_MAP: {
|
||||||
|
'className': 'class',
|
||||||
|
'htmlFor': 'for'
|
||||||
|
},
|
||||||
|
|
||||||
|
_attributes: function(attributes) {
|
||||||
|
var attrs = [];
|
||||||
|
for(attribute in attributes)
|
||||||
|
attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
|
||||||
|
'="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"');
|
||||||
|
return attrs.join(" ");
|
||||||
|
},
|
||||||
|
_children: function(element, children) {
|
||||||
|
if(children.tagName) {
|
||||||
|
element.appendChild(children);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(typeof children=='object') { // array can hold nodes and text
|
||||||
|
children.flatten().each( function(e) {
|
||||||
|
if(typeof e=='object')
|
||||||
|
element.appendChild(e)
|
||||||
|
else
|
||||||
|
if(Builder._isStringOrNumber(e))
|
||||||
|
element.appendChild(Builder._text(e));
|
||||||
|
});
|
||||||
|
} else
|
||||||
|
if(Builder._isStringOrNumber(children))
|
||||||
|
element.appendChild(Builder._text(children));
|
||||||
|
},
|
||||||
|
_isStringOrNumber: function(param) {
|
||||||
|
return(typeof param=='string' || typeof param=='number');
|
||||||
|
},
|
||||||
|
build: function(html) {
|
||||||
|
var element = this.node('div');
|
||||||
|
$(element).update(html.strip());
|
||||||
|
return element.down();
|
||||||
|
},
|
||||||
|
dump: function(scope) {
|
||||||
|
if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
|
||||||
|
|
||||||
|
var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
|
||||||
|
"BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
|
||||||
|
"FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
|
||||||
|
"KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
|
||||||
|
"PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
|
||||||
|
"TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
|
||||||
|
|
||||||
|
tags.each( function(tag){
|
||||||
|
scope[tag] = function() {
|
||||||
|
return Builder.node.apply(Builder, [tag].concat($A(arguments)));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,497 @@
|
||||||
|
// -----------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Lightbox v2.04
|
||||||
|
// by Lokesh Dhakar - http://www.lokeshdhakar.com
|
||||||
|
// Last Modification: 2/9/08
|
||||||
|
//
|
||||||
|
// For more information, visit:
|
||||||
|
// http://lokeshdhakar.com/projects/lightbox2/
|
||||||
|
//
|
||||||
|
// Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
|
||||||
|
// - Free for use in both personal and commercial projects
|
||||||
|
// - Attribution requires leaving author name, author link, and the license info intact.
|
||||||
|
//
|
||||||
|
// Thanks: Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.com), and Thomas Fuchs(mir.aculo.us) for ideas, libs, and snippets.
|
||||||
|
// Artemy Tregubenko (arty.name) for cleanup and help in updating to latest ver of proto-aculous.
|
||||||
|
//
|
||||||
|
// -----------------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
|
||||||
|
Table of Contents
|
||||||
|
-----------------
|
||||||
|
Configuration
|
||||||
|
|
||||||
|
Lightbox Class Declaration
|
||||||
|
- initialize()
|
||||||
|
- updateImageList()
|
||||||
|
- start()
|
||||||
|
- changeImage()
|
||||||
|
- resizeImageContainer()
|
||||||
|
- showImage()
|
||||||
|
- updateDetails()
|
||||||
|
- updateNav()
|
||||||
|
- enableKeyboardNav()
|
||||||
|
- disableKeyboardNav()
|
||||||
|
- keyboardAction()
|
||||||
|
- preloadNeighborImages()
|
||||||
|
- end()
|
||||||
|
|
||||||
|
Function Calls
|
||||||
|
- document.observe()
|
||||||
|
|
||||||
|
*/
|
||||||
|
// -----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//
|
||||||
|
// Configurationl
|
||||||
|
//
|
||||||
|
LightboxOptions = Object.extend({
|
||||||
|
fileLoadingImage: 'images/loading.gif',
|
||||||
|
fileBottomNavCloseImage: 'images/closelabel.gif',
|
||||||
|
|
||||||
|
overlayOpacity: 0.8, // controls transparency of shadow overlay
|
||||||
|
|
||||||
|
animate: true, // toggles resizing animations
|
||||||
|
resizeSpeed: 7, // controls the speed of the image resizing animations (1=slowest and 10=fastest)
|
||||||
|
|
||||||
|
borderSize: 10, //if you adjust the padding in the CSS, you will need to update this variable
|
||||||
|
|
||||||
|
// When grouping images this is used to write: Image # of #.
|
||||||
|
// Change it for non-english localization
|
||||||
|
labelImage: "Image",
|
||||||
|
labelOf: "of"
|
||||||
|
}, window.LightboxOptions || {});
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
var Lightbox = Class.create();
|
||||||
|
|
||||||
|
Lightbox.prototype = {
|
||||||
|
imageArray: [],
|
||||||
|
activeImage: undefined,
|
||||||
|
|
||||||
|
// initialize()
|
||||||
|
// Constructor runs on completion of the DOM loading. Calls updateImageList and then
|
||||||
|
// the function inserts html at the bottom of the page which is used to display the shadow
|
||||||
|
// overlay and the image container.
|
||||||
|
//
|
||||||
|
initialize: function() {
|
||||||
|
|
||||||
|
this.updateImageList();
|
||||||
|
|
||||||
|
this.keyboardAction = this.keyboardAction.bindAsEventListener(this);
|
||||||
|
|
||||||
|
if (LightboxOptions.resizeSpeed > 10) LightboxOptions.resizeSpeed = 10;
|
||||||
|
if (LightboxOptions.resizeSpeed < 1) LightboxOptions.resizeSpeed = 1;
|
||||||
|
|
||||||
|
this.resizeDuration = LightboxOptions.animate ? ((11 - LightboxOptions.resizeSpeed) * 0.15) : 0;
|
||||||
|
this.overlayDuration = LightboxOptions.animate ? 0.2 : 0; // shadow fade in/out duration
|
||||||
|
|
||||||
|
// When Lightbox starts it will resize itself from 250 by 250 to the current image dimension.
|
||||||
|
// If animations are turned off, it will be hidden as to prevent a flicker of a
|
||||||
|
// white 250 by 250 box.
|
||||||
|
var size = (LightboxOptions.animate ? 250 : 1) + 'px';
|
||||||
|
|
||||||
|
|
||||||
|
// Code inserts html at the bottom of the page that looks similar to this:
|
||||||
|
//
|
||||||
|
// <div id="overlay"></div>
|
||||||
|
// <div id="lightbox">
|
||||||
|
// <div id="outerImageContainer">
|
||||||
|
// <div id="imageContainer">
|
||||||
|
// <img id="lightboxImage">
|
||||||
|
// <div style="" id="hoverNav">
|
||||||
|
// <a href="#" id="prevLink"></a>
|
||||||
|
// <a href="#" id="nextLink"></a>
|
||||||
|
// </div>
|
||||||
|
// <div id="loading">
|
||||||
|
// <a href="#" id="loadingLink">
|
||||||
|
// <img src="images/loading.gif">
|
||||||
|
// </a>
|
||||||
|
// </div>
|
||||||
|
// </div>
|
||||||
|
// </div>
|
||||||
|
// <div id="imageDataContainer">
|
||||||
|
// <div id="imageData">
|
||||||
|
// <div id="imageDetails">
|
||||||
|
// <span id="caption"></span>
|
||||||
|
// <span id="numberDisplay"></span>
|
||||||
|
// </div>
|
||||||
|
// <div id="bottomNav">
|
||||||
|
// <a href="#" id="bottomNavClose">
|
||||||
|
// <img src="images/close.gif">
|
||||||
|
// </a>
|
||||||
|
// </div>
|
||||||
|
// </div>
|
||||||
|
// </div>
|
||||||
|
// </div>
|
||||||
|
|
||||||
|
|
||||||
|
var objBody = $$('body')[0];
|
||||||
|
|
||||||
|
objBody.appendChild(Builder.node('div',{id:'overlay'}));
|
||||||
|
|
||||||
|
objBody.appendChild(Builder.node('div',{id:'lightbox'}, [
|
||||||
|
Builder.node('div',{id:'outerImageContainer'},
|
||||||
|
Builder.node('div',{id:'imageContainer'}, [
|
||||||
|
Builder.node('img',{id:'lightboxImage'}),
|
||||||
|
Builder.node('div',{id:'hoverNav'}, [
|
||||||
|
Builder.node('a',{id:'prevLink', href: '#' }),
|
||||||
|
Builder.node('a',{id:'nextLink', href: '#' })
|
||||||
|
]),
|
||||||
|
Builder.node('div',{id:'loading'},
|
||||||
|
Builder.node('a',{id:'loadingLink', href: '#' },
|
||||||
|
Builder.node('img', {src: LightboxOptions.fileLoadingImage})
|
||||||
|
)
|
||||||
|
)
|
||||||
|
])
|
||||||
|
),
|
||||||
|
Builder.node('div', {id:'imageDataContainer'},
|
||||||
|
Builder.node('div',{id:'imageData'}, [
|
||||||
|
Builder.node('div',{id:'imageDetails'}, [
|
||||||
|
Builder.node('span',{id:'caption'}),
|
||||||
|
Builder.node('span',{id:'numberDisplay'})
|
||||||
|
]),
|
||||||
|
Builder.node('div',{id:'bottomNav'},
|
||||||
|
Builder.node('a',{id:'bottomNavClose', href: '#' },
|
||||||
|
Builder.node('img', { src: LightboxOptions.fileBottomNavCloseImage })
|
||||||
|
)
|
||||||
|
)
|
||||||
|
])
|
||||||
|
)
|
||||||
|
]));
|
||||||
|
|
||||||
|
|
||||||
|
$('overlay').hide().observe('click', (function() { this.end(); }).bind(this));
|
||||||
|
$('lightbox').hide().observe('click', (function(event) { if (event.element().id == 'lightbox') this.end(); }).bind(this));
|
||||||
|
$('outerImageContainer').setStyle({ width: size, height: size });
|
||||||
|
$('prevLink').observe('click', (function(event) { event.stop(); this.changeImage(this.activeImage - 1); }).bindAsEventListener(this));
|
||||||
|
$('nextLink').observe('click', (function(event) { event.stop(); this.changeImage(this.activeImage + 1); }).bindAsEventListener(this));
|
||||||
|
$('loadingLink').observe('click', (function(event) { event.stop(); this.end(); }).bind(this));
|
||||||
|
$('bottomNavClose').observe('click', (function(event) { event.stop(); this.end(); }).bind(this));
|
||||||
|
|
||||||
|
var th = this;
|
||||||
|
(function(){
|
||||||
|
var ids =
|
||||||
|
'overlay lightbox outerImageContainer imageContainer lightboxImage hoverNav prevLink nextLink loading loadingLink ' +
|
||||||
|
'imageDataContainer imageData imageDetails caption numberDisplay bottomNav bottomNavClose';
|
||||||
|
$w(ids).each(function(id){ th[id] = $(id); });
|
||||||
|
}).defer();
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// updateImageList()
|
||||||
|
// Loops through anchor tags looking for 'lightbox' references and applies onclick
|
||||||
|
// events to appropriate links. You can rerun after dynamically adding images w/ajax.
|
||||||
|
//
|
||||||
|
updateImageList: function() {
|
||||||
|
this.updateImageList = Prototype.emptyFunction;
|
||||||
|
|
||||||
|
document.observe('click', (function(event){
|
||||||
|
var target = event.findElement('a[rel^=lightbox]') || event.findElement('area[rel^=lightbox]');
|
||||||
|
if (target) {
|
||||||
|
event.stop();
|
||||||
|
this.start(target);
|
||||||
|
}
|
||||||
|
}).bind(this));
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// start()
|
||||||
|
// Display overlay and lightbox. If image is part of a set, add siblings to imageArray.
|
||||||
|
//
|
||||||
|
start: function(imageLink) {
|
||||||
|
|
||||||
|
$$('select', 'object', 'embed').each(function(node){ node.style.visibility = 'hidden' });
|
||||||
|
|
||||||
|
// stretch overlay to fill page and fade in
|
||||||
|
var arrayPageSize = this.getPageSize();
|
||||||
|
$('overlay').setStyle({ width: arrayPageSize[0] + 'px', height: arrayPageSize[1] + 'px' });
|
||||||
|
|
||||||
|
new Effect.Appear(this.overlay, { duration: this.overlayDuration, from: 0.0, to: LightboxOptions.overlayOpacity });
|
||||||
|
|
||||||
|
this.imageArray = [];
|
||||||
|
var imageNum = 0;
|
||||||
|
|
||||||
|
if ((imageLink.rel == 'lightbox')){
|
||||||
|
// if image is NOT part of a set, add single image to imageArray
|
||||||
|
this.imageArray.push([imageLink.href, imageLink.title]);
|
||||||
|
} else {
|
||||||
|
// if image is part of a set..
|
||||||
|
this.imageArray =
|
||||||
|
$$(imageLink.tagName + '[href][rel="' + imageLink.rel + '"]').
|
||||||
|
collect(function(anchor){ return [anchor.href, anchor.title]; }).
|
||||||
|
uniq();
|
||||||
|
|
||||||
|
while (this.imageArray[imageNum][0] != imageLink.href) { imageNum++; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// calculate top and left offset for the lightbox
|
||||||
|
var arrayPageScroll = document.viewport.getScrollOffsets();
|
||||||
|
var lightboxTop = arrayPageScroll[1] + (document.viewport.getHeight() / 10);
|
||||||
|
var lightboxLeft = arrayPageScroll[0];
|
||||||
|
this.lightbox.setStyle({ top: lightboxTop + 'px', left: lightboxLeft + 'px' }).show();
|
||||||
|
|
||||||
|
this.changeImage(imageNum);
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// changeImage()
|
||||||
|
// Hide most elements and preload image in preparation for resizing image container.
|
||||||
|
//
|
||||||
|
changeImage: function(imageNum) {
|
||||||
|
|
||||||
|
this.activeImage = imageNum; // update global var
|
||||||
|
|
||||||
|
// hide elements during transition
|
||||||
|
if (LightboxOptions.animate) this.loading.show();
|
||||||
|
this.lightboxImage.hide();
|
||||||
|
this.hoverNav.hide();
|
||||||
|
this.prevLink.hide();
|
||||||
|
this.nextLink.hide();
|
||||||
|
// HACK: Opera9 does not currently support scriptaculous opacity and appear fx
|
||||||
|
this.imageDataContainer.setStyle({opacity: .0001});
|
||||||
|
this.numberDisplay.hide();
|
||||||
|
|
||||||
|
var imgPreloader = new Image();
|
||||||
|
|
||||||
|
// once image is preloaded, resize image container
|
||||||
|
|
||||||
|
|
||||||
|
imgPreloader.onload = (function(){
|
||||||
|
this.lightboxImage.src = this.imageArray[this.activeImage][0];
|
||||||
|
this.resizeImageContainer(imgPreloader.width, imgPreloader.height);
|
||||||
|
}).bind(this);
|
||||||
|
imgPreloader.src = this.imageArray[this.activeImage][0];
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// resizeImageContainer()
|
||||||
|
//
|
||||||
|
resizeImageContainer: function(imgWidth, imgHeight) {
|
||||||
|
|
||||||
|
// get current width and height
|
||||||
|
var widthCurrent = this.outerImageContainer.getWidth();
|
||||||
|
var heightCurrent = this.outerImageContainer.getHeight();
|
||||||
|
|
||||||
|
// get new width and height
|
||||||
|
var widthNew = (imgWidth + LightboxOptions.borderSize * 2);
|
||||||
|
var heightNew = (imgHeight + LightboxOptions.borderSize * 2);
|
||||||
|
|
||||||
|
// scalars based on change from old to new
|
||||||
|
var xScale = (widthNew / widthCurrent) * 100;
|
||||||
|
var yScale = (heightNew / heightCurrent) * 100;
|
||||||
|
|
||||||
|
// calculate size difference between new and old image, and resize if necessary
|
||||||
|
var wDiff = widthCurrent - widthNew;
|
||||||
|
var hDiff = heightCurrent - heightNew;
|
||||||
|
|
||||||
|
if (hDiff != 0) new Effect.Scale(this.outerImageContainer, yScale, {scaleX: false, duration: this.resizeDuration, queue: 'front'});
|
||||||
|
if (wDiff != 0) new Effect.Scale(this.outerImageContainer, xScale, {scaleY: false, duration: this.resizeDuration, delay: this.resizeDuration});
|
||||||
|
|
||||||
|
// if new and old image are same size and no scaling transition is necessary,
|
||||||
|
// do a quick pause to prevent image flicker.
|
||||||
|
var timeout = 0;
|
||||||
|
if ((hDiff == 0) && (wDiff == 0)){
|
||||||
|
timeout = 100;
|
||||||
|
if (Prototype.Browser.IE) timeout = 250;
|
||||||
|
}
|
||||||
|
|
||||||
|
(function(){
|
||||||
|
this.prevLink.setStyle({ height: imgHeight + 'px' });
|
||||||
|
this.nextLink.setStyle({ height: imgHeight + 'px' });
|
||||||
|
this.imageDataContainer.setStyle({ width: widthNew + 'px' });
|
||||||
|
|
||||||
|
this.showImage();
|
||||||
|
}).bind(this).delay(timeout / 1000);
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// showImage()
|
||||||
|
// Display image and begin preloading neighbors.
|
||||||
|
//
|
||||||
|
showImage: function(){
|
||||||
|
this.loading.hide();
|
||||||
|
new Effect.Appear(this.lightboxImage, {
|
||||||
|
duration: this.resizeDuration,
|
||||||
|
queue: 'end',
|
||||||
|
afterFinish: (function(){ this.updateDetails(); }).bind(this)
|
||||||
|
});
|
||||||
|
this.preloadNeighborImages();
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// updateDetails()
|
||||||
|
// Display caption, image number, and bottom nav.
|
||||||
|
//
|
||||||
|
updateDetails: function() {
|
||||||
|
|
||||||
|
// if caption is not null
|
||||||
|
if (this.imageArray[this.activeImage][1] != ""){
|
||||||
|
this.caption.update(this.imageArray[this.activeImage][1]).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
// if image is part of set display 'Image x of x'
|
||||||
|
if (this.imageArray.length > 1){
|
||||||
|
this.numberDisplay.update( LightboxOptions.labelImage + ' ' + (this.activeImage + 1) + ' ' + LightboxOptions.labelOf + ' ' + this.imageArray.length).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
new Effect.Parallel(
|
||||||
|
[
|
||||||
|
new Effect.SlideDown(this.imageDataContainer, { sync: true, duration: this.resizeDuration, from: 0.0, to: 1.0 }),
|
||||||
|
new Effect.Appear(this.imageDataContainer, { sync: true, duration: this.resizeDuration })
|
||||||
|
],
|
||||||
|
{
|
||||||
|
duration: this.resizeDuration,
|
||||||
|
afterFinish: (function() {
|
||||||
|
// update overlay size and update nav
|
||||||
|
var arrayPageSize = this.getPageSize();
|
||||||
|
this.overlay.setStyle({ height: arrayPageSize[1] + 'px' });
|
||||||
|
this.updateNav();
|
||||||
|
}).bind(this)
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// updateNav()
|
||||||
|
// Display appropriate previous and next hover navigation.
|
||||||
|
//
|
||||||
|
updateNav: function() {
|
||||||
|
|
||||||
|
this.hoverNav.show();
|
||||||
|
|
||||||
|
// if not first image in set, display prev image button
|
||||||
|
if (this.activeImage > 0) this.prevLink.show();
|
||||||
|
|
||||||
|
// if not last image in set, display next image button
|
||||||
|
if (this.activeImage < (this.imageArray.length - 1)) this.nextLink.show();
|
||||||
|
|
||||||
|
this.enableKeyboardNav();
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// enableKeyboardNav()
|
||||||
|
//
|
||||||
|
enableKeyboardNav: function() {
|
||||||
|
document.observe('keydown', this.keyboardAction);
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// disableKeyboardNav()
|
||||||
|
//
|
||||||
|
disableKeyboardNav: function() {
|
||||||
|
document.stopObserving('keydown', this.keyboardAction);
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// keyboardAction()
|
||||||
|
//
|
||||||
|
keyboardAction: function(event) {
|
||||||
|
var keycode = event.keyCode;
|
||||||
|
|
||||||
|
var escapeKey;
|
||||||
|
if (event.DOM_VK_ESCAPE) { // mozilla
|
||||||
|
escapeKey = event.DOM_VK_ESCAPE;
|
||||||
|
} else { // ie
|
||||||
|
escapeKey = 27;
|
||||||
|
}
|
||||||
|
|
||||||
|
var key = String.fromCharCode(keycode).toLowerCase();
|
||||||
|
|
||||||
|
if (key.match(/x|o|c/) || (keycode == escapeKey)){ // close lightbox
|
||||||
|
this.end();
|
||||||
|
} else if ((key == 'p') || (keycode == 37)){ // display previous image
|
||||||
|
if (this.activeImage != 0){
|
||||||
|
this.disableKeyboardNav();
|
||||||
|
this.changeImage(this.activeImage - 1);
|
||||||
|
}
|
||||||
|
} else if ((key == 'n') || (keycode == 39)){ // display next image
|
||||||
|
if (this.activeImage != (this.imageArray.length - 1)){
|
||||||
|
this.disableKeyboardNav();
|
||||||
|
this.changeImage(this.activeImage + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// preloadNeighborImages()
|
||||||
|
// Preload previous and next images.
|
||||||
|
//
|
||||||
|
preloadNeighborImages: function(){
|
||||||
|
var preloadNextImage, preloadPrevImage;
|
||||||
|
if (this.imageArray.length > this.activeImage + 1){
|
||||||
|
preloadNextImage = new Image();
|
||||||
|
preloadNextImage.src = this.imageArray[this.activeImage + 1][0];
|
||||||
|
}
|
||||||
|
if (this.activeImage > 0){
|
||||||
|
preloadPrevImage = new Image();
|
||||||
|
preloadPrevImage.src = this.imageArray[this.activeImage - 1][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// end()
|
||||||
|
//
|
||||||
|
end: function() {
|
||||||
|
this.disableKeyboardNav();
|
||||||
|
this.lightbox.hide();
|
||||||
|
new Effect.Fade(this.overlay, { duration: this.overlayDuration });
|
||||||
|
$$('select', 'object', 'embed').each(function(node){ node.style.visibility = 'visible' });
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// getPageSize()
|
||||||
|
//
|
||||||
|
getPageSize: function() {
|
||||||
|
|
||||||
|
var xScroll, yScroll;
|
||||||
|
|
||||||
|
if (window.innerHeight && window.scrollMaxY) {
|
||||||
|
xScroll = window.innerWidth + window.scrollMaxX;
|
||||||
|
yScroll = window.innerHeight + window.scrollMaxY;
|
||||||
|
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
|
||||||
|
xScroll = document.body.scrollWidth;
|
||||||
|
yScroll = document.body.scrollHeight;
|
||||||
|
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
|
||||||
|
xScroll = document.body.offsetWidth;
|
||||||
|
yScroll = document.body.offsetHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
var windowWidth, windowHeight;
|
||||||
|
|
||||||
|
if (self.innerHeight) { // all except Explorer
|
||||||
|
if(document.documentElement.clientWidth){
|
||||||
|
windowWidth = document.documentElement.clientWidth;
|
||||||
|
} else {
|
||||||
|
windowWidth = self.innerWidth;
|
||||||
|
}
|
||||||
|
windowHeight = self.innerHeight;
|
||||||
|
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
|
||||||
|
windowWidth = document.documentElement.clientWidth;
|
||||||
|
windowHeight = document.documentElement.clientHeight;
|
||||||
|
} else if (document.body) { // other Explorers
|
||||||
|
windowWidth = document.body.clientWidth;
|
||||||
|
windowHeight = document.body.clientHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for small pages with total height less then height of the viewport
|
||||||
|
if(yScroll < windowHeight){
|
||||||
|
pageHeight = windowHeight;
|
||||||
|
} else {
|
||||||
|
pageHeight = yScroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for small pages with total width less then width of the viewport
|
||||||
|
if(xScroll < windowWidth){
|
||||||
|
pageWidth = xScroll;
|
||||||
|
} else {
|
||||||
|
pageWidth = windowWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
return [pageWidth,pageHeight];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.observe('dom:loaded', function () { new Lightbox(); });
|
|
@ -0,0 +1,58 @@
|
||||||
|
// script.aculo.us scriptaculous.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
|
||||||
|
|
||||||
|
// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
// a copy of this software and associated documentation files (the
|
||||||
|
// "Software"), to deal in the Software without restriction, including
|
||||||
|
// without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
// permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
// the following conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be
|
||||||
|
// included in all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
// For details, see the script.aculo.us web site: http://script.aculo.us/
|
||||||
|
|
||||||
|
var Scriptaculous = {
|
||||||
|
Version: '1.8.1',
|
||||||
|
require: function(libraryName) {
|
||||||
|
// inserting via DOM fails in Safari 2.0, so brute force approach
|
||||||
|
document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>');
|
||||||
|
},
|
||||||
|
REQUIRED_PROTOTYPE: '1.6.0',
|
||||||
|
load: function() {
|
||||||
|
function convertVersionString(versionString){
|
||||||
|
var r = versionString.split('.');
|
||||||
|
return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if((typeof Prototype=='undefined') ||
|
||||||
|
(typeof Element == 'undefined') ||
|
||||||
|
(typeof Element.Methods=='undefined') ||
|
||||||
|
(convertVersionString(Prototype.Version) <
|
||||||
|
convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE)))
|
||||||
|
throw("script.aculo.us requires the Prototype JavaScript framework >= " +
|
||||||
|
Scriptaculous.REQUIRED_PROTOTYPE);
|
||||||
|
|
||||||
|
$A(document.getElementsByTagName("script")).findAll( function(s) {
|
||||||
|
return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
|
||||||
|
}).each( function(s) {
|
||||||
|
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
|
||||||
|
var includes = s.src.match(/\?.*load=([a-z,]*)/);
|
||||||
|
(includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each(
|
||||||
|
function(include) { Scriptaculous.require(path+include+'.js') });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Scriptaculous.load();
|
|
@ -0,0 +1,68 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Open Asset Import Library : Documentation & FAQ</title>
|
||||||
|
<meta name="keywords" content="ASSIMP Open Asset Import Library free Open Source 3d Model Import Library C C++ Java MDL X OBJ MD2 MD3 PLY " />
|
||||||
|
<meta name="description" content="Open Asset Import Library" />
|
||||||
|
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen"/>
|
||||||
|
<script src="js/prototype.js" type="text/javascript"></script>
|
||||||
|
<script src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
|
||||||
|
<script src="js/lightbox.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="header">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- end #header -->
|
||||||
|
<div id="menu">
|
||||||
|
<ul>
|
||||||
|
<li class="first"><a href="index.html" accesskey="1" title="">About</a></li>
|
||||||
|
<li><a href="main_features.html" accesskey="2" title="">Features</a></li>
|
||||||
|
<li><a href="main_viewer.html" accesskey="7" title="">Viewer</a></li>
|
||||||
|
<li><a href="main_doc.html" accesskey="3" title="">Documentation</a></li>
|
||||||
|
<li><a href="main_downloads.html" accesskey="4" title="">Downloads</a></li>
|
||||||
|
<li><a href="main_license.html" accesskey="8" title="">License</a></li>
|
||||||
|
<li><a href="main_contact.html" accesskey="5" title="">Contact</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- end #menu -->
|
||||||
|
<div id="content">
|
||||||
|
<div id="posts_fl">
|
||||||
|
<div class="post_fl">
|
||||||
|
|
||||||
|
<h2 class="title">General</h2>
|
||||||
|
<p><a href="FAQ.html" target="_blank">Frequently asked questions</a> (FAQ)</p>
|
||||||
|
|
||||||
|
<h2 class="title">C/C++</h2>
|
||||||
|
<div class="story">
|
||||||
|
<p><a href="lib_html/index.html">Assimp Documentation and C/C++ Reference</a> generated with the help of <a href="http://www.doxygen.org/">Doxygen</a>. <br></p>
|
||||||
|
<p><a href="http://assimp.svn.sourceforge.net/viewvc/assimp/trunk/tools/assimp_view/">AssimpView Source</a> (Sample implementation)<br></p>
|
||||||
|
|
||||||
|
<h2 class="title">Java</h2>
|
||||||
|
<p><a href="javadoc/index.html">jAssimp JavaDoc</a> (under development, subject to future changes)<br></p>
|
||||||
|
<h2 class="title">C#</h2>
|
||||||
|
|
||||||
|
<p>Under development</p>
|
||||||
|
<h2 class="title">AssimpView</h2>
|
||||||
|
<p><a href="avdoc/Reference.pdf">AssimpView Reference Manual</a> (also available via the <tt>?|Help</tt> menu item)<br></p>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<br><br><br><br><br><br><br>
|
||||||
|
<p><a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=226462&type=2" width="125" height="37" border="0" alt="SourceForge.net Logo"
|
||||||
|
/></a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="clear: both;"> </div>
|
||||||
|
</div>
|
||||||
|
<!-- end #content -->
|
||||||
|
<div id="footer">
|
||||||
|
<p id="legal">Copyright © 2008 ASSIMP Team. Design template by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a></p>
|
||||||
|
</div>
|
||||||
|
<!-- end #footer -->
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,70 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Open Asset Import Library : Downloads</title>
|
||||||
|
<meta name="keywords" content="ASSIMP Open Asset Import Library free Open Source 3d Model Import Library C C++ Java MDL X OBJ MD2 MD3 PLY " />
|
||||||
|
<meta name="description" content="Open Asset Import Library" />
|
||||||
|
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen"/>
|
||||||
|
<script src="js/prototype.js" type="text/javascript"></script>
|
||||||
|
<script src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
|
||||||
|
<script src="js/lightbox.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="header">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- end #header -->
|
||||||
|
<div id="menu">
|
||||||
|
<ul>
|
||||||
|
<li class="first"><a href="index.html" accesskey="1" title="">About</a></li>
|
||||||
|
<li><a href="main_features.html" accesskey="2" title="">Features</a></li>
|
||||||
|
<li><a href="main_viewer.html" accesskey="7" title="">Viewer</a></li>
|
||||||
|
<li><a href="main_doc.html" accesskey="3" title="">Documentation</a></li>
|
||||||
|
<li><a href="main_downloads.html" accesskey="4" title="">Downloads</a></li>
|
||||||
|
<li><a href="main_license.html" accesskey="8" title="">License</a></li>
|
||||||
|
<li><a href="main_contact.html" accesskey="5" title="">Contact</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- end #menu -->
|
||||||
|
<div id="content">
|
||||||
|
<div id="posts_fl">
|
||||||
|
<div class="post_fl">
|
||||||
|
<h2 class="title">Subversion</h2>
|
||||||
|
<div class="story">
|
||||||
|
<p>Developers can directly obtain ASSIMP's source code via SVN. An anonymous checkout can be get using:<br>
|
||||||
|
<tt>svn co https://assimp.svn.sourceforge.net/svnroot/assimp/trunk assimp </tt><br><br>
|
||||||
|
To view the source code in your browser, <a href="http://assimp.svn.sourceforge.net/viewvc/assimp/trunk/">click here</a>. <small>Just remember: don't read source code :-) </small>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="title">Download</img></h2>
|
||||||
|
<p>
|
||||||
|
We provide both source code and precompiled binary packages for most platforms. Don't forget that you'll need <a href=http://www.boost.org/>boost</a> to compile ASSIMP from scratch.
|
||||||
|
<br>
|
||||||
|
<a href="https://sourceforge.net/project/showfiles.php?group_id=226462"><strong>Download page</strong></a><br>
|
||||||
|
<br>
|
||||||
|
<img src="images/boost.png" alt="Boost logo"></img>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<br><br><br><br><br><br><br>
|
||||||
|
<p><a href="http://sourceforge.net">
|
||||||
|
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=226462&type=2" width="125" height="37" border="0" alt="SourceForge.net Logo"
|
||||||
|
/></a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="clear: both;"> </div>
|
||||||
|
</div>
|
||||||
|
<!-- end #content -->
|
||||||
|
<div id="footer">
|
||||||
|
<p id="legal">Copyright © 2008 ASSIMP Team. Design template by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a></p>
|
||||||
|
</div>
|
||||||
|
<!-- end #footer -->
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,71 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Open Asset Import Library : License</title>
|
||||||
|
<meta name="keywords" content="ASSIMP Open Asset Import Library free Open Source 3d Model Import Library C C++ Java MDL X OBJ MD2 MD3 PLY " />
|
||||||
|
<meta name="description" content="Open Asset Import Library" />
|
||||||
|
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen"/>
|
||||||
|
<script src="js/prototype.js" type="text/javascript"></script>
|
||||||
|
<script src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
|
||||||
|
<script src="js/lightbox.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="header">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- end #header -->
|
||||||
|
<div id="menu">
|
||||||
|
<ul>
|
||||||
|
<li class="first"><a href="index.html" accesskey="1" title="">About</a></li>
|
||||||
|
<li><a href="main_features.html" accesskey="2" title="">Features</a></li>
|
||||||
|
<li><a href="main_viewer.html" accesskey="7" title="">Viewer</a></li>
|
||||||
|
<li><a href="main_doc.html" accesskey="3" title="">Documentation</a></li>
|
||||||
|
<li><a href="main_downloads.html" accesskey="4" title="">Downloads</a></li>
|
||||||
|
<li><a href="main_license.html" accesskey="8" title="">License</a></li>
|
||||||
|
<li><a href="main_contact.html" accesskey="5" title="">Contact</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- end #menu -->
|
||||||
|
<div id="content">
|
||||||
|
<div id="posts_fl">
|
||||||
|
<div class="post_fl">
|
||||||
|
<h2 class="title">License</h2>
|
||||||
|
<div class="story">
|
||||||
|
<p>ASSIMP is released as Open Source under the terms of a modified 3-clause BSD license.</p><hr>
|
||||||
|
|
||||||
|
|
||||||
|
<p><tt>
|
||||||
|
Copyright (c) 2008 ASSIMP Development Team
|
||||||
|
All rights reserved.<br>
|
||||||
|
<br>
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<br><br>
|
||||||
|
<ul>
|
||||||
|
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li> <br>
|
||||||
|
<li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li> <br>
|
||||||
|
<li>Neither the name of the ASSIMP Development Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. </li><br>
|
||||||
|
</ul>
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
</tt></p><hr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p><a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=226462&type=2" width="125" height="37" border="0" alt="SourceForge.net Logo"
|
||||||
|
/></a></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="clear: both;"> </div>
|
||||||
|
</div>
|
||||||
|
<!-- end #content -->
|
||||||
|
<div id="footer">
|
||||||
|
<p id="legal">Copyright © 2008 ASSIMP Team. Design template by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a></p>
|
||||||
|
</div>
|
||||||
|
<!-- end #footer -->
|
||||||
|
</body>
|
||||||
|
</html>
|
After Width: | Height: | Size: 194 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 183 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 159 KiB |
After Width: | Height: | Size: 19 KiB |
|
@ -1042,6 +1042,10 @@
|
||||||
RelativePath="..\..\code\qnan.h"
|
RelativePath="..\..\code\qnan.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\code\RemoveComments.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\code\SpatialSort.h"
|
RelativePath="..\..\code\SpatialSort.h"
|
||||||
>
|
>
|
||||||
|
@ -1358,6 +1362,10 @@
|
||||||
RelativePath="..\..\code\PretransformVertices.cpp"
|
RelativePath="..\..\code\PretransformVertices.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\code\RemoveComments.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\code\SpatialSort.cpp"
|
RelativePath="..\..\code\SpatialSort.cpp"
|
||||||
>
|
>
|
||||||
|
|