Skip to content

Commit

Permalink
[3393728] [PATCH 1/2] ommit->omit and splitted->split
Browse files Browse the repository at this point in the history
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1064 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
  • Loading branch information
aramis_acg committed Aug 20, 2011
1 parent 56098cd commit 2ffac89
Show file tree
Hide file tree
Showing 16 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion code/BlenderScene.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ struct SubsurfModifierData : ElemBase {
};

enum Flags {
// some ommitted
// some omitted
FLAGS_SubsurfUV =1<<3
};

Expand Down
2 changes: 1 addition & 1 deletion code/COBLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ void COBImporter::ReadAsciiFile(Scene& out, StreamReaderLE* stream)
ChunkInfo ci;
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 ")) {
ReadChunkInfo_Ascii(ci,splitter);
ReadPolH_Ascii(out,splitter,ci);
Expand Down
50 changes: 25 additions & 25 deletions code/MDLLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1193,32 +1193,32 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
void MDLImporter::SortByMaterials_3DGS_MDL7(
const MDL::IntGroupInfo_MDL7& groupInfo,
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 we don't need a second set of texture coordinates there is no reason to keep it in memory ...
groupData.vTextureCoords2.clear();

// 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)
splittedGroupData.aiSplit[m] = new std::vector<unsigned int>();
splitGroupData.aiSplit[m] = new std::vector<unsigned int>();

// iterate through all faces and sort by material
for (unsigned int iFace = 0; iFace < (unsigned int)groupInfo.pcGroup->numtris;++iFace) {
// check range
if (groupData.pcFaces[iFace].iMatIndex[0] >= iNumMaterials) {
// 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
// one skin assigned. No warning in this case
if(0xFFFFFFFF != groupData.pcFaces[iFace].iMatIndex[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);
}
}
Expand Down Expand Up @@ -1271,8 +1271,8 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
sHelper.pcMat = new MaterialHelper();
sHelper.iOldMatIndices[0] = iMatIndex;
sHelper.iOldMatIndices[1] = iMatIndex2;
JoinSkins_3DGS_MDL7(splittedGroupData.shared.pcMats[iMatIndex],
splittedGroupData.shared.pcMats[iMatIndex2],sHelper.pcMat);
JoinSkins_3DGS_MDL7(splitGroupData.shared.pcMats[iMatIndex],
splitGroupData.shared.pcMats[iMatIndex2],sHelper.pcMat);

// and add it to the list
avMats.push_back(sHelper);
Expand All @@ -1288,21 +1288,21 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(

// now add the newly created materials to the old list
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)
splittedGroupData.shared.pcMats[o] = avMats[o].pcMat;
splitGroupData.shared.pcMats[o] = avMats[o].pcMat;
}
else {
// 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)
splittedGroupData.shared.pcMats[o] = avMats[o].pcMat;
splitGroupData.shared.pcMats[o] = avMats[o].pcMat;
}

// 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)
splittedGroupData.aiSplit[m] = aiTempSplit[m];
splitGroupData.aiSplit[m] = aiTempSplit[m];
}
}

Expand Down Expand Up @@ -1438,7 +1438,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
szCurrent += pcHeader->mainvertex_stc_size * groupInfo.pcGroup->numverts;
VALIDATE_FILE_SIZE(szCurrent);

MDL::IntSplittedGroupData_MDL7 splittedGroupData(sharedData,avOutList[iGroup]);
MDL::IntSplittedGroupData_MDL7 splitGroupData(sharedData,avOutList[iGroup]);
MDL::IntGroupData_MDL7 groupData;
if (groupInfo.pcGroup->numtris && groupInfo.pcGroup->numverts)
{
Expand Down Expand Up @@ -1467,10 +1467,10 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )

// sort by materials
SortByMaterials_3DGS_MDL7(groupInfo, groupData,
splittedGroupData);
splitGroupData);

for (unsigned int qq = 0; qq < sharedData.pcMats.size();++qq) {
if (!splittedGroupData.aiSplit[qq]->empty())
if (!splitGroupData.aiSplit[qq]->empty())
sharedData.abNeedMaterials[qq] = true;
}
}
Expand All @@ -1479,7 +1479,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )

// process all frames and generate output meshes
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
Expand Down Expand Up @@ -1773,16 +1773,16 @@ void MDLImporter::AddAnimationBoneTrafoKey_3DGS_MDL7(unsigned int iTrafo,
// Construct output meshes
void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
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 ...
const MDL::Header_MDL7* const pcHeader = (const MDL::Header_MDL7*)this->mBuffer;
const unsigned int iNumOutBones = pcHeader->bones_num;

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
aiMesh* pcMesh = new aiMesh();
Expand All @@ -1791,7 +1791,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
pcMesh->mMaterialIndex = (unsigned int)i;

// 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->mNumVertices = pcMesh->mNumFaces*3;
Expand All @@ -1813,7 +1813,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
pcMesh->mFaces[iFace].mNumIndices = 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];

// iterate through all face indices
Expand Down Expand Up @@ -1841,7 +1841,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(

int iCurrent = 0;
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];

// iterate through all face indices
Expand Down Expand Up @@ -1887,7 +1887,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
}
}
// add the mesh to the list of output meshes
splittedGroupData.avOutList.push_back(pcMesh);
splitGroupData.avOutList.push_back(pcMesh);
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions code/MDLLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ using namespace MDL;
* </ul>
* 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
* 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
{
Expand Down Expand Up @@ -401,12 +401,12 @@ class MDLImporter : public BaseImporter
* might create new materials.
* \param groupInfo -> 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(
const MDL::IntGroupInfo_MDL7& groupInfo,
MDL::IntGroupData_MDL7& groupData,
MDL::IntSplittedGroupData_MDL7& splittedGroupData);
MDL::IntSplittedGroupData_MDL7& splitGroupData);

// -------------------------------------------------------------------
/** Read all faces and vertices from a MDL7 group. The function fills
Expand All @@ -420,11 +420,11 @@ class MDLImporter : public BaseImporter
// -------------------------------------------------------------------
/** Generate the final output meshes for a7 models
* \param groupData -> doc of data structure
* \param splittedGroupData -> doc of data structure
* \param splitGroupData -> doc of data structure
*/
void GenerateOutputMeshes_3DGS_MDL7(
MDL::IntGroupData_MDL7& groupData,
MDL::IntSplittedGroupData_MDL7& splittedGroupData);
MDL::IntSplittedGroupData_MDL7& splitGroupData);

protected:

Expand Down
2 changes: 1 addition & 1 deletion code/OptimizeMeshes.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class ASSIMP_API OptimizeMeshesProcess : public BaseProcess
/** @brief Specify a maximum size of a single output mesh.
*
* 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 faces Maximum number of faces per mesh
*/
Expand Down
10 changes: 5 additions & 5 deletions code/SplitLargeMeshes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void SplitLargeMeshesProcess_Triangle::Execute( aiScene* pScene)

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;
pScene->mNumMeshes = (unsigned int)avList.size();
pScene->mMeshes = new aiMesh*[avList.size()];
Expand All @@ -94,7 +94,7 @@ void SplitLargeMeshesProcess_Triangle::Execute( aiScene* pScene)

// now we need to update all nodes
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");
return;
Expand Down Expand Up @@ -227,7 +227,7 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
pcMesh->mBones = new aiBone*[pMesh->mNumBones];

// 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;
for (unsigned int p = 0; p < pcMesh->mNumBones;++p)
{
Expand Down Expand Up @@ -382,7 +382,7 @@ void SplitLargeMeshesProcess_Vertex::Execute( aiScene* pScene)

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;
pScene->mNumMeshes = (unsigned int)avList.size();
pScene->mMeshes = new aiMesh*[avList.size()];
Expand All @@ -392,7 +392,7 @@ void SplitLargeMeshesProcess_Vertex::Execute( aiScene* pScene)

// now we need to update all nodes
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");
return;
Expand Down
2 changes: 1 addition & 1 deletion code/XFileImporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class XFileImporter : public BaseImporter
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
* the node structure.
* @param pScene The scene to construct the return data in.
Expand Down
4 changes: 2 additions & 2 deletions code/assbin_chunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ The general 'rule' to get from Assimp headers to the serialized layout is:
[[aiNode]]
- mParent is ommitted
- mParent is omitted
[[aiLight]]
Expand All @@ -162,7 +162,7 @@ The general 'rule' to get from Assimp headers to the serialized layout is:
[[aiMaterial]]
- mNumAllocated is ommitted, for obvious reasons :-)
- mNumAllocated is omitted, for obvious reasons :-)
@endverbatim*/
Expand Down
4 changes: 2 additions & 2 deletions contrib/cppunit-1.12.1/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ DllPlugInTesterd_dll.exe CppUnitTestPlugInd.dll :Core
TestListener.

* 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
well as the stop flag indicating if the current test run should be interrupted.
Expand Down Expand Up @@ -1077,7 +1077,7 @@ an example of usage.

* 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.

- TestListener::addError() was removed. addFailure() is used to report
Expand Down
6 changes: 3 additions & 3 deletions contrib/cppunit-1.12.1/src/cppunit/StringTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ StringTools::Strings
StringTools::split( const std::string &text,
char separator )
{
Strings splittedText;
Strings splitText;

std::string::const_iterator itStart = text.begin();
while ( !text.empty() )
{
std::string::const_iterator itSeparator = std::find( itStart,
text.end(),
separator );
splittedText.push_back( text.substr( itStart - text.begin(),
splitText.push_back( text.substr( itStart - text.begin(),
itSeparator - itStart ) );
if ( itSeparator == text.end() )
break;
itStart = itSeparator +1;
}

return splittedText;
return splitText;
}


Expand Down
4 changes: 2 additions & 2 deletions doc/dox_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Required. Relative or absolute path to the input model.
<p>
<tt>
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>&lt;model&gt;-dump.txt</tt>
</p>
Expand Down Expand Up @@ -281,7 +281,7 @@ Required. Relative or absolute path to the input model.
<tt>
out<br></tt><br>
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&lt;n&gt;</tt> is appended to the file name if the -s switch is not specified
(where <tt>&lt;n&gt;</tt> is the zero-based index of the texture in the model file).<br>
Expand Down
4 changes: 2 additions & 2 deletions scripts/IFCImporter/CppGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
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}`")); }}"""

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;'

import ExpressReader
Expand Down Expand Up @@ -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
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:
code +=template_converter_check_argcnt.format(max_arg=max_arg,name=entity.name)
Expand Down
2 changes: 1 addition & 1 deletion test/regression/gen_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
usage = """gen_db [-i=...] [-e=...] [-p] [-n]
(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`.
-e,--exclude: Merged with settings.exclude_extensions to produce a
Expand Down
2 changes: 1 addition & 1 deletion tools/assimp_cmd/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

const char* AICMD_MSG_EXPORT_HELP_E =
"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[See the assimp_cmd docs for a full list of all common parameters] \n"
;
Expand Down
Loading

0 comments on commit 2ffac89

Please sign in to comment.