[3393728] [PATCH 1/2] ommit->omit and splitted->split
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1064 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/2/head
parent
56098cd33c
commit
2ffac898d6
|
@ -422,7 +422,7 @@ struct SubsurfModifierData : ElemBase {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Flags {
|
enum Flags {
|
||||||
// some ommitted
|
// some omitted
|
||||||
FLAGS_SubsurfUV =1<<3
|
FLAGS_SubsurfUV =1<<3
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -387,7 +387,7 @@ void COBImporter::ReadAsciiFile(Scene& out, StreamReaderLE* stream)
|
||||||
ChunkInfo ci;
|
ChunkInfo ci;
|
||||||
for(LineSplitter splitter(*stream);splitter;++splitter) {
|
for(LineSplitter splitter(*stream);splitter;++splitter) {
|
||||||
|
|
||||||
// add all chunks to be recognized here. /else ../ ommitted intentionally.
|
// add all chunks to be recognized here. /else ../ omitted intentionally.
|
||||||
if (splitter.match_start("PolH ")) {
|
if (splitter.match_start("PolH ")) {
|
||||||
ReadChunkInfo_Ascii(ci,splitter);
|
ReadChunkInfo_Ascii(ci,splitter);
|
||||||
ReadPolH_Ascii(out,splitter,ci);
|
ReadPolH_Ascii(out,splitter,ci);
|
||||||
|
|
|
@ -1193,32 +1193,32 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
|
||||||
void MDLImporter::SortByMaterials_3DGS_MDL7(
|
void MDLImporter::SortByMaterials_3DGS_MDL7(
|
||||||
const MDL::IntGroupInfo_MDL7& groupInfo,
|
const MDL::IntGroupInfo_MDL7& groupInfo,
|
||||||
MDL::IntGroupData_MDL7& groupData,
|
MDL::IntGroupData_MDL7& groupData,
|
||||||
MDL::IntSplittedGroupData_MDL7& splittedGroupData)
|
MDL::IntSplittedGroupData_MDL7& splitGroupData)
|
||||||
{
|
{
|
||||||
const unsigned int iNumMaterials = (unsigned int)splittedGroupData.shared.pcMats.size();
|
const unsigned int iNumMaterials = (unsigned int)splitGroupData.shared.pcMats.size();
|
||||||
if (!groupData.bNeed2UV) {
|
if (!groupData.bNeed2UV) {
|
||||||
// if we don't need a second set of texture coordinates there is no reason to keep it in memory ...
|
// if we don't need a second set of texture coordinates there is no reason to keep it in memory ...
|
||||||
groupData.vTextureCoords2.clear();
|
groupData.vTextureCoords2.clear();
|
||||||
|
|
||||||
// allocate the array
|
// allocate the array
|
||||||
splittedGroupData.aiSplit = new std::vector<unsigned int>*[iNumMaterials];
|
splitGroupData.aiSplit = new std::vector<unsigned int>*[iNumMaterials];
|
||||||
|
|
||||||
for (unsigned int m = 0; m < iNumMaterials;++m)
|
for (unsigned int m = 0; m < iNumMaterials;++m)
|
||||||
splittedGroupData.aiSplit[m] = new std::vector<unsigned int>();
|
splitGroupData.aiSplit[m] = new std::vector<unsigned int>();
|
||||||
|
|
||||||
// iterate through all faces and sort by material
|
// iterate through all faces and sort by material
|
||||||
for (unsigned int iFace = 0; iFace < (unsigned int)groupInfo.pcGroup->numtris;++iFace) {
|
for (unsigned int iFace = 0; iFace < (unsigned int)groupInfo.pcGroup->numtris;++iFace) {
|
||||||
// check range
|
// check range
|
||||||
if (groupData.pcFaces[iFace].iMatIndex[0] >= iNumMaterials) {
|
if (groupData.pcFaces[iFace].iMatIndex[0] >= iNumMaterials) {
|
||||||
// use the last material instead
|
// use the last material instead
|
||||||
splittedGroupData.aiSplit[iNumMaterials-1]->push_back(iFace);
|
splitGroupData.aiSplit[iNumMaterials-1]->push_back(iFace);
|
||||||
|
|
||||||
// sometimes MED writes -1, but normally only if there is only
|
// sometimes MED writes -1, but normally only if there is only
|
||||||
// one skin assigned. No warning in this case
|
// one skin assigned. No warning in this case
|
||||||
if(0xFFFFFFFF != groupData.pcFaces[iFace].iMatIndex[0])
|
if(0xFFFFFFFF != groupData.pcFaces[iFace].iMatIndex[0])
|
||||||
DefaultLogger::get()->warn("Index overflow in MDL7 material list [#0]");
|
DefaultLogger::get()->warn("Index overflow in MDL7 material list [#0]");
|
||||||
}
|
}
|
||||||
else splittedGroupData.aiSplit[groupData.pcFaces[iFace].
|
else splitGroupData.aiSplit[groupData.pcFaces[iFace].
|
||||||
iMatIndex[0]]->push_back(iFace);
|
iMatIndex[0]]->push_back(iFace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1271,8 +1271,8 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
|
||||||
sHelper.pcMat = new MaterialHelper();
|
sHelper.pcMat = new MaterialHelper();
|
||||||
sHelper.iOldMatIndices[0] = iMatIndex;
|
sHelper.iOldMatIndices[0] = iMatIndex;
|
||||||
sHelper.iOldMatIndices[1] = iMatIndex2;
|
sHelper.iOldMatIndices[1] = iMatIndex2;
|
||||||
JoinSkins_3DGS_MDL7(splittedGroupData.shared.pcMats[iMatIndex],
|
JoinSkins_3DGS_MDL7(splitGroupData.shared.pcMats[iMatIndex],
|
||||||
splittedGroupData.shared.pcMats[iMatIndex2],sHelper.pcMat);
|
splitGroupData.shared.pcMats[iMatIndex2],sHelper.pcMat);
|
||||||
|
|
||||||
// and add it to the list
|
// and add it to the list
|
||||||
avMats.push_back(sHelper);
|
avMats.push_back(sHelper);
|
||||||
|
@ -1288,21 +1288,21 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
|
||||||
|
|
||||||
// now add the newly created materials to the old list
|
// now add the newly created materials to the old list
|
||||||
if (0 == groupInfo.iIndex) {
|
if (0 == groupInfo.iIndex) {
|
||||||
splittedGroupData.shared.pcMats.resize(avMats.size());
|
splitGroupData.shared.pcMats.resize(avMats.size());
|
||||||
for (unsigned int o = 0; o < avMats.size();++o)
|
for (unsigned int o = 0; o < avMats.size();++o)
|
||||||
splittedGroupData.shared.pcMats[o] = avMats[o].pcMat;
|
splitGroupData.shared.pcMats[o] = avMats[o].pcMat;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// This might result in redundant materials ...
|
// This might result in redundant materials ...
|
||||||
splittedGroupData.shared.pcMats.resize(iNumMaterials + avMats.size());
|
splitGroupData.shared.pcMats.resize(iNumMaterials + avMats.size());
|
||||||
for (unsigned int o = iNumMaterials; o < avMats.size();++o)
|
for (unsigned int o = iNumMaterials; o < avMats.size();++o)
|
||||||
splittedGroupData.shared.pcMats[o] = avMats[o].pcMat;
|
splitGroupData.shared.pcMats[o] = avMats[o].pcMat;
|
||||||
}
|
}
|
||||||
|
|
||||||
// and build the final face-to-material array
|
// and build the final face-to-material array
|
||||||
splittedGroupData.aiSplit = new std::vector<unsigned int>*[aiTempSplit.size()];
|
splitGroupData.aiSplit = new std::vector<unsigned int>*[aiTempSplit.size()];
|
||||||
for (unsigned int m = 0; m < iNumMaterials;++m)
|
for (unsigned int m = 0; m < iNumMaterials;++m)
|
||||||
splittedGroupData.aiSplit[m] = aiTempSplit[m];
|
splitGroupData.aiSplit[m] = aiTempSplit[m];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1438,7 +1438,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
|
||||||
szCurrent += pcHeader->mainvertex_stc_size * groupInfo.pcGroup->numverts;
|
szCurrent += pcHeader->mainvertex_stc_size * groupInfo.pcGroup->numverts;
|
||||||
VALIDATE_FILE_SIZE(szCurrent);
|
VALIDATE_FILE_SIZE(szCurrent);
|
||||||
|
|
||||||
MDL::IntSplittedGroupData_MDL7 splittedGroupData(sharedData,avOutList[iGroup]);
|
MDL::IntSplittedGroupData_MDL7 splitGroupData(sharedData,avOutList[iGroup]);
|
||||||
MDL::IntGroupData_MDL7 groupData;
|
MDL::IntGroupData_MDL7 groupData;
|
||||||
if (groupInfo.pcGroup->numtris && groupInfo.pcGroup->numverts)
|
if (groupInfo.pcGroup->numtris && groupInfo.pcGroup->numverts)
|
||||||
{
|
{
|
||||||
|
@ -1467,10 +1467,10 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
|
||||||
|
|
||||||
// sort by materials
|
// sort by materials
|
||||||
SortByMaterials_3DGS_MDL7(groupInfo, groupData,
|
SortByMaterials_3DGS_MDL7(groupInfo, groupData,
|
||||||
splittedGroupData);
|
splitGroupData);
|
||||||
|
|
||||||
for (unsigned int qq = 0; qq < sharedData.pcMats.size();++qq) {
|
for (unsigned int qq = 0; qq < sharedData.pcMats.size();++qq) {
|
||||||
if (!splittedGroupData.aiSplit[qq]->empty())
|
if (!splitGroupData.aiSplit[qq]->empty())
|
||||||
sharedData.abNeedMaterials[qq] = true;
|
sharedData.abNeedMaterials[qq] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1479,7 +1479,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
|
||||||
|
|
||||||
// process all frames and generate output meshes
|
// process all frames and generate output meshes
|
||||||
ProcessFrames_3DGS_MDL7(groupInfo,groupData, sharedData,szCurrent,&szCurrent);
|
ProcessFrames_3DGS_MDL7(groupInfo,groupData, sharedData,szCurrent,&szCurrent);
|
||||||
GenerateOutputMeshes_3DGS_MDL7(groupData,splittedGroupData);
|
GenerateOutputMeshes_3DGS_MDL7(groupData,splitGroupData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate a nodegraph and subnodes for each group
|
// generate a nodegraph and subnodes for each group
|
||||||
|
@ -1773,16 +1773,16 @@ void MDLImporter::AddAnimationBoneTrafoKey_3DGS_MDL7(unsigned int iTrafo,
|
||||||
// Construct output meshes
|
// Construct output meshes
|
||||||
void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
|
void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
|
||||||
MDL::IntGroupData_MDL7& groupData,
|
MDL::IntGroupData_MDL7& groupData,
|
||||||
MDL::IntSplittedGroupData_MDL7& splittedGroupData)
|
MDL::IntSplittedGroupData_MDL7& splitGroupData)
|
||||||
{
|
{
|
||||||
const MDL::IntSharedData_MDL7& shared = splittedGroupData.shared;
|
const MDL::IntSharedData_MDL7& shared = splitGroupData.shared;
|
||||||
|
|
||||||
// get a pointer to the header ...
|
// get a pointer to the header ...
|
||||||
const MDL::Header_MDL7* const pcHeader = (const MDL::Header_MDL7*)this->mBuffer;
|
const MDL::Header_MDL7* const pcHeader = (const MDL::Header_MDL7*)this->mBuffer;
|
||||||
const unsigned int iNumOutBones = pcHeader->bones_num;
|
const unsigned int iNumOutBones = pcHeader->bones_num;
|
||||||
|
|
||||||
for (std::vector<MaterialHelper*>::size_type i = 0; i < shared.pcMats.size();++i) {
|
for (std::vector<MaterialHelper*>::size_type i = 0; i < shared.pcMats.size();++i) {
|
||||||
if (!splittedGroupData.aiSplit[i]->empty()) {
|
if (!splitGroupData.aiSplit[i]->empty()) {
|
||||||
|
|
||||||
// allocate the output mesh
|
// allocate the output mesh
|
||||||
aiMesh* pcMesh = new aiMesh();
|
aiMesh* pcMesh = new aiMesh();
|
||||||
|
@ -1791,7 +1791,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
|
||||||
pcMesh->mMaterialIndex = (unsigned int)i;
|
pcMesh->mMaterialIndex = (unsigned int)i;
|
||||||
|
|
||||||
// allocate output storage
|
// allocate output storage
|
||||||
pcMesh->mNumFaces = (unsigned int)splittedGroupData.aiSplit[i]->size();
|
pcMesh->mNumFaces = (unsigned int)splitGroupData.aiSplit[i]->size();
|
||||||
pcMesh->mFaces = new aiFace[pcMesh->mNumFaces];
|
pcMesh->mFaces = new aiFace[pcMesh->mNumFaces];
|
||||||
|
|
||||||
pcMesh->mNumVertices = pcMesh->mNumFaces*3;
|
pcMesh->mNumVertices = pcMesh->mNumFaces*3;
|
||||||
|
@ -1813,7 +1813,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
|
||||||
pcMesh->mFaces[iFace].mNumIndices = 3;
|
pcMesh->mFaces[iFace].mNumIndices = 3;
|
||||||
pcMesh->mFaces[iFace].mIndices = new unsigned int[3];
|
pcMesh->mFaces[iFace].mIndices = new unsigned int[3];
|
||||||
|
|
||||||
unsigned int iSrcFace = splittedGroupData.aiSplit[i]->operator[](iFace);
|
unsigned int iSrcFace = splitGroupData.aiSplit[i]->operator[](iFace);
|
||||||
const MDL::IntFace_MDL7& oldFace = groupData.pcFaces[iSrcFace];
|
const MDL::IntFace_MDL7& oldFace = groupData.pcFaces[iSrcFace];
|
||||||
|
|
||||||
// iterate through all face indices
|
// iterate through all face indices
|
||||||
|
@ -1841,7 +1841,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
|
||||||
|
|
||||||
int iCurrent = 0;
|
int iCurrent = 0;
|
||||||
for (unsigned int iFace = 0; iFace < pcMesh->mNumFaces;++iFace) {
|
for (unsigned int iFace = 0; iFace < pcMesh->mNumFaces;++iFace) {
|
||||||
unsigned int iSrcFace = splittedGroupData.aiSplit[i]->operator[](iFace);
|
unsigned int iSrcFace = splitGroupData.aiSplit[i]->operator[](iFace);
|
||||||
const MDL::IntFace_MDL7& oldFace = groupData.pcFaces[iSrcFace];
|
const MDL::IntFace_MDL7& oldFace = groupData.pcFaces[iSrcFace];
|
||||||
|
|
||||||
// iterate through all face indices
|
// iterate through all face indices
|
||||||
|
@ -1887,7 +1887,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// add the mesh to the list of output meshes
|
// add the mesh to the list of output meshes
|
||||||
splittedGroupData.avOutList.push_back(pcMesh);
|
splitGroupData.avOutList.push_back(pcMesh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ using namespace MDL;
|
||||||
* </ul>
|
* </ul>
|
||||||
* These formats are partially identical and it would be possible to load
|
* These formats are partially identical and it would be possible to load
|
||||||
* them all with a single 1000-line function-beast. However, it has been
|
* them all with a single 1000-line function-beast. However, it has been
|
||||||
* splitted to several code paths to make the code easier to read and maintain.
|
* split into several code paths to make the code easier to read and maintain.
|
||||||
*/
|
*/
|
||||||
class MDLImporter : public BaseImporter
|
class MDLImporter : public BaseImporter
|
||||||
{
|
{
|
||||||
|
@ -401,12 +401,12 @@ protected:
|
||||||
* might create new materials.
|
* might create new materials.
|
||||||
* \param groupInfo -> doc of data structure
|
* \param groupInfo -> doc of data structure
|
||||||
* \param groupData -> doc of data structure
|
* \param groupData -> doc of data structure
|
||||||
* \param splittedGroupData -> doc of data structure
|
* \param splitGroupData -> doc of data structure
|
||||||
*/
|
*/
|
||||||
void SortByMaterials_3DGS_MDL7(
|
void SortByMaterials_3DGS_MDL7(
|
||||||
const MDL::IntGroupInfo_MDL7& groupInfo,
|
const MDL::IntGroupInfo_MDL7& groupInfo,
|
||||||
MDL::IntGroupData_MDL7& groupData,
|
MDL::IntGroupData_MDL7& groupData,
|
||||||
MDL::IntSplittedGroupData_MDL7& splittedGroupData);
|
MDL::IntSplittedGroupData_MDL7& splitGroupData);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Read all faces and vertices from a MDL7 group. The function fills
|
/** Read all faces and vertices from a MDL7 group. The function fills
|
||||||
|
@ -420,11 +420,11 @@ protected:
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Generate the final output meshes for a7 models
|
/** Generate the final output meshes for a7 models
|
||||||
* \param groupData -> doc of data structure
|
* \param groupData -> doc of data structure
|
||||||
* \param splittedGroupData -> doc of data structure
|
* \param splitGroupData -> doc of data structure
|
||||||
*/
|
*/
|
||||||
void GenerateOutputMeshes_3DGS_MDL7(
|
void GenerateOutputMeshes_3DGS_MDL7(
|
||||||
MDL::IntGroupData_MDL7& groupData,
|
MDL::IntGroupData_MDL7& groupData,
|
||||||
MDL::IntSplittedGroupData_MDL7& splittedGroupData);
|
MDL::IntSplittedGroupData_MDL7& splitGroupData);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ public:
|
||||||
/** @brief Specify a maximum size of a single output mesh.
|
/** @brief Specify a maximum size of a single output mesh.
|
||||||
*
|
*
|
||||||
* If a single input mesh already exceeds this limit, it won't
|
* If a single input mesh already exceeds this limit, it won't
|
||||||
* be splitted.
|
* be split.
|
||||||
* @param verts Maximum number of vertices per mesh
|
* @param verts Maximum number of vertices per mesh
|
||||||
* @param faces Maximum number of faces per mesh
|
* @param faces Maximum number of faces per mesh
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -84,7 +84,7 @@ void SplitLargeMeshesProcess_Triangle::Execute( aiScene* pScene)
|
||||||
|
|
||||||
if (avList.size() != pScene->mNumMeshes)
|
if (avList.size() != pScene->mNumMeshes)
|
||||||
{
|
{
|
||||||
// it seems something has been splitted. rebuild the mesh list
|
// it seems something has been split. rebuild the mesh list
|
||||||
delete[] pScene->mMeshes;
|
delete[] pScene->mMeshes;
|
||||||
pScene->mNumMeshes = (unsigned int)avList.size();
|
pScene->mNumMeshes = (unsigned int)avList.size();
|
||||||
pScene->mMeshes = new aiMesh*[avList.size()];
|
pScene->mMeshes = new aiMesh*[avList.size()];
|
||||||
|
@ -94,7 +94,7 @@ void SplitLargeMeshesProcess_Triangle::Execute( aiScene* pScene)
|
||||||
|
|
||||||
// now we need to update all nodes
|
// now we need to update all nodes
|
||||||
this->UpdateNode(pScene->mRootNode,avList);
|
this->UpdateNode(pScene->mRootNode,avList);
|
||||||
DefaultLogger::get()->info("SplitLargeMeshesProcess_Triangle finished. Meshes have been splitted");
|
DefaultLogger::get()->info("SplitLargeMeshesProcess_Triangle finished. Meshes have been split");
|
||||||
}
|
}
|
||||||
else DefaultLogger::get()->debug("SplitLargeMeshesProcess_Triangle finished. There was nothing to do");
|
else DefaultLogger::get()->debug("SplitLargeMeshesProcess_Triangle finished. There was nothing to do");
|
||||||
return;
|
return;
|
||||||
|
@ -227,7 +227,7 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
|
||||||
pcMesh->mBones = new aiBone*[pMesh->mNumBones];
|
pcMesh->mBones = new aiBone*[pMesh->mNumBones];
|
||||||
|
|
||||||
// iterate through all bones of the mesh and find those which
|
// iterate through all bones of the mesh and find those which
|
||||||
// need to be copied to the splitted mesh
|
// need to be copied to the split mesh
|
||||||
std::vector<aiVertexWeight> avTempWeights;
|
std::vector<aiVertexWeight> avTempWeights;
|
||||||
for (unsigned int p = 0; p < pcMesh->mNumBones;++p)
|
for (unsigned int p = 0; p < pcMesh->mNumBones;++p)
|
||||||
{
|
{
|
||||||
|
@ -382,7 +382,7 @@ void SplitLargeMeshesProcess_Vertex::Execute( aiScene* pScene)
|
||||||
|
|
||||||
if (avList.size() != pScene->mNumMeshes)
|
if (avList.size() != pScene->mNumMeshes)
|
||||||
{
|
{
|
||||||
// it seems something has been splitted. rebuild the mesh list
|
// it seems something has been split. rebuild the mesh list
|
||||||
delete[] pScene->mMeshes;
|
delete[] pScene->mMeshes;
|
||||||
pScene->mNumMeshes = (unsigned int)avList.size();
|
pScene->mNumMeshes = (unsigned int)avList.size();
|
||||||
pScene->mMeshes = new aiMesh*[avList.size()];
|
pScene->mMeshes = new aiMesh*[avList.size()];
|
||||||
|
@ -392,7 +392,7 @@ void SplitLargeMeshesProcess_Vertex::Execute( aiScene* pScene)
|
||||||
|
|
||||||
// now we need to update all nodes
|
// now we need to update all nodes
|
||||||
SplitLargeMeshesProcess_Triangle::UpdateNode(pScene->mRootNode,avList);
|
SplitLargeMeshesProcess_Triangle::UpdateNode(pScene->mRootNode,avList);
|
||||||
DefaultLogger::get()->info("SplitLargeMeshesProcess_Vertex finished. Meshes have been splitted");
|
DefaultLogger::get()->info("SplitLargeMeshesProcess_Vertex finished. Meshes have been split");
|
||||||
}
|
}
|
||||||
else DefaultLogger::get()->debug("SplitLargeMeshesProcess_Vertex finished. There was nothing to do");
|
else DefaultLogger::get()->debug("SplitLargeMeshesProcess_Vertex finished. There was nothing to do");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -114,7 +114,7 @@ protected:
|
||||||
const XFile::Node* pNode);
|
const XFile::Node* pNode);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Converts all meshes in the given mesh array. Each mesh is splitted
|
/** Converts all meshes in the given mesh array. Each mesh is split
|
||||||
* up per material, the indices of the generated meshes are stored in
|
* up per material, the indices of the generated meshes are stored in
|
||||||
* the node structure.
|
* the node structure.
|
||||||
* @param pScene The scene to construct the return data in.
|
* @param pScene The scene to construct the return data in.
|
||||||
|
|
|
@ -153,7 +153,7 @@ The general 'rule' to get from Assimp headers to the serialized layout is:
|
||||||
|
|
||||||
[[aiNode]]
|
[[aiNode]]
|
||||||
|
|
||||||
- mParent is ommitted
|
- mParent is omitted
|
||||||
|
|
||||||
[[aiLight]]
|
[[aiLight]]
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ The general 'rule' to get from Assimp headers to the serialized layout is:
|
||||||
|
|
||||||
[[aiMaterial]]
|
[[aiMaterial]]
|
||||||
|
|
||||||
- mNumAllocated is ommitted, for obvious reasons :-)
|
- mNumAllocated is omitted, for obvious reasons :-)
|
||||||
|
|
||||||
|
|
||||||
@endverbatim*/
|
@endverbatim*/
|
||||||
|
|
|
@ -983,7 +983,7 @@ DllPlugInTesterd_dll.exe CppUnitTestPlugInd.dll :Core
|
||||||
TestListener.
|
TestListener.
|
||||||
|
|
||||||
* TestResult (TestResult.h):
|
* TestResult (TestResult.h):
|
||||||
- That class has been splitted in two: TestResult and TestResultCollector.
|
- That class has been split in two: TestResult and TestResultCollector.
|
||||||
|
|
||||||
- TestResult manages the TestListener (registration and event dispatch), as
|
- TestResult manages the TestListener (registration and event dispatch), as
|
||||||
well as the stop flag indicating if the current test run should be interrupted.
|
well as the stop flag indicating if the current test run should be interrupted.
|
||||||
|
@ -1077,7 +1077,7 @@ an example of usage.
|
||||||
|
|
||||||
* Compatibility break:
|
* Compatibility break:
|
||||||
|
|
||||||
TestResult has been splitted in two class. TestResultCollector compatibility
|
TestResult has been split in two class. TestResultCollector compatibility
|
||||||
breaks refer to the methods that were previously in TestResult.
|
breaks refer to the methods that were previously in TestResult.
|
||||||
|
|
||||||
- TestListener::addError() was removed. addFailure() is used to report
|
- TestListener::addError() was removed. addFailure() is used to report
|
||||||
|
|
|
@ -28,7 +28,7 @@ StringTools::Strings
|
||||||
StringTools::split( const std::string &text,
|
StringTools::split( const std::string &text,
|
||||||
char separator )
|
char separator )
|
||||||
{
|
{
|
||||||
Strings splittedText;
|
Strings splitText;
|
||||||
|
|
||||||
std::string::const_iterator itStart = text.begin();
|
std::string::const_iterator itStart = text.begin();
|
||||||
while ( !text.empty() )
|
while ( !text.empty() )
|
||||||
|
@ -36,14 +36,14 @@ StringTools::split( const std::string &text,
|
||||||
std::string::const_iterator itSeparator = std::find( itStart,
|
std::string::const_iterator itSeparator = std::find( itStart,
|
||||||
text.end(),
|
text.end(),
|
||||||
separator );
|
separator );
|
||||||
splittedText.push_back( text.substr( itStart - text.begin(),
|
splitText.push_back( text.substr( itStart - text.begin(),
|
||||||
itSeparator - itStart ) );
|
itSeparator - itStart ) );
|
||||||
if ( itSeparator == text.end() )
|
if ( itSeparator == text.end() )
|
||||||
break;
|
break;
|
||||||
itStart = itSeparator +1;
|
itStart = itSeparator +1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return splittedText;
|
return splitText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ Required. Relative or absolute path to the input model.
|
||||||
<p>
|
<p>
|
||||||
<tt>
|
<tt>
|
||||||
out<br></tt><br>
|
out<br></tt><br>
|
||||||
Optional. Relative or absolute path to write the output dump to. If it is ommitted,
|
Optional. Relative or absolute path to write the output dump to. If it is omitted,
|
||||||
the dump is written to <tt><model>-dump.txt</tt>
|
the dump is written to <tt><model>-dump.txt</tt>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ Required. Relative or absolute path to the input model.
|
||||||
<tt>
|
<tt>
|
||||||
out<br></tt><br>
|
out<br></tt><br>
|
||||||
Optional. Relative or absolute path to write the output images to. If the file name is
|
Optional. Relative or absolute path to write the output images to. If the file name is
|
||||||
ommitted the output images are named <tt><model-filename></tt><br>
|
omitted the output images are named <tt><model-filename></tt><br>
|
||||||
The suffix <tt>_img<n></tt> is appended to the file name if the -s switch is not specified
|
The suffix <tt>_img<n></tt> is appended to the file name if the -s switch is not specified
|
||||||
(where <tt><n></tt> is the zero-based index of the texture in the model file).<br>
|
(where <tt><n></tt> is the zero-based index of the texture in the model file).<br>
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ template_convert_single = r"""
|
||||||
try {{ GenericConvert( in->{name}, arg, db ); break; }}
|
try {{ GenericConvert( in->{name}, arg, db ); break; }}
|
||||||
catch (const TypeError& t) {{ throw TypeError(t.what() + std::string(" - expected argument {argnum} to {classname} to be a `{full_type}`")); }}"""
|
catch (const TypeError& t) {{ throw TypeError(t.what() + std::string(" - expected argument {argnum} to {classname} to be a `{full_type}`")); }}"""
|
||||||
|
|
||||||
template_converter_ommitted = '// this data structure is not used yet, so there is no code generated to fill its members\n'
|
template_converter_omitted = '// this data structure is not used yet, so there is no code generated to fill its members\n'
|
||||||
template_converter_epilogue = '\treturn base;'
|
template_converter_epilogue = '\treturn base;'
|
||||||
|
|
||||||
import ExpressReader
|
import ExpressReader
|
||||||
|
@ -166,7 +166,7 @@ def gen_converter(entity,schema):
|
||||||
|
|
||||||
code = template_converter_prologue_a.format(parent=entity.parent) if entity.parent else template_converter_prologue_b
|
code = template_converter_prologue_a.format(parent=entity.parent) if entity.parent else template_converter_prologue_b
|
||||||
if entity.name in schema.blacklist_partial:
|
if entity.name in schema.blacklist_partial:
|
||||||
return code+template_converter_ommitted+template_converter_epilogue;
|
return code+template_converter_omitted+template_converter_epilogue;
|
||||||
|
|
||||||
if max_arg > 0:
|
if max_arg > 0:
|
||||||
code +=template_converter_check_argcnt.format(max_arg=max_arg,name=entity.name)
|
code +=template_converter_check_argcnt.format(max_arg=max_arg,name=entity.name)
|
||||||
|
|
|
@ -55,7 +55,7 @@ import utils
|
||||||
usage = """gen_db [-i=...] [-e=...] [-p] [-n]
|
usage = """gen_db [-i=...] [-e=...] [-p] [-n]
|
||||||
|
|
||||||
(lists of file extensions are comma delimited, i.e. `3ds,lwo,x`)
|
(lists of file extensions are comma delimited, i.e. `3ds,lwo,x`)
|
||||||
-i,--include: List of file extensions to update dumps for. If ommitted,
|
-i,--include: List of file extensions to update dumps for. If omitted,
|
||||||
all file extensions are updated except those in `exclude`.
|
all file extensions are updated except those in `exclude`.
|
||||||
|
|
||||||
-e,--exclude: Merged with settings.exclude_extensions to produce a
|
-e,--exclude: Merged with settings.exclude_extensions to produce a
|
||||||
|
|
|
@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
const char* AICMD_MSG_EXPORT_HELP_E =
|
const char* AICMD_MSG_EXPORT_HELP_E =
|
||||||
"assimp export <model> [<out>] [-f<h>] [common parameters]\n"
|
"assimp export <model> [<out>] [-f<h>] [common parameters]\n"
|
||||||
"\t -f<h> Specify the file format. If ommitted, the output format is \n"
|
"\t -f<h> Specify the file format. If omitted, the output format is \n"
|
||||||
"\t\tderived from the file extension of the given output file \n"
|
"\t\tderived from the file extension of the given output file \n"
|
||||||
"\t[See the assimp_cmd docs for a full list of all common parameters] \n"
|
"\t[See the assimp_cmd docs for a full list of all common parameters] \n"
|
||||||
;
|
;
|
||||||
|
|
|
@ -51,7 +51,7 @@ const char* AICMD_MSG_DUMP_HELP_E =
|
||||||
"assimp extract <model> [<out>] [-t<n>] [-f<fmt>] [-ba] [-s] [common parameters]\n"
|
"assimp extract <model> [<out>] [-t<n>] [-f<fmt>] [-ba] [-s] [common parameters]\n"
|
||||||
"\t -ba Writes BMP's with alpha channel\n"
|
"\t -ba Writes BMP's with alpha channel\n"
|
||||||
"\t -t<n> Zero-based index of the texture to be extracted \n"
|
"\t -t<n> Zero-based index of the texture to be extracted \n"
|
||||||
"\t -f<f> Specify the file format if <out> is ommitted \n"
|
"\t -f<f> Specify the file format if <out> is omitted \n"
|
||||||
"\t[See the assimp_cmd docs for a full list of all common parameters] \n"
|
"\t[See the assimp_cmd docs for a full list of all common parameters] \n"
|
||||||
"\t -cfast Fast post processing preset, runs just a few important steps \n"
|
"\t -cfast Fast post processing preset, runs just a few important steps \n"
|
||||||
"\t -cdefault Default post processing: runs all recommended steps\n"
|
"\t -cdefault Default post processing: runs all recommended steps\n"
|
||||||
|
|
|
@ -233,4 +233,4 @@ class AssetHelper
|
||||||
void FlipNormalsInt();
|
void FlipNormalsInt();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !! IG
|
#endif // !! IG
|
||||||
|
|
Loading…
Reference in New Issue