2008-06-22 10:09:26 +00:00
|
|
|
/*
|
|
|
|
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.
|
|
|
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
General
- Added format auto-detection to most loaders
- Simplified BaseImporter::CanRead() with some utility methods
- improved fast_atof -> no overruns anymore. Fuck you, irrlicht.
- added assimp_cmd tool to allow command line model processing. Mainly adebugging tool for internal purposes, but others might find it useful, too.
- vc8/vc9: revision number is now written to DLL version header
- mkutil: some batch scripts to simplify tagging & building of release versions
- some API cleanup
- fixing some doxygen markup (+now explicit use of @file <filename>)
- Icon for assimp_view and assimp_cmd
3DS
- Normal vectors are not anymore inverted in some cases
- Improved pivot handling
- Improved handling of x-flipped meshes
Collada
- fixed a minor bug (visual_scene element)
LWS
- WIP implementation. No animations yet, some bugs and crashes.
- Animation system remains disabled, WIP code
- many test files for LWS, but most of them test the anim support, which is, read above, currently disabled.
STL
- fixing a log warning which appears for every model
- added binary&ascii test spider, exported from truespace
MD3
- Cleaning up output tags for automatically joined player models.
IRR
- Fixing coordinate system issues.
- Instance handling improved.
- Some of the reported crashes not yet fixed.
PretransformVertices
- Numerous performance improvements.
- Added config option to preserve the hierarchy during the step.
RemoveRedundantMaterials
- Added config option to specify a list of materials which are kept in every case.
UNREAL
- Added support for the old unreal data format (*.a,*.d,*.uc)
- tested only with exports from Milkshape
- more Unreal stuff to come soon
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@356 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2009-03-05 22:32:13 +00:00
|
|
|
/** @file SMDLoader.h
|
|
|
|
* @brief Defintion of the Valve SMD file format
|
|
|
|
*/
|
2008-06-22 10:09:26 +00:00
|
|
|
|
|
|
|
#ifndef AI_SMDLOADER_H_INCLUDED
|
|
|
|
#define AI_SMDLOADER_H_INCLUDED
|
|
|
|
|
2008-08-08 18:21:43 +00:00
|
|
|
// internal headers
|
2008-06-22 10:09:26 +00:00
|
|
|
#include "BaseImporter.h"
|
|
|
|
#include "ParsingUtils.h"
|
|
|
|
|
2008-08-08 18:21:43 +00:00
|
|
|
// public Assimp headers
|
2008-06-22 10:09:26 +00:00
|
|
|
#include "../include/aiTypes.h"
|
|
|
|
#include "../include/aiTexture.h"
|
|
|
|
#include "../include/aiAnim.h"
|
|
|
|
#include "../include/aiMaterial.h"
|
|
|
|
struct aiNode;
|
|
|
|
|
2008-08-08 18:21:43 +00:00
|
|
|
// STL headers
|
2008-06-22 10:09:26 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace Assimp {
|
|
|
|
class MaterialHelper;
|
|
|
|
|
|
|
|
namespace SMD {
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
/** Data structure for a vertex in a SMD file
|
|
|
|
*/
|
|
|
|
struct Vertex
|
|
|
|
{
|
|
|
|
Vertex() : iParentNode(0xffffffff)
|
|
|
|
{}
|
|
|
|
|
|
|
|
//! Vertex position, normal and texture coordinate
|
|
|
|
aiVector3D pos,nor,uv;
|
|
|
|
|
|
|
|
//! Vertex parent node
|
|
|
|
unsigned int iParentNode;
|
|
|
|
|
|
|
|
//! Links to bones: pair.first is the bone index,
|
|
|
|
//! pair.second is the vertex weight.
|
|
|
|
//! WARN: The remaining weight (to reach 1.0f) is assigned
|
|
|
|
//! to the parent node/bone
|
|
|
|
std::vector<std::pair<unsigned int, float> > aiBoneLinks;
|
|
|
|
};
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
/** Data structure for a face in a SMD file
|
|
|
|
*/
|
|
|
|
struct Face
|
|
|
|
{
|
|
|
|
Face() : iTexture(0x0)
|
|
|
|
{}
|
|
|
|
|
|
|
|
//! Texture index for the face
|
|
|
|
unsigned int iTexture;
|
|
|
|
|
|
|
|
//! The three vertices of the face
|
|
|
|
Vertex avVertices[3];
|
|
|
|
};
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
/** Data structure for a bone in a SMD file
|
|
|
|
*/
|
|
|
|
struct Bone
|
|
|
|
{
|
|
|
|
//! Default constructor
|
|
|
|
Bone() : iParent(0xffffffff), bIsUsed(false)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//! Destructor
|
|
|
|
~Bone()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//! Name of the bone
|
|
|
|
std::string mName;
|
|
|
|
|
|
|
|
//! Parent of the bone
|
|
|
|
uint32_t iParent;
|
|
|
|
|
|
|
|
//! Animation of the bone
|
|
|
|
struct Animation
|
|
|
|
{
|
|
|
|
//! Public default constructor
|
|
|
|
Animation()
|
|
|
|
{
|
|
|
|
asKeys.reserve(20);
|
|
|
|
}
|
|
|
|
|
|
|
|
//! Data structure for a matrix key
|
|
|
|
struct MatrixKey
|
|
|
|
{
|
|
|
|
//! Matrix at this time
|
|
|
|
aiMatrix4x4 matrix;
|
|
|
|
|
|
|
|
//! Absolute transformation matrix
|
|
|
|
aiMatrix4x4 matrixAbsolute;
|
|
|
|
|
|
|
|
//! Position
|
|
|
|
aiVector3D vPos;
|
|
|
|
|
|
|
|
//! Rotation (euler angles)
|
|
|
|
aiVector3D vRot;
|
|
|
|
|
|
|
|
//! Current time. may be negative, this
|
|
|
|
//! will be fixed later
|
|
|
|
double dTime;
|
|
|
|
};
|
|
|
|
|
|
|
|
//! Index of the key with the smallest time value
|
|
|
|
uint32_t iFirstTimeKey;
|
|
|
|
|
|
|
|
//! Array of matrix keys
|
|
|
|
std::vector<MatrixKey> asKeys;
|
|
|
|
|
|
|
|
} sAnim;
|
|
|
|
|
|
|
|
//! Offset matrix of the bone
|
|
|
|
aiMatrix4x4 mOffsetMatrix;
|
|
|
|
|
|
|
|
//! true if the bone is referenced by at least one mesh
|
|
|
|
bool bIsUsed;
|
|
|
|
};
|
|
|
|
|
2008-08-17 15:04:10 +00:00
|
|
|
} //! namespace SMD
|
2008-06-22 10:09:26 +00:00
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
/** Used to load Half-life 1 and 2 SMD models
|
|
|
|
*/
|
|
|
|
class SMDImporter : public BaseImporter
|
|
|
|
{
|
|
|
|
friend class Importer;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
/** Constructor to be privately used by Importer */
|
|
|
|
SMDImporter();
|
|
|
|
|
|
|
|
/** Destructor, private as well */
|
|
|
|
~SMDImporter();
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Returns whether the class can handle the format of the given file.
|
General
- Added format auto-detection to most loaders
- Simplified BaseImporter::CanRead() with some utility methods
- improved fast_atof -> no overruns anymore. Fuck you, irrlicht.
- added assimp_cmd tool to allow command line model processing. Mainly adebugging tool for internal purposes, but others might find it useful, too.
- vc8/vc9: revision number is now written to DLL version header
- mkutil: some batch scripts to simplify tagging & building of release versions
- some API cleanup
- fixing some doxygen markup (+now explicit use of @file <filename>)
- Icon for assimp_view and assimp_cmd
3DS
- Normal vectors are not anymore inverted in some cases
- Improved pivot handling
- Improved handling of x-flipped meshes
Collada
- fixed a minor bug (visual_scene element)
LWS
- WIP implementation. No animations yet, some bugs and crashes.
- Animation system remains disabled, WIP code
- many test files for LWS, but most of them test the anim support, which is, read above, currently disabled.
STL
- fixing a log warning which appears for every model
- added binary&ascii test spider, exported from truespace
MD3
- Cleaning up output tags for automatically joined player models.
IRR
- Fixing coordinate system issues.
- Instance handling improved.
- Some of the reported crashes not yet fixed.
PretransformVertices
- Numerous performance improvements.
- Added config option to preserve the hierarchy during the step.
RemoveRedundantMaterials
- Added config option to specify a list of materials which are kept in every case.
UNREAL
- Added support for the old unreal data format (*.a,*.d,*.uc)
- tested only with exports from Milkshape
- more Unreal stuff to come soon
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@356 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2009-03-05 22:32:13 +00:00
|
|
|
* See BaseImporter::CanRead() for details.
|
|
|
|
*/
|
|
|
|
bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
|
|
|
|
bool checkSig) const;
|
2008-06-22 10:09:26 +00:00
|
|
|
|
2008-08-08 18:34:14 +00:00
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Called prior to ReadFile().
|
General
- Added format auto-detection to most loaders
- Simplified BaseImporter::CanRead() with some utility methods
- improved fast_atof -> no overruns anymore. Fuck you, irrlicht.
- added assimp_cmd tool to allow command line model processing. Mainly adebugging tool for internal purposes, but others might find it useful, too.
- vc8/vc9: revision number is now written to DLL version header
- mkutil: some batch scripts to simplify tagging & building of release versions
- some API cleanup
- fixing some doxygen markup (+now explicit use of @file <filename>)
- Icon for assimp_view and assimp_cmd
3DS
- Normal vectors are not anymore inverted in some cases
- Improved pivot handling
- Improved handling of x-flipped meshes
Collada
- fixed a minor bug (visual_scene element)
LWS
- WIP implementation. No animations yet, some bugs and crashes.
- Animation system remains disabled, WIP code
- many test files for LWS, but most of them test the anim support, which is, read above, currently disabled.
STL
- fixing a log warning which appears for every model
- added binary&ascii test spider, exported from truespace
MD3
- Cleaning up output tags for automatically joined player models.
IRR
- Fixing coordinate system issues.
- Instance handling improved.
- Some of the reported crashes not yet fixed.
PretransformVertices
- Numerous performance improvements.
- Added config option to preserve the hierarchy during the step.
RemoveRedundantMaterials
- Added config option to specify a list of materials which are kept in every case.
UNREAL
- Added support for the old unreal data format (*.a,*.d,*.uc)
- tested only with exports from Milkshape
- more Unreal stuff to come soon
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@356 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2009-03-05 22:32:13 +00:00
|
|
|
* The function is a request to the importer to update its configuration
|
|
|
|
* basing on the Importer's configuration property list.
|
|
|
|
*/
|
2008-08-08 18:34:14 +00:00
|
|
|
void SetupProperties(const Importer* pImp);
|
|
|
|
|
2008-06-22 10:09:26 +00:00
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Called by Importer::GetExtensionList() for each loaded importer.
|
|
|
|
* See BaseImporter::GetExtensionList() for details
|
|
|
|
*/
|
General
- Added format auto-detection to most loaders
- Simplified BaseImporter::CanRead() with some utility methods
- improved fast_atof -> no overruns anymore. Fuck you, irrlicht.
- added assimp_cmd tool to allow command line model processing. Mainly adebugging tool for internal purposes, but others might find it useful, too.
- vc8/vc9: revision number is now written to DLL version header
- mkutil: some batch scripts to simplify tagging & building of release versions
- some API cleanup
- fixing some doxygen markup (+now explicit use of @file <filename>)
- Icon for assimp_view and assimp_cmd
3DS
- Normal vectors are not anymore inverted in some cases
- Improved pivot handling
- Improved handling of x-flipped meshes
Collada
- fixed a minor bug (visual_scene element)
LWS
- WIP implementation. No animations yet, some bugs and crashes.
- Animation system remains disabled, WIP code
- many test files for LWS, but most of them test the anim support, which is, read above, currently disabled.
STL
- fixing a log warning which appears for every model
- added binary&ascii test spider, exported from truespace
MD3
- Cleaning up output tags for automatically joined player models.
IRR
- Fixing coordinate system issues.
- Instance handling improved.
- Some of the reported crashes not yet fixed.
PretransformVertices
- Numerous performance improvements.
- Added config option to preserve the hierarchy during the step.
RemoveRedundantMaterials
- Added config option to specify a list of materials which are kept in every case.
UNREAL
- Added support for the old unreal data format (*.a,*.d,*.uc)
- tested only with exports from Milkshape
- more Unreal stuff to come soon
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@356 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2009-03-05 22:32:13 +00:00
|
|
|
void GetExtensionList(std::string& append);
|
2008-06-22 10:09:26 +00:00
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Imports the given file into the given scene structure.
|
|
|
|
* See BaseImporter::InternReadFile() for details
|
|
|
|
*/
|
|
|
|
void InternReadFile( const std::string& pFile, aiScene* pScene,
|
|
|
|
IOSystem* pIOHandler);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse the SMD file and create the output scene
|
|
|
|
*/
|
|
|
|
void ParseFile();
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse the triangles section of the SMD file
|
|
|
|
* \param szCurrent Current position in the file. Points to the first
|
|
|
|
* data line of the section.
|
|
|
|
* \param szCurrentOut Receives a pointer to the heading line of
|
|
|
|
* the next section (or to EOF)
|
|
|
|
*/
|
|
|
|
void ParseTrianglesSection(const char* szCurrent,
|
|
|
|
const char** szCurrentOut);
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse the vertex animation section in VTA files
|
|
|
|
* \param szCurrent Current position in the file. Points to the first
|
|
|
|
* data line of the section.
|
|
|
|
* \param szCurrentOut Receives a pointer to the heading line of
|
|
|
|
* the next section (or to EOF)
|
|
|
|
*/
|
|
|
|
void ParseVASection(const char* szCurrent,
|
|
|
|
const char** szCurrentOut);
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse the nodes section of the SMD file
|
|
|
|
* \param szCurrent Current position in the file. Points to the first
|
|
|
|
* data line of the section.
|
|
|
|
* \param szCurrentOut Receives a pointer to the heading line of
|
|
|
|
* the next section (or to EOF)
|
|
|
|
*/
|
|
|
|
void ParseNodesSection(const char* szCurrent,
|
|
|
|
const char** szCurrentOut);
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse the skeleton section of the SMD file
|
|
|
|
* \param szCurrent Current position in the file. Points to the first
|
|
|
|
* data line of the section.
|
|
|
|
* \param szCurrentOut Receives a pointer to the heading line of
|
|
|
|
* the next section (or to EOF)
|
|
|
|
*/
|
|
|
|
void ParseSkeletonSection(const char* szCurrent,
|
|
|
|
const char** szCurrentOut);
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse a single triangle in the SMD file
|
|
|
|
* \param szCurrent Current position in the file. Points to the first
|
|
|
|
* data line of the section.
|
|
|
|
* \param szCurrentOut Receives the output cursor position
|
|
|
|
*/
|
|
|
|
void ParseTriangle(const char* szCurrent,
|
|
|
|
const char** szCurrentOut);
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse a single vertex in the SMD file
|
|
|
|
* \param szCurrent Current position in the file. Points to the first
|
|
|
|
* data line of the section.
|
|
|
|
* \param szCurrentOut Receives the output cursor position
|
|
|
|
* \param vertex Vertex to be filled
|
|
|
|
*/
|
|
|
|
void ParseVertex(const char* szCurrent,
|
|
|
|
const char** szCurrentOut, SMD::Vertex& vertex,
|
|
|
|
bool bVASection = false);
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Get the index of a texture. If the texture was not yet known
|
|
|
|
* it will be added to the internal texture list.
|
|
|
|
* \param filename Name of the texture
|
|
|
|
* \return Value texture index
|
|
|
|
*/
|
|
|
|
unsigned int GetTextureIndex(const std::string& filename);
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Computes absolute bone transformations
|
|
|
|
* All output transformations are in worldspace.
|
|
|
|
*/
|
|
|
|
void ComputeAbsoluteBoneTransformations();
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse a line in the skeleton section
|
|
|
|
*/
|
|
|
|
void ParseSkeletonElement(const char* szCurrent,
|
|
|
|
const char** szCurrentOut,int iTime);
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse a line in the nodes section
|
|
|
|
*/
|
|
|
|
void ParseNodeInfo(const char* szCurrent,
|
|
|
|
const char** szCurrentOut);
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse a floating-point value
|
|
|
|
*/
|
|
|
|
bool ParseFloat(const char* szCurrent,
|
|
|
|
const char** szCurrentOut, float& out);
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse an unsigned integer. There may be no sign!
|
|
|
|
*/
|
|
|
|
bool ParseUnsignedInt(const char* szCurrent,
|
2008-10-13 16:45:48 +00:00
|
|
|
const char** szCurrentOut, unsigned int& out);
|
2008-06-22 10:09:26 +00:00
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Parse a signed integer. Signs (+,-) are handled.
|
|
|
|
*/
|
|
|
|
bool ParseSignedInt(const char* szCurrent,
|
2008-10-13 16:45:48 +00:00
|
|
|
const char** szCurrentOut, int& out);
|
2008-06-22 10:09:26 +00:00
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Fix invalid time values in the file
|
|
|
|
*/
|
|
|
|
void FixTimeValues();
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Add all children of a bone as subnodes to a node
|
|
|
|
* \param pcNode Parent node
|
|
|
|
* \param iParent Parent bone index
|
|
|
|
*/
|
|
|
|
void AddBoneChildren(aiNode* pcNode, uint32_t iParent);
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Build output meshes/materials/nodes/animations
|
|
|
|
*/
|
|
|
|
void CreateOutputMeshes();
|
|
|
|
void CreateOutputNodes();
|
|
|
|
void CreateOutputAnimations();
|
|
|
|
void CreateOutputMaterials();
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
/** Print a log message together with the current line number
|
|
|
|
*/
|
|
|
|
void LogErrorNoThrow(const char* msg);
|
|
|
|
void LogWarning(const char* msg);
|
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
inline bool SkipLine( const char* in, const char** out)
|
|
|
|
{
|
2009-02-13 22:03:57 +00:00
|
|
|
Assimp::SkipLine(in,out);
|
2008-06-22 10:09:26 +00:00
|
|
|
++iLineNumber;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
// -------------------------------------------------------------------
|
2008-07-10 16:49:01 +00:00
|
|
|
inline bool SkipSpacesAndLineEnd( const char* in, const char** out)
|
2008-06-22 10:09:26 +00:00
|
|
|
{
|
|
|
|
++iLineNumber;
|
2009-02-13 22:03:57 +00:00
|
|
|
return Assimp::SkipSpacesAndLineEnd(in,out);
|
2008-06-22 10:09:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2008-08-08 18:21:43 +00:00
|
|
|
/** Configuration option: frame to be loaded */
|
|
|
|
unsigned int configFrameID;
|
|
|
|
|
2008-06-22 10:09:26 +00:00
|
|
|
/** Buffer to hold the loaded file */
|
2008-10-13 16:45:48 +00:00
|
|
|
const char* mBuffer;
|
2008-06-22 10:09:26 +00:00
|
|
|
|
|
|
|
/** Output scene to be filled
|
|
|
|
*/
|
|
|
|
aiScene* pScene;
|
|
|
|
|
|
|
|
/** Size of the input file in bytes
|
|
|
|
*/
|
|
|
|
unsigned int iFileSize;
|
|
|
|
|
|
|
|
/** Array of textures found in the file
|
|
|
|
*/
|
|
|
|
std::vector<std::string> aszTextures;
|
|
|
|
|
|
|
|
/** Array of triangles found in the file
|
|
|
|
*/
|
|
|
|
std::vector<SMD::Face> asTriangles;
|
|
|
|
|
|
|
|
/** Array of bones found in the file
|
|
|
|
*/
|
|
|
|
std::vector<SMD::Bone> asBones;
|
|
|
|
|
|
|
|
/** Smallest frame index found in the skeleton
|
|
|
|
*/
|
|
|
|
int iSmallestFrame;
|
|
|
|
|
|
|
|
/** Length of the whole animation, in frames
|
|
|
|
*/
|
|
|
|
double dLengthOfAnim;
|
|
|
|
|
|
|
|
/** Do we have texture coordinates?
|
|
|
|
*/
|
|
|
|
bool bHasUVs;
|
|
|
|
|
|
|
|
/** Current line numer
|
|
|
|
*/
|
|
|
|
unsigned int iLineNumber;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2008-08-17 15:04:10 +00:00
|
|
|
} // end of namespace Assimp
|
|
|
|
|
|
|
|
#endif // AI_SMDIMPORTER_H_INC
|