Merge branch 'master' of https://github.com/assimp/assimp
commit
05524726c8
|
@ -332,6 +332,7 @@ struct Texture
|
|||
, mScaleV (1.0f)
|
||||
, mRotation (0.0f)
|
||||
, mMapMode (aiTextureMapMode_Wrap)
|
||||
, bPrivate()
|
||||
, iUVSrc (0)
|
||||
{
|
||||
mTextureBlend = get_qnan();
|
||||
|
@ -484,11 +485,11 @@ struct aiFloatKey
|
|||
struct Node
|
||||
{
|
||||
Node()
|
||||
|
||||
: mHierarchyPos (0)
|
||||
: mParent()
|
||||
, mInstanceNumber()
|
||||
, mHierarchyPos (0)
|
||||
, mHierarchyIndex (0)
|
||||
, mInstanceCount (1)
|
||||
|
||||
{
|
||||
static int iCnt = 0;
|
||||
|
||||
|
|
|
@ -103,6 +103,14 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
Discreet3DSImporter::Discreet3DSImporter()
|
||||
: stream(),
|
||||
mLastNodeIndex(),
|
||||
mCurrentNode(),
|
||||
mRootNode(),
|
||||
mScene(),
|
||||
mMasterScale(),
|
||||
bHasBG(),
|
||||
bIsPrj()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -129,6 +129,15 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
AC3DImporter::AC3DImporter()
|
||||
: buffer(),
|
||||
configSplitBFCull(),
|
||||
configEvalSubdivision(),
|
||||
mNumMeshes(),
|
||||
mLights(),
|
||||
lights(),
|
||||
groups(),
|
||||
polys(),
|
||||
worlds()
|
||||
{
|
||||
// nothing to be done here
|
||||
}
|
||||
|
|
|
@ -130,6 +130,7 @@ public:
|
|||
, surfaces()
|
||||
, numRefs (0)
|
||||
, subDiv (0)
|
||||
, crease()
|
||||
{}
|
||||
|
||||
// Type description
|
||||
|
|
|
@ -79,7 +79,11 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
ASEImporter::ASEImporter()
|
||||
: noSkeletonMesh()
|
||||
: mParser(),
|
||||
mBuffer(),
|
||||
pcScene(),
|
||||
configRecomputeNormals(),
|
||||
noSkeletonMesh()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -70,7 +70,10 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
BVHLoader::BVHLoader()
|
||||
: noSkeletonMesh()
|
||||
: mLine(),
|
||||
mAnimTickDuration(),
|
||||
mAnimNumFrames(),
|
||||
noSkeletonMesh()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -87,6 +87,8 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
IRRImporter::IRRImporter()
|
||||
: fps(),
|
||||
configSpeedFlag()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -166,7 +166,9 @@ private:
|
|||
Node(ET t)
|
||||
: type (t)
|
||||
, scaling (1.f,1.f,1.f) // assume uniform scaling by default
|
||||
, parent()
|
||||
, framesPerSecond (0.f)
|
||||
, id()
|
||||
, sphereRadius (1.f)
|
||||
, spherePolyCountX (100)
|
||||
, spherePolyCountY (100)
|
||||
|
|
|
@ -62,6 +62,10 @@ using namespace Assimp::LWO;
|
|||
AnimResolver::AnimResolver(std::list<Envelope>& _envelopes,double tick)
|
||||
: envelopes (_envelopes)
|
||||
, sample_rate (0.)
|
||||
, envl_x(), envl_y(), envl_z()
|
||||
, end_x(), end_y(), end_z()
|
||||
, flags()
|
||||
, sample_delta()
|
||||
{
|
||||
trans_x = trans_y = trans_z = NULL;
|
||||
rotat_x = rotat_y = rotat_z = NULL;
|
||||
|
|
|
@ -113,7 +113,10 @@ enum PrePostBehaviour
|
|||
struct Key
|
||||
{
|
||||
Key()
|
||||
: inter (IT_LINE)
|
||||
: time(),
|
||||
value(),
|
||||
inter (IT_LINE),
|
||||
params()
|
||||
{}
|
||||
|
||||
//! Current time
|
||||
|
@ -141,7 +144,8 @@ struct Key
|
|||
struct Envelope
|
||||
{
|
||||
Envelope()
|
||||
: type (EnvelopeType_Unknown)
|
||||
: index()
|
||||
, type (EnvelopeType_Unknown)
|
||||
, pre (PrePostBehaviour_Constant)
|
||||
, post (PrePostBehaviour_Constant)
|
||||
|
||||
|
|
|
@ -433,6 +433,7 @@ struct Texture
|
|||
Texture()
|
||||
: mClipIdx(UINT_MAX)
|
||||
, mStrength (1.0f)
|
||||
, type()
|
||||
, mUVChannelIndex ("unknown")
|
||||
, mRealUVIndex (UINT_MAX)
|
||||
, enabled (true)
|
||||
|
@ -499,6 +500,7 @@ struct Clip
|
|||
|
||||
Clip()
|
||||
: type (UNSUPPORTED)
|
||||
, clipRef()
|
||||
, idx (0)
|
||||
, negate (false)
|
||||
{}
|
||||
|
|
|
@ -77,6 +77,19 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
LWOImporter::LWOImporter()
|
||||
: mIsLWO2(),
|
||||
mIsLXOB(),
|
||||
mLayers(),
|
||||
mCurLayer(),
|
||||
mTags(),
|
||||
mMapping(),
|
||||
mSurfaces(),
|
||||
mFileBuffer(),
|
||||
fileSize(),
|
||||
pScene(),
|
||||
configSpeedFlag(),
|
||||
configLayerIndex(),
|
||||
hasNamedLayer()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -129,7 +129,12 @@ void LWS::Element::Parse (const char*& buffer)
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
LWSImporter::LWSImporter()
|
||||
: noSkeletonMesh()
|
||||
: configSpeedFlag(),
|
||||
io(),
|
||||
first(),
|
||||
last(),
|
||||
fps(),
|
||||
noSkeletonMesh()
|
||||
{
|
||||
// nothing to do here
|
||||
}
|
||||
|
|
|
@ -85,7 +85,9 @@ public:
|
|||
struct NodeDesc
|
||||
{
|
||||
NodeDesc()
|
||||
: number (0)
|
||||
: type()
|
||||
, id()
|
||||
, number (0)
|
||||
, parent (0)
|
||||
, name ("")
|
||||
, isPivotSet (false)
|
||||
|
@ -94,6 +96,7 @@ struct NodeDesc
|
|||
, lightType (0)
|
||||
, lightFalloffType (0)
|
||||
, lightConeAngle (45.f)
|
||||
, lightEdgeAngle()
|
||||
, parent_resolved (NULL)
|
||||
{}
|
||||
|
||||
|
|
|
@ -92,6 +92,10 @@ void MD2::LookupNormalIndex(uint8_t iNormalIndex,aiVector3D& vOut)
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MD2Importer::MD2Importer()
|
||||
: configFrameID(),
|
||||
m_pcHeader(),
|
||||
mBuffer(),
|
||||
fileSize()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -354,8 +354,14 @@ void Q3Shader::ConvertShaderToMaterial(aiMaterial* out, const ShaderDataBlock& s
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MD3Importer::MD3Importer()
|
||||
: configFrameID (0)
|
||||
, configHandleMP (true)
|
||||
: configFrameID (0)
|
||||
, configHandleMP (true)
|
||||
, configSpeedFlag()
|
||||
, pcHeader()
|
||||
, mBuffer()
|
||||
, fileSize()
|
||||
, mScene()
|
||||
, mIOHandler()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -82,8 +82,16 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MD5Importer::MD5Importer()
|
||||
: mBuffer()
|
||||
, configNoAutoLoad (false)
|
||||
: mIOHandler()
|
||||
, mBuffer()
|
||||
, fileSize()
|
||||
, iLineNumber()
|
||||
, pScene()
|
||||
, pIOHandler()
|
||||
, bHadMD5Mesh()
|
||||
, bHadMD5Anim()
|
||||
, bHadMD5Camera()
|
||||
, configNoAutoLoad (false)
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -117,6 +117,21 @@ struct Surface
|
|||
uint32_t ulOffsetFrameCompFrames ;
|
||||
uint32_t ulOffsetEnd;
|
||||
Surface()
|
||||
: ulIdent(),
|
||||
ulFlags(),
|
||||
ulNumCompFrames(),
|
||||
ulNumBaseFrames(),
|
||||
ulNumShaders(),
|
||||
ulNumVertices(),
|
||||
ulNumTriangles(),
|
||||
ulOffsetTriangles(),
|
||||
ulOffsetShaders(),
|
||||
ulOffsetTexCoords(),
|
||||
ulOffsetBaseVerts(),
|
||||
ulOffsetCompVerts(),
|
||||
ulOffsetFrameBaseFrames(),
|
||||
ulOffsetFrameCompFrames(),
|
||||
ulOffsetEnd()
|
||||
{
|
||||
ucName[AI_MDC_MAXQPATH-1] = '\0';
|
||||
}
|
||||
|
|
|
@ -95,6 +95,10 @@ void MDC::BuildVertex(const Frame& frame,
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MDCImporter::MDCImporter()
|
||||
: configFrameID(),
|
||||
pcHeader(),
|
||||
mBuffer(),
|
||||
fileSize()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -841,6 +841,9 @@ struct IntGroupInfo_MDL7
|
|||
IntGroupInfo_MDL7(BE_NCONST MDL::Group_MDL7* _pcGroup, unsigned int _iIndex)
|
||||
: iIndex(_iIndex)
|
||||
, pcGroup(_pcGroup)
|
||||
, pcGroupUVs()
|
||||
, pcGroupTris()
|
||||
, pcGroupVerts()
|
||||
{}
|
||||
|
||||
//! Index of the group
|
||||
|
@ -896,6 +899,8 @@ struct IntSharedData_MDL7
|
|||
{
|
||||
//! Default constructor
|
||||
IntSharedData_MDL7()
|
||||
: apcOutBones(),
|
||||
iNum()
|
||||
{
|
||||
abNeedMaterials.reserve(10);
|
||||
}
|
||||
|
@ -933,7 +938,7 @@ struct IntSplitGroupData_MDL7
|
|||
IntSplitGroupData_MDL7(IntSharedData_MDL7& _shared,
|
||||
std::vector<aiMesh*>& _avOutList)
|
||||
|
||||
: shared(_shared), avOutList(_avOutList)
|
||||
: aiSplit(), shared(_shared), avOutList(_avOutList)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -89,6 +89,12 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MDLImporter::MDLImporter()
|
||||
: configFrameID(),
|
||||
mBuffer(),
|
||||
iGSFileVersion(),
|
||||
pIOHandler(),
|
||||
pScene(),
|
||||
iFileSize()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -78,6 +78,7 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MS3DImporter::MS3DImporter()
|
||||
: mScene()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -417,6 +417,7 @@ void ObjFileParser::getFace(aiPrimitiveType type)
|
|||
{
|
||||
DefaultLogger::get()->error("Obj: Ignoring empty face");
|
||||
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
|
||||
delete pTexID;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace OpenGEX {
|
|||
} // Namespace openGEX
|
||||
} // Namespace Assimp
|
||||
|
||||
#endif ASSIMP_BUILD_NO_OPENGEX_IMPORTER
|
||||
#endif // ASSIMP_BUILD_NO_OPENGEX_IMPORTER
|
||||
|
||||
#endif // AI_OPENGEX_EXPORTER_H
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/scene.h>
|
||||
#include <assimp/ai_assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
static const aiImporterDesc desc = {
|
||||
|
@ -194,9 +193,9 @@ OpenGEXImporter::VertexContainer::VertexContainer()
|
|||
: m_numVerts( 0 )
|
||||
, m_vertices(NULL)
|
||||
, m_numNormals( 0 )
|
||||
, m_normals(NULL) {
|
||||
std::fill(&m_numUVComps[0], &m_numUVComps[AI_MAX_NUMBER_OF_TEXTURECOORDS], 0U);
|
||||
std::fill(&m_textureCoords[0], &m_textureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS], static_cast<aiVector3D *>(NULL));
|
||||
, m_normals(NULL)
|
||||
, m_numUVComps()
|
||||
, m_textureCoords() {
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
@ -228,13 +227,13 @@ OpenGEXImporter::OpenGEXImporter()
|
|||
, m_meshCache()
|
||||
, m_mesh2refMap()
|
||||
, m_ctx( NULL )
|
||||
, m_metrics()
|
||||
, m_currentNode( NULL )
|
||||
, m_currentMesh( NULL )
|
||||
, m_currentMaterial( NULL )
|
||||
, m_tokenType( Grammar::NoneType )
|
||||
, m_nodeStack()
|
||||
, m_unresolvedRefStack() {
|
||||
std::fill(&m_metrics[0], &m_metrics[MetricInfo::Max], MetricInfo());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -90,6 +90,8 @@ namespace
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
PLYImporter::PLYImporter()
|
||||
: mBuffer(),
|
||||
pcDOM()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -211,7 +211,10 @@ public:
|
|||
|
||||
//! Default constructor
|
||||
Property()
|
||||
: eType (EDT_Int), bIsList(false), eFirstType(EDT_UChar)
|
||||
: eType (EDT_Int),
|
||||
Semantic(),
|
||||
bIsList(false),
|
||||
eFirstType(EDT_UChar)
|
||||
{}
|
||||
|
||||
//! Data type of the property
|
||||
|
|
|
@ -75,6 +75,14 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
SMDImporter::SMDImporter()
|
||||
: configFrameID(),
|
||||
mBuffer(),
|
||||
pScene(),
|
||||
iFileSize(),
|
||||
iSmallestFrame(),
|
||||
dLengthOfAnim(),
|
||||
bHasUVs(),
|
||||
iLineNumber()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -694,7 +702,7 @@ void SMDImporter::ParseFile()
|
|||
{
|
||||
if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
|
||||
|
||||
// "version <n> \n", <n> should be 1 for hl and hl² SMD files
|
||||
// "version <n> \n", <n> should be 1 for hl and hl<EFBFBD> SMD files
|
||||
if (TokenMatch(szCurrent,"version",7))
|
||||
{
|
||||
if(!SkipSpaces(szCurrent,&szCurrent)) break;
|
||||
|
|
|
@ -126,6 +126,7 @@ struct Bone
|
|||
{
|
||||
//! Public default constructor
|
||||
Animation()
|
||||
: iFirstTimeKey()
|
||||
{
|
||||
asKeys.reserve(20);
|
||||
}
|
||||
|
|
|
@ -106,6 +106,9 @@ bool IsAsciiSTL(const char* buffer, unsigned int fileSize) {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
STLImporter::STLImporter()
|
||||
: mBuffer(),
|
||||
fileSize(),
|
||||
pScene()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -52,9 +52,10 @@ http://www.jalix.org/ressources/graphics/3DS/_unofficials/3ds-unofficial.txt */
|
|||
/** Helper structure representing a face with smoothing groups assigned */
|
||||
struct FaceWithSmoothingGroup
|
||||
{
|
||||
FaceWithSmoothingGroup() : iSmoothGroup(0)
|
||||
FaceWithSmoothingGroup()
|
||||
: mIndices(),
|
||||
iSmoothGroup(0)
|
||||
{
|
||||
// let the rest uninitialized for performance - in release builds.
|
||||
// in debug builds set all indices to a common magic value
|
||||
#ifdef ASSIMP_BUILD_DEBUG
|
||||
this->mIndices[0] = 0xffffffff;
|
||||
|
@ -65,7 +66,7 @@ struct FaceWithSmoothingGroup
|
|||
|
||||
|
||||
//! Indices. .3ds is using uint16. However, after
|
||||
//! an unique vrtex set has been generated,
|
||||
//! an unique vertex set has been generated,
|
||||
//! individual index values might exceed 2^16
|
||||
uint32_t mIndices[3];
|
||||
|
||||
|
|
|
@ -82,7 +82,9 @@ struct Triangle {
|
|||
// temporary representation for a material
|
||||
struct TempMat {
|
||||
TempMat()
|
||||
: numFaces (0)
|
||||
: type()
|
||||
, tex()
|
||||
, numFaces (0)
|
||||
{}
|
||||
|
||||
TempMat(const Triangle& in)
|
||||
|
|
|
@ -89,7 +89,11 @@ struct Material
|
|||
|
||||
size_t sceneIndex; ///< the index under which it was stored in the scene's material list
|
||||
|
||||
Material() { mIsReference = false; sceneIndex = SIZE_MAX; }
|
||||
Material()
|
||||
: mIsReference(false),
|
||||
mSpecularExponent(),
|
||||
sceneIndex(SIZE_MAX)
|
||||
{}
|
||||
};
|
||||
|
||||
/** Helper structure to represent a bone weight */
|
||||
|
|
|
@ -466,8 +466,9 @@ void XFileParser::ParseDataObjectMesh( Mesh* pMesh)
|
|||
for( unsigned int a = 0; a < numPosFaces; a++)
|
||||
{
|
||||
unsigned int numIndices = ReadInt();
|
||||
if( numIndices < 3)
|
||||
if( numIndices < 3) {
|
||||
ThrowException( boost::str( boost::format( "Invalid index count %1% for face %2%.") % numIndices % a));
|
||||
}
|
||||
|
||||
// read indices
|
||||
Face& face = pMesh->mPosFaces[a];
|
||||
|
|
|
@ -145,6 +145,7 @@ namespace AssimpView {
|
|||
|
||||
MeshHelper()
|
||||
:
|
||||
eShadingMode(),
|
||||
piVB( NULL ),
|
||||
piIB( NULL ),
|
||||
piVBNormals( NULL ),
|
||||
|
@ -158,6 +159,9 @@ namespace AssimpView {
|
|||
piOpacityTexture( NULL ),
|
||||
piShininessTexture( NULL ),
|
||||
piLightmapTexture( NULL ),
|
||||
fOpacity(),
|
||||
fShininess(),
|
||||
fSpecularStrength()
|
||||
twosided( false ),
|
||||
pvOriginalNormals( NULL )
|
||||
{}
|
||||
|
|
Loading…
Reference in New Issue