Fix spelling mistakes
This commit is contained in:
@@ -197,7 +197,7 @@ void Discreet3DSImporter::InternReadFile( const std::string& pFile,
|
||||
ComputeNormalsWithSmoothingsGroups<D3DS::Face>(*i);
|
||||
}
|
||||
|
||||
// Replace all occurences of the default material with a
|
||||
// Replace all occurrences of the default material with a
|
||||
// valid material. Generate it if no material containing
|
||||
// DEFAULT in its name has been found in the file
|
||||
ReplaceDefaultMaterial();
|
||||
|
||||
@@ -884,7 +884,7 @@ void AC3DImporter::InternReadFile( const std::string& pFile,
|
||||
// copy meshes
|
||||
if (meshes.empty())
|
||||
{
|
||||
throw DeadlyImportError("An unknown error occured during converting");
|
||||
throw DeadlyImportError("An unknown error occurred during converting");
|
||||
}
|
||||
pScene->mNumMeshes = (unsigned int)meshes.size();
|
||||
pScene->mMeshes = new aiMesh*[pScene->mNumMeshes];
|
||||
|
||||
@@ -604,7 +604,7 @@ private:
|
||||
//! \param out Output string
|
||||
//! \param szName Name of the enclosing element -> used in error
|
||||
//! messages.
|
||||
//! \return false if an error occured
|
||||
//! \return false if an error occurred
|
||||
bool ParseString(std::string& out,const char* szName);
|
||||
|
||||
public:
|
||||
|
||||
@@ -368,7 +368,7 @@ void BVHLoader::ReadMotion( aiScene* /*pScene*/)
|
||||
// Retrieves the next token
|
||||
std::string BVHLoader::GetNextToken()
|
||||
{
|
||||
// skip any preceeding whitespace
|
||||
// skip any preceding whitespace
|
||||
while( mReader != mBuffer.end())
|
||||
{
|
||||
if( !isspace( *mReader))
|
||||
|
||||
@@ -336,7 +336,7 @@ void BaseImporter::ConvertToUTF8(std::vector<char>& data)
|
||||
// UTF 32 BE with BOM
|
||||
if(*((uint32_t*)&data.front()) == 0xFFFE0000) {
|
||||
|
||||
// swap the endianess ..
|
||||
// swap the endianness ..
|
||||
for(uint32_t* p = (uint32_t*)&data.front(), *end = (uint32_t*)&data.back(); p <= end; ++p) {
|
||||
AI_SWAP4P(p);
|
||||
}
|
||||
@@ -367,7 +367,7 @@ void BaseImporter::ConvertToUTF8(std::vector<char>& data)
|
||||
// UTF 16 BE with BOM
|
||||
if(*((uint16_t*)&data.front()) == 0xFFFE) {
|
||||
|
||||
// swap the endianess ..
|
||||
// swap the endianness ..
|
||||
for(uint16_t* p = (uint16_t*)&data.front(), *end = (uint16_t*)&data.back(); p <= end; ++p) {
|
||||
ByteSwap::Swap2(p);
|
||||
}
|
||||
@@ -534,7 +534,7 @@ BatchLoader::~BatchLoader()
|
||||
|
||||
delete (*it).scene;
|
||||
}
|
||||
data->pImporter->SetIOHandler(NULL); /* get pointer back into our posession */
|
||||
data->pImporter->SetIOHandler(NULL); /* get pointer back into our possession */
|
||||
delete data->pImporter;
|
||||
delete data;
|
||||
}
|
||||
|
||||
@@ -176,8 +176,8 @@ public:
|
||||
);
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
/** Returns the error description of the last error that occured.
|
||||
* @return A description of the last error that occured. An empty
|
||||
/** Returns the error description of the last error that occurred.
|
||||
* @return A description of the last error that occurred. An empty
|
||||
* string if there was no error.
|
||||
*/
|
||||
const std::string& GetErrorText() const {
|
||||
|
||||
@@ -227,7 +227,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
|
||||
|
||||
// read x,y,z
|
||||
if(!SkipSpacesAndLineEnd(&buffer))
|
||||
throw DeadlyImportError("CSM: Unexpected EOF occured reading sample x coord");
|
||||
throw DeadlyImportError("CSM: Unexpected EOF occurred reading sample x coord");
|
||||
|
||||
if (TokenMatchI(buffer, "DROPOUT", 7)) {
|
||||
// seems this is invalid marker data; at least the doc says it's possible
|
||||
@@ -239,11 +239,11 @@ void CSMImporter::InternReadFile( const std::string& pFile,
|
||||
buffer = fast_atoreal_move<float>(buffer, (float&)sub->mValue.x);
|
||||
|
||||
if(!SkipSpacesAndLineEnd(&buffer))
|
||||
throw DeadlyImportError("CSM: Unexpected EOF occured reading sample y coord");
|
||||
throw DeadlyImportError("CSM: Unexpected EOF occurred reading sample y coord");
|
||||
buffer = fast_atoreal_move<float>(buffer, (float&)sub->mValue.y);
|
||||
|
||||
if(!SkipSpacesAndLineEnd(&buffer))
|
||||
throw DeadlyImportError("CSM: Unexpected EOF occured reading sample z coord");
|
||||
throw DeadlyImportError("CSM: Unexpected EOF occurred reading sample z coord");
|
||||
buffer = fast_atoreal_move<float>(buffer, (float&)sub->mValue.z);
|
||||
|
||||
++s->mNumPositionKeys;
|
||||
|
||||
@@ -872,7 +872,7 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
|
||||
mOutput << startstr << "</lines>" << endstr;
|
||||
}
|
||||
|
||||
// triangle - dont use it, because compatibility problems
|
||||
// triangle - don't use it, because compatibility problems
|
||||
|
||||
// polygons
|
||||
if (countPoly)
|
||||
@@ -1041,7 +1041,7 @@ void ColladaExporter::WriteNode(aiNode* pNode)
|
||||
PushTag();
|
||||
|
||||
// write transformation - we can directly put the matrix there
|
||||
// TODO: (thom) decompose into scale - rot - quad to allow adressing it by animations afterwards
|
||||
// TODO: (thom) decompose into scale - rot - quad to allow addressing it by animations afterwards
|
||||
const aiMatrix4x4& mat = pNode->mTransformation;
|
||||
mOutput << startstr << "<matrix>";
|
||||
mOutput << mat.a1 << " " << mat.a2 << " " << mat.a3 << " " << mat.a4 << " ";
|
||||
|
||||
@@ -663,7 +663,7 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
|
||||
// joint vertex_weight name list - should refer to the same list as the joint names above. If not, report and reconsider
|
||||
const Collada::Accessor& weightNamesAcc = pParser.ResolveLibraryReference( pParser.mAccessorLibrary, pSrcController->mWeightInputJoints.mAccessor);
|
||||
if( &weightNamesAcc != &jointNamesAcc)
|
||||
throw DeadlyImportError( "Temporary implementational lazyness. If you read this, please report to the author.");
|
||||
throw DeadlyImportError( "Temporary implementational laziness. If you read this, please report to the author.");
|
||||
// vertex weights
|
||||
const Collada::Accessor& weightsAcc = pParser.ResolveLibraryReference( pParser.mAccessorLibrary, pSrcController->mWeightInputWeights.mAccessor);
|
||||
const Collada::Data& weights = pParser.ResolveLibraryReference( pParser.mDataLibrary, weightsAcc.mSource);
|
||||
@@ -1148,7 +1148,7 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
|
||||
// Calculate resulting transformation
|
||||
aiMatrix4x4 mat = pParser.CalculateResultTransform( transforms);
|
||||
|
||||
// out of lazyness: we store the time in matrix.d4
|
||||
// out of laziness: we store the time in matrix.d4
|
||||
mat.d4 = time;
|
||||
resultTrafos.push_back( mat);
|
||||
|
||||
@@ -1294,7 +1294,7 @@ void ColladaLoader::AddTexture ( aiMaterial& mat, const ColladaParser& pParser,
|
||||
_AI_MATKEY_TEXBLEND_BASE, type, idx);
|
||||
|
||||
// UV source index ... if we didn't resolve the mapping, it is actually just
|
||||
// a guess but it works in most cases. We search for the frst occurence of a
|
||||
// a guess but it works in most cases. We search for the frst occurrence of a
|
||||
// number in the channel name. We assume it is the zero-based index into the
|
||||
// UV channel array of all corresponding meshes. It could also be one-based
|
||||
// for some exporters, but we won't care of it unless someone complains about.
|
||||
|
||||
@@ -616,7 +616,7 @@ void ColladaParser::ReadControllerLibrary()
|
||||
{
|
||||
if( IsElement( "controller"))
|
||||
{
|
||||
// read ID. Ask the spec if it's neccessary or optional... you might be surprised.
|
||||
// read ID. Ask the spec if it's necessary or optional... you might be surprised.
|
||||
int attrID = GetAttribute( "id");
|
||||
std::string id = mReader->getAttributeValue( attrID);
|
||||
|
||||
@@ -2282,7 +2282,7 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
|
||||
if( expectedPointCount > 0)
|
||||
indices.reserve( expectedPointCount * numOffsets);
|
||||
|
||||
if (pNumPrimitives > 0) // It is possible to not contain any indicies
|
||||
if (pNumPrimitives > 0) // It is possible to not contain any indices
|
||||
{
|
||||
const char* content = GetTextContent();
|
||||
while( *content != 0)
|
||||
@@ -2317,7 +2317,7 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
|
||||
|
||||
// find accessor
|
||||
input.mResolved = &ResolveLibraryReference( mAccessorLibrary, input.mAccessor);
|
||||
// resolve accessor's data pointer as well, if neccessary
|
||||
// resolve accessor's data pointer as well, if necessary
|
||||
const Accessor* acc = input.mResolved;
|
||||
if( !acc->mData)
|
||||
acc->mData = &ResolveLibraryReference( mDataLibrary, acc->mSource);
|
||||
@@ -2340,7 +2340,7 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
|
||||
|
||||
// find accessor
|
||||
input.mResolved = &ResolveLibraryReference( mAccessorLibrary, input.mAccessor);
|
||||
// resolve accessor's data pointer as well, if neccessary
|
||||
// resolve accessor's data pointer as well, if necessary
|
||||
const Accessor* acc = input.mResolved;
|
||||
if( !acc->mData)
|
||||
acc->mData = &ResolveLibraryReference( mDataLibrary, acc->mSource);
|
||||
@@ -2876,7 +2876,7 @@ void ColladaParser::ReadScene()
|
||||
if( mReader->getNodeType() == irr::io::EXN_ELEMENT) {
|
||||
if( IsElement( "instance_visual_scene"))
|
||||
{
|
||||
// should be the first and only occurence
|
||||
// should be the first and only occurrence
|
||||
if( mRootNode)
|
||||
ThrowException( "Invalid scene containing multiple root nodes in <instance_visual_scene> element");
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ void DXFImporter::InternReadFile( const std::string& pFile,
|
||||
}
|
||||
|
||||
// skip unneeded sections entirely to avoid any problems with them
|
||||
// alltogether.
|
||||
// altogether.
|
||||
else if (reader.Is(2,"CLASSES") || reader.Is(2,"TABLES")) {
|
||||
SkipSection(reader);
|
||||
continue;
|
||||
|
||||
@@ -191,7 +191,7 @@ void ReadData(const char*& sbegin_out, const char*& send_out, const char* input,
|
||||
|
||||
// 32 bit int
|
||||
case 'I':
|
||||
// <- fall thru
|
||||
// <- fall through
|
||||
|
||||
// float
|
||||
case 'F':
|
||||
|
||||
@@ -354,7 +354,7 @@ void MeshGeometry::ReadVertexData(const std::string& type, int index, const Scop
|
||||
// sometimes, there will be only negative entries. Drop the material
|
||||
// layer in such a case (I guess it means a default material should
|
||||
// be used). This is what the converter would do anyway, and it
|
||||
// avoids loosing the material if there are more material layers
|
||||
// avoids losing the material if there are more material layers
|
||||
// coming of which at least one contains actual data (did observe
|
||||
// that with one test file).
|
||||
const size_t count_neg = std::count_if(temp_materials.begin(),temp_materials.end(),std::bind2nd(std::less<int>(),0));
|
||||
|
||||
@@ -74,7 +74,7 @@ const char* TokenTypeString(TokenType t);
|
||||
* @param prefix Message prefix to be preprended to the location info.
|
||||
* @param text Message text
|
||||
* @param line Line index, 1-based
|
||||
* @param column Colum index, 1-based
|
||||
* @param column Column index, 1-based
|
||||
* @return A string of the following format: {prefix} (offset 0x{offset}) {text}*/
|
||||
std::string AddOffset(const std::string& prefix, const std::string& text, unsigned int offset);
|
||||
|
||||
@@ -84,7 +84,7 @@ std::string AddOffset(const std::string& prefix, const std::string& text, unsign
|
||||
* @param prefix Message prefix to be preprended to the location info.
|
||||
* @param text Message text
|
||||
* @param line Line index, 1-based
|
||||
* @param column Colum index, 1-based
|
||||
* @param column Column index, 1-based
|
||||
* @return A string of the following format: {prefix} (line {line}, col {column}) {text}*/
|
||||
std::string AddLineAndColumn(const std::string& prefix, const std::string& text, unsigned int line, unsigned int column);
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
/** @file FileSystemFilter.h
|
||||
* Implements a filter system to filter calls to Exists() and Open()
|
||||
* in order to improve the sucess rate of file opening ...
|
||||
* in order to improve the success rate of file opening ...
|
||||
*/
|
||||
#ifndef AI_FILESYSTEMFILTER_H_INC
|
||||
#define AI_FILESYSTEMFILTER_H_INC
|
||||
|
||||
@@ -604,7 +604,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
|
||||
FreeScene();
|
||||
}
|
||||
|
||||
// First check if the file is accessable at all
|
||||
// First check if the file is accessible at all
|
||||
if( !pimpl->mIOHandler->Exists( pFile)) {
|
||||
|
||||
pimpl->mErrorString = "Unable to open file \"" + pFile + "\".";
|
||||
@@ -723,7 +723,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
|
||||
catch (std::exception &e)
|
||||
{
|
||||
#if (defined _MSC_VER) && (defined _CPPRTTI)
|
||||
// if we have RTTI get the full name of the exception that occured
|
||||
// if we have RTTI get the full name of the exception that occurred
|
||||
pimpl->mErrorString = std::string(typeid( e ).name()) + ": " + e.what();
|
||||
#else
|
||||
pimpl->mErrorString = std::string("std::exception: ") + e.what();
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
/** Construct a batch loader from a given IO system to be used
|
||||
* to acess external files */
|
||||
* to access external files */
|
||||
explicit BatchLoader(IOSystem* pIO);
|
||||
~BatchLoader();
|
||||
|
||||
|
||||
@@ -192,8 +192,8 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
|
||||
// Position mismatch is impossible - the vertex finder already discarded all non-matching positions
|
||||
|
||||
// We just test the other attributes even if they're not present in the mesh.
|
||||
// In this case they're initialized to 0 so the comparision succeeds.
|
||||
// By this method the non-present attributes are effectively ignored in the comparision.
|
||||
// In this case they're initialized to 0 so the comparison succeeds.
|
||||
// By this method the non-present attributes are effectively ignored in the comparison.
|
||||
if( (uv.normal - v.normal).SquareLength() > squareEpsilon)
|
||||
continue;
|
||||
if( (uv.texcoords[0] - v.texcoords[0]).SquareLength() > squareEpsilon)
|
||||
@@ -265,7 +265,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
|
||||
}
|
||||
else
|
||||
{
|
||||
// no unique vertex matches it upto now -> so add it
|
||||
// no unique vertex matches it up to now -> so add it
|
||||
replaceIndex[a] = (unsigned int)uniqueVertices.size();
|
||||
uniqueVertices.push_back( v);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ void LWOImporter::LoadLWOBPolygons(unsigned int length)
|
||||
LE_NCONST uint16_t* const end = (LE_NCONST uint16_t*)(mFileBuffer+length);
|
||||
LE_NCONST uint16_t* cursor = (LE_NCONST uint16_t*)mFileBuffer;
|
||||
|
||||
// perform endianess conversions
|
||||
// perform endianness conversions
|
||||
#ifndef AI_BUILD_BIG_ENDIAN
|
||||
while (cursor < end)ByteSwap::Swap2(cursor++);
|
||||
cursor = (LE_NCONST uint16_t*)mFileBuffer;
|
||||
@@ -256,8 +256,8 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
|
||||
LWO::Texture* pTex = NULL;
|
||||
|
||||
GetS0(surf.mName,size);
|
||||
bool runnning = true;
|
||||
while (runnning) {
|
||||
bool running = true;
|
||||
while (running) {
|
||||
if (mFileBuffer + 6 >= end)
|
||||
break;
|
||||
|
||||
|
||||
@@ -765,7 +765,7 @@ void LWOImporter::LoadLWOPoints(unsigned int length)
|
||||
}
|
||||
else mCurLayer->mTempPoints.resize( regularSize );
|
||||
|
||||
// perform endianess conversions
|
||||
// perform endianness conversions
|
||||
#ifndef AI_BUILD_BIG_ENDIAN
|
||||
for (unsigned int i = 0; i < length>>2;++i)
|
||||
ByteSwap::Swap4( mFileBuffer + (i << 2));
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
mWeight = pWeight;
|
||||
}
|
||||
|
||||
/** Comparision operator to sort bone weights by descending weight */
|
||||
/** Comparison operator to sort bone weights by descending weight */
|
||||
bool operator < (const Weight& pWeight) const
|
||||
{
|
||||
return mWeight > pWeight.mWeight;
|
||||
|
||||
@@ -305,7 +305,7 @@ inline void Vec3NormalToLatLng( const aiVector3D& p_vIn, uint16_t& p_iOut )
|
||||
b &= 0xff;
|
||||
|
||||
((unsigned char*)&p_iOut)[0] = b; // longitude
|
||||
((unsigned char*)&p_iOut)[1] = a; // lattitude
|
||||
((unsigned char*)&p_iOut)[1] = a; // latitude
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -763,7 +763,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
|
||||
|
||||
pcHeader = (BE_NCONST MD3::Header*)mBuffer;
|
||||
|
||||
// Ensure correct endianess
|
||||
// Ensure correct endianness
|
||||
#ifdef AI_BUILD_BIG_ENDIAN
|
||||
|
||||
AI_SWAP4(pcHeader->VERSION);
|
||||
@@ -832,7 +832,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
|
||||
unsigned int iNumMaterials = 0;
|
||||
while (iNum-- > 0) {
|
||||
|
||||
// Ensure correct endianess
|
||||
// Ensure correct endianness
|
||||
#ifdef AI_BUILD_BIG_ENDIAN
|
||||
|
||||
AI_SWAP4(pcSurfaces->FLAGS);
|
||||
@@ -965,7 +965,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
|
||||
pScene->mMaterials[iNumMaterials] = (aiMaterial*)pcHelper;
|
||||
pcMesh->mMaterialIndex = iNumMaterials++;
|
||||
|
||||
// Ensure correct endianess
|
||||
// Ensure correct endianness
|
||||
#ifdef AI_BUILD_BIG_ENDIAN
|
||||
|
||||
for (uint32_t i = 0; i < pcSurfaces->NUM_VERTICES;++i) {
|
||||
|
||||
@@ -406,7 +406,7 @@ MD5AnimParser::MD5AnimParser(SectionList& mSections)
|
||||
desc.mValues.reserve(mNumAnimatedComponents);
|
||||
}
|
||||
|
||||
// now read all elements (continous list of floats)
|
||||
// now read all elements (continuous list of floats)
|
||||
for (ElementList::const_iterator eit = (*iter).mElements.begin(), eitEnd = (*iter).mElements.end(); eit != eitEnd; ++eit){
|
||||
const char* sz = (*eit).szStart;
|
||||
while (SkipSpacesAndLineEnd(&sz)) {
|
||||
|
||||
@@ -370,14 +370,14 @@ public:
|
||||
// -------------------------------------------------------------------
|
||||
/** Report a specific error message and throw an exception
|
||||
* @param error Error message to be reported
|
||||
* @param line Index of the line where the error occured
|
||||
* @param line Index of the line where the error occurred
|
||||
*/
|
||||
AI_WONT_RETURN static void ReportError (const char* error, unsigned int line) AI_WONT_RETURN_SUFFIX;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
/** Report a specific warning
|
||||
* @param warn Warn message to be reported
|
||||
* @param line Index of the line where the error occured
|
||||
* @param line Index of the line where the error occurred
|
||||
*/
|
||||
static void ReportWarning (const char* warn, unsigned int line);
|
||||
|
||||
|
||||
@@ -1290,7 +1290,7 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
|
||||
iMatIndex2 = iNumMaterials-1;
|
||||
}
|
||||
|
||||
// do a slow seach in the list ...
|
||||
// do a slow search in the list ...
|
||||
iNum = 0;
|
||||
bool bFound = false;
|
||||
for (std::vector<MDL::IntMaterial_MDL7>::iterator i = avMats.begin();i != avMats.end();++i,++iNum){
|
||||
|
||||
@@ -60,7 +60,7 @@ using namespace Assimp;
|
||||
static aiTexel* const bad_texel = reinterpret_cast<aiTexel*>(SIZE_MAX);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Find a suitable pallette file or take teh default one
|
||||
// Find a suitable pallette file or take the default one
|
||||
void MDLImporter::SearchPalette(const unsigned char** pszColorMap)
|
||||
{
|
||||
// now try to find the color map in the current directory
|
||||
@@ -129,7 +129,7 @@ aiColor4D MDLImporter::ReplaceTextureWithColor(const aiTexture* pcTexture)
|
||||
// Read a texture from a MDL3 file
|
||||
void MDLImporter::CreateTextureARGB8_3DGS_MDL3(const unsigned char* szData)
|
||||
{
|
||||
const MDL::Header *pcHeader = (const MDL::Header*)mBuffer; //the endianess is allready corrected in the InternReadFile_3DGS_MDL345 function
|
||||
const MDL::Header *pcHeader = (const MDL::Header*)mBuffer; //the endianness is already corrected in the InternReadFile_3DGS_MDL345 function
|
||||
|
||||
VALIDATE_FILE_SIZE(szData + pcHeader->skinwidth *
|
||||
pcHeader->skinheight);
|
||||
@@ -178,7 +178,7 @@ void MDLImporter::CreateTexture_3DGS_MDL4(const unsigned char* szData,
|
||||
{
|
||||
ai_assert(NULL != piSkip);
|
||||
|
||||
const MDL::Header *pcHeader = (const MDL::Header*)mBuffer; //the endianess is allready corrected in the InternReadFile_3DGS_MDL345 function
|
||||
const MDL::Header *pcHeader = (const MDL::Header*)mBuffer; //the endianness is already corrected in the InternReadFile_3DGS_MDL345 function
|
||||
|
||||
if (iType == 1 || iType > 3)
|
||||
{
|
||||
|
||||
@@ -262,7 +262,7 @@ void NDOImporter::InternReadFile( const std::string& pFile,
|
||||
aiFace* faces = mesh->mFaces = new aiFace[mesh->mNumFaces=face_table.size()];
|
||||
|
||||
vertices.clear();
|
||||
vertices.reserve(4 * face_table.size()); // arbitrarily choosen
|
||||
vertices.reserve(4 * face_table.size()); // arbitrarily chosen
|
||||
for_each(FaceTable::value_type& v, face_table) {
|
||||
indices.clear();
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ bool PLY::Element::ParseElement (const char* pCur,
|
||||
|
||||
if (!SkipSpaces(&pCur))return false;
|
||||
|
||||
//parse the number of occurences of this element
|
||||
//parse the number of occurrences of this element
|
||||
pOut->NumOccur = strtoul10(pCur,&pCur);
|
||||
|
||||
// go to the next line
|
||||
@@ -854,7 +854,7 @@ bool PLY::PropertyInstance::ParseValueBinary(
|
||||
out->iUInt = (uint32_t)*((uint32_t*)pCur);
|
||||
pCur += 4;
|
||||
|
||||
// Swap endianess
|
||||
// Swap endianness
|
||||
if (p_bBE)ByteSwap::Swap((int32_t*)&out->iUInt);
|
||||
break;
|
||||
|
||||
@@ -862,7 +862,7 @@ bool PLY::PropertyInstance::ParseValueBinary(
|
||||
{
|
||||
uint16_t i = *((uint16_t*)pCur);
|
||||
|
||||
// Swap endianess
|
||||
// Swap endianness
|
||||
if (p_bBE)ByteSwap::Swap(&i);
|
||||
out->iUInt = (uint32_t)i;
|
||||
pCur += 2;
|
||||
@@ -880,7 +880,7 @@ bool PLY::PropertyInstance::ParseValueBinary(
|
||||
out->iInt = *((int32_t*)pCur);
|
||||
pCur += 4;
|
||||
|
||||
// Swap endianess
|
||||
// Swap endianness
|
||||
if (p_bBE)ByteSwap::Swap(&out->iInt);
|
||||
break;
|
||||
|
||||
@@ -888,7 +888,7 @@ bool PLY::PropertyInstance::ParseValueBinary(
|
||||
{
|
||||
int16_t i = *((int16_t*)pCur);
|
||||
|
||||
// Swap endianess
|
||||
// Swap endianness
|
||||
if (p_bBE)ByteSwap::Swap(&i);
|
||||
out->iInt = (int32_t)i;
|
||||
pCur += 2;
|
||||
@@ -904,7 +904,7 @@ bool PLY::PropertyInstance::ParseValueBinary(
|
||||
{
|
||||
out->fFloat = *((float*)pCur);
|
||||
|
||||
// Swap endianess
|
||||
// Swap endianness
|
||||
if (p_bBE)ByteSwap::Swap((int32_t*)&out->fFloat);
|
||||
pCur += 4;
|
||||
break;
|
||||
@@ -913,7 +913,7 @@ bool PLY::PropertyInstance::ParseValueBinary(
|
||||
{
|
||||
out->fDouble = *((double*)pCur);
|
||||
|
||||
// Swap endianess
|
||||
// Swap endianness
|
||||
if (p_bBE)ByteSwap::Swap((int64_t*)&out->fDouble);
|
||||
pCur += 8;
|
||||
break;
|
||||
|
||||
@@ -39,7 +39,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/** @file SMDLoader.h
|
||||
* @brief Defintion of the Valve SMD file format
|
||||
* @brief Definition of the Valve SMD file format
|
||||
*/
|
||||
|
||||
#ifndef AI_SMDLOADER_H_INCLUDED
|
||||
|
||||
@@ -406,7 +406,7 @@ bool STLImporter::LoadBinaryFile()
|
||||
}
|
||||
bool bIsMaterialise = false;
|
||||
|
||||
// search for an occurence of "COLOR=" in the header
|
||||
// search for an occurrence of "COLOR=" in the header
|
||||
const unsigned char* sz2 = (const unsigned char*)mBuffer;
|
||||
const unsigned char* const szEnd = sz2+80;
|
||||
while (sz2 < szEnd) {
|
||||
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
/** Merges two or more materials
|
||||
*
|
||||
* The materials should be complementary as much as possible. In case
|
||||
* of a property present in different materials, the first occurence
|
||||
* of a property present in different materials, the first occurrence
|
||||
* is used.
|
||||
*
|
||||
* @param dest Destination material. Must be empty.
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
* the master graph), a scene is attached to the root of the master
|
||||
* graph (as an additional child node)
|
||||
* @duplicates List of duplicates. If elem[n] == n the scene is not
|
||||
* a duplicate. Otherwise elem[n] links scene n to its first occurence.
|
||||
* a duplicate. Otherwise elem[n] links scene n to its first occurrence.
|
||||
*/
|
||||
static void AttachToGraph ( aiScene* master,
|
||||
std::vector<NodeAttachmentInfo>& srcList);
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace {
|
||||
} // namespace
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Fills an array with indices of all positions indentical to the given position. In opposite to
|
||||
// Fills an array with indices of all positions identical to the given position. In opposite to
|
||||
// FindPositions(), not an epsilon is used but a (very low) tolerance of four floating-point units.
|
||||
void SpatialSort::FindIdenticalPositions( const aiVector3D& pPosition,
|
||||
std::vector<unsigned int>& poResults) const
|
||||
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
std::vector<unsigned int>& poResults) const;
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
/** Fills an array with indices of all positions indentical to the given position. In
|
||||
/** Fills an array with indices of all positions identical to the given position. In
|
||||
* opposite to FindPositions(), not an epsilon is used but a (very low) tolerance of
|
||||
* four floating-point units.
|
||||
* @param pPosition The position to look for vertices.
|
||||
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
// ----------------------------------------------------------------
|
||||
/** @brief Generates a flat circle
|
||||
*
|
||||
* The circle is constructed in the planed formed by the x,z
|
||||
* The circle is constructed in the planned formed by the x,z
|
||||
* axes of the cartesian coordinate system.
|
||||
*
|
||||
* @param radius Radius of the circle
|
||||
|
||||
@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/** @file Defines the StreamReader class which reads data from
|
||||
* a binary stream with a well-defined endianess. */
|
||||
* a binary stream with a well-defined endianness. */
|
||||
|
||||
#ifndef AI_STREAMREADER_H_INCLUDED
|
||||
#define AI_STREAMREADER_H_INCLUDED
|
||||
@@ -57,9 +57,9 @@ namespace Assimp {
|
||||
/** Wrapper class around IOStream to allow for consistent reading of binary data in both
|
||||
* little and big endian format. Don't attempt to instance the template directly. Use
|
||||
* StreamReaderLE to read from a little-endian stream and StreamReaderBE to read from a
|
||||
* BE stream. The class expects that the endianess of any input data is known at
|
||||
* BE stream. The class expects that the endianness of any input data is known at
|
||||
* compile-time, which should usually be true (#BaseImporter::ConvertToUTF8 implements
|
||||
* runtime endianess conversions for text files).
|
||||
* runtime endianness conversions for text files).
|
||||
*
|
||||
* XXX switch from unsigned int for size types to size_t? or ptrdiff_t?*/
|
||||
// --------------------------------------------------------------------------------------------
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
/** Construction from a given stream with a well-defined endianess.
|
||||
/** Construction from a given stream with a well-defined endianness.
|
||||
*
|
||||
* The StreamReader holds a permanent strong reference to the
|
||||
* stream, which is released upon destruction.
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
* reads from the current position to the end of the stream.
|
||||
* @param le If @c RuntimeSwitch is true: specifies whether the
|
||||
* stream is in little endian byte order. Otherwise the
|
||||
* endianess information is contained in the @c SwapEndianess
|
||||
* endianness information is contained in the @c SwapEndianess
|
||||
* template parameter and this parameter is meaningless. */
|
||||
StreamReader(boost::shared_ptr<IOStream> stream, bool le = false)
|
||||
: stream(stream)
|
||||
|
||||
@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/** @file Defines the StreamWriter class which writes data to
|
||||
* a binary stream with a well-defined endianess. */
|
||||
* a binary stream with a well-defined endianness. */
|
||||
|
||||
#ifndef AI_STREAMWRITER_H_INCLUDED
|
||||
#define AI_STREAMWRITER_H_INCLUDED
|
||||
@@ -57,7 +57,7 @@ namespace Assimp {
|
||||
/** Wrapper class around IOStream to allow for consistent writing of binary data in both
|
||||
* little and big endian format. Don't attempt to instance the template directly. Use
|
||||
* StreamWriterLE to read from a little-endian stream and StreamWriterBE to read from a
|
||||
* BE stream. Alternatively, there is StreamWriterAny if the endianess of the output
|
||||
* BE stream. Alternatively, there is StreamWriterAny if the endianness of the output
|
||||
* stream is to be determined at runtime.
|
||||
*/
|
||||
// --------------------------------------------------------------------------------------------
|
||||
@@ -71,7 +71,7 @@ class StreamWriter
|
||||
public:
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
/** Construction from a given stream with a well-defined endianess.
|
||||
/** Construction from a given stream with a well-defined endianness.
|
||||
*
|
||||
* The StreamReader holds a permanent strong reference to the
|
||||
* stream, which is released upon destruction.
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
continues at the current position of the stream cursor.
|
||||
* @param le If @c RuntimeSwitch is true: specifies whether the
|
||||
* stream is in little endian byte order. Otherwise the
|
||||
* endianess information is defined by the @c SwapEndianess
|
||||
* endianness information is defined by the @c SwapEndianess
|
||||
* template parameter and this parameter is meaningless. */
|
||||
StreamWriter(boost::shared_ptr<IOStream> stream, bool le = false)
|
||||
: stream(stream)
|
||||
|
||||
@@ -126,7 +126,7 @@ void TerragenImporter::InternReadFile( const std::string& pFile,
|
||||
if( file == NULL)
|
||||
throw DeadlyImportError( "Failed to open TERRAGEN TERRAIN file " + pFile + ".");
|
||||
|
||||
// Construct a stream reader to read all data in the correct endianess
|
||||
// Construct a stream reader to read all data in the correct endianness
|
||||
StreamReaderLE reader(file);
|
||||
if(reader.GetRemainingSize() < 16)
|
||||
throw DeadlyImportError( "TER: file is too small" );
|
||||
|
||||
@@ -554,7 +554,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
|
||||
}
|
||||
}
|
||||
|
||||
// Print some detailled statistics into the log
|
||||
// Print some detailed statistics into the log
|
||||
if (!DefaultLogger::isNullLogger()) {
|
||||
|
||||
if (transformedChannels) {
|
||||
|
||||
@@ -668,7 +668,7 @@ void XFileImporter::ConvertMaterials( aiScene* pScene, std::vector<XFile::Materi
|
||||
sz[sExt] = '\0';
|
||||
}
|
||||
|
||||
// convert to lower case for easier comparision
|
||||
// convert to lower case for easier comparison
|
||||
for( unsigned int c = 0; c < sz.length(); c++)
|
||||
if( isalpha( sz[c]))
|
||||
sz[c] = tolower( sz[c]);
|
||||
|
||||
@@ -1298,7 +1298,7 @@ unsigned int XFileParser::ReadInt()
|
||||
|
||||
// TODO: consider using strtol10 instead???
|
||||
|
||||
// check preceeding minus sign
|
||||
// check preceding minus sign
|
||||
bool isNegative = false;
|
||||
if( *P == '-')
|
||||
{
|
||||
@@ -1453,7 +1453,7 @@ AI_WONT_RETURN void XFileParser::ThrowException( const std::string& pText)
|
||||
void XFileParser::FilterHierarchy( XFile::Node* pNode)
|
||||
{
|
||||
// if the node has just a single unnamed child containing a mesh, remove
|
||||
// the anonymous node inbetween. The 3DSMax kwXport plugin seems to produce this
|
||||
// the anonymous node between. The 3DSMax kwXport plugin seems to produce this
|
||||
// mess in some cases
|
||||
if( pNode->mChildren.size() == 1 && pNode->mMeshes.empty() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user