vrshoot

diff libs/assimp/3DSHelper.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/assimp/3DSHelper.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,577 @@
     1.4 +/*
     1.5 +Open Asset Import Library (assimp)
     1.6 +----------------------------------------------------------------------
     1.7 +
     1.8 +Copyright (c) 2006-2012, assimp team
     1.9 +All rights reserved.
    1.10 +
    1.11 +Redistribution and use of this software in source and binary forms, 
    1.12 +with or without modification, are permitted provided that the 
    1.13 +following conditions are met:
    1.14 +
    1.15 +* Redistributions of source code must retain the above
    1.16 +  copyright notice, this list of conditions and the
    1.17 +  following disclaimer.
    1.18 +
    1.19 +* Redistributions in binary form must reproduce the above
    1.20 +  copyright notice, this list of conditions and the
    1.21 +  following disclaimer in the documentation and/or other
    1.22 +  materials provided with the distribution.
    1.23 +
    1.24 +* Neither the name of the assimp team, nor the names of its
    1.25 +  contributors may be used to endorse or promote products
    1.26 +  derived from this software without specific prior
    1.27 +  written permission of the assimp team.
    1.28 +
    1.29 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    1.30 +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    1.31 +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    1.32 +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
    1.33 +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.34 +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
    1.35 +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    1.36 +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
    1.37 +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    1.38 +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
    1.39 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    1.40 +
    1.41 +----------------------------------------------------------------------
    1.42 +*/
    1.43 +
    1.44 +/** @file Defines helper data structures for the import of 3DS files */
    1.45 +
    1.46 +#ifndef AI_3DSFILEHELPER_H_INC
    1.47 +#define AI_3DSFILEHELPER_H_INC
    1.48 +
    1.49 +
    1.50 +#include "SpatialSort.h"
    1.51 +#include "SmoothingGroups.h"
    1.52 +
    1.53 +namespace Assimp	{
    1.54 +namespace D3DS	{
    1.55 +
    1.56 +#include "assimp/Compiler/pushpack1.h"
    1.57 +
    1.58 +// ---------------------------------------------------------------------------
    1.59 +/** Discreet3DS class: Helper class for loading 3ds files. Defines chunks
    1.60 +*  and data structures.
    1.61 +*/
    1.62 +class Discreet3DS
    1.63 +{
    1.64 +private:
    1.65 +	inline Discreet3DS() {}
    1.66 +
    1.67 +public:
    1.68 +
    1.69 +	//! data structure for a single chunk in a .3ds file
    1.70 +	struct Chunk
    1.71 +	{
    1.72 +		uint16_t	Flag;
    1.73 +		uint32_t	Size;
    1.74 +	} PACK_STRUCT;
    1.75 +
    1.76 +
    1.77 +	//! Used for shading field in material3ds structure
    1.78 +	//! From AutoDesk 3ds SDK
    1.79 +	typedef enum
    1.80 +	{
    1.81 +		// translated to gouraud shading with wireframe active
    1.82 +		Wire = 0x0,
    1.83 +
    1.84 +		// if this material is set, no vertex normals will
    1.85 +		// be calculated for the model. Face normals + gouraud
    1.86 +		Flat = 0x1,
    1.87 +
    1.88 +		// standard gouraud shading
    1.89 +		Gouraud = 0x2,
    1.90 +
    1.91 +		// phong shading
    1.92 +		Phong = 0x3,
    1.93 +
    1.94 +		// cooktorrance or anistropic phong shading ...
    1.95 +		// the exact meaning is unknown, if you know it
    1.96 +		// feel free to tell me ;-)
    1.97 +		Metal = 0x4,
    1.98 +
    1.99 +		// required by the ASE loader
   1.100 +		Blinn = 0x5
   1.101 +	} shadetype3ds;
   1.102 +
   1.103 +	// Flags for animated keys
   1.104 +	enum
   1.105 +	{
   1.106 +		KEY_USE_TENS         = 0x1,
   1.107 +		KEY_USE_CONT         = 0x2,
   1.108 +		KEY_USE_BIAS         = 0x4,
   1.109 +		KEY_USE_EASE_TO      = 0x8,
   1.110 +		KEY_USE_EASE_FROM    = 0x10
   1.111 +	} ;
   1.112 +
   1.113 +	enum 
   1.114 +	{
   1.115 +
   1.116 +		// ********************************************************************
   1.117 +		// Basic chunks which can be found everywhere in the file
   1.118 +		CHUNK_VERSION	= 0x0002,
   1.119 +		CHUNK_RGBF      = 0x0010,		// float4 R; float4 G; float4 B
   1.120 +		CHUNK_RGBB      = 0x0011,		// int1 R; int1 G; int B
   1.121 +
   1.122 +		// Linear color values (gamma = 2.2?)
   1.123 +		CHUNK_LINRGBF      = 0x0013,	// float4 R; float4 G; float4 B
   1.124 +		CHUNK_LINRGBB      = 0x0012,	// int1 R; int1 G; int B
   1.125 +
   1.126 +		CHUNK_PERCENTW	= 0x0030,		// int2   percentage
   1.127 +		CHUNK_PERCENTF	= 0x0031,		// float4  percentage
   1.128 +		// ********************************************************************
   1.129 +
   1.130 +		// Prj master chunk
   1.131 +		CHUNK_PRJ       = 0xC23D,
   1.132 +
   1.133 +		// MDLI master chunk
   1.134 +		CHUNK_MLI       = 0x3DAA,
   1.135 +
   1.136 +		// Primary main chunk of the .3ds file
   1.137 +		CHUNK_MAIN      = 0x4D4D,
   1.138 +
   1.139 +		// Mesh main chunk
   1.140 +		CHUNK_OBJMESH   = 0x3D3D,
   1.141 +
   1.142 +		// Specifies the background color of the .3ds file
   1.143 +		// This is passed through the material system for
   1.144 +		// viewing purposes.
   1.145 +		CHUNK_BKGCOLOR  = 0x1200,
   1.146 +
   1.147 +		// Specifies the ambient base color of the scene.
   1.148 +		// This is added to all materials in the file
   1.149 +		CHUNK_AMBCOLOR  = 0x2100,
   1.150 +
   1.151 +		// Specifies the background image for the whole scene
   1.152 +		// This value is passed through the material system
   1.153 +		// to the viewer 
   1.154 +		CHUNK_BIT_MAP   = 0x1100,
   1.155 +		CHUNK_BIT_MAP_EXISTS  = 0x1101,
   1.156 +
   1.157 +		// ********************************************************************
   1.158 +		// Viewport related stuff. Ignored
   1.159 +		CHUNK_DEFAULT_VIEW = 0x3000,
   1.160 +		CHUNK_VIEW_TOP = 0x3010,
   1.161 +		CHUNK_VIEW_BOTTOM = 0x3020,
   1.162 +		CHUNK_VIEW_LEFT = 0x3030,
   1.163 +		CHUNK_VIEW_RIGHT = 0x3040,
   1.164 +		CHUNK_VIEW_FRONT = 0x3050,
   1.165 +		CHUNK_VIEW_BACK = 0x3060,
   1.166 +		CHUNK_VIEW_USER = 0x3070,
   1.167 +		CHUNK_VIEW_CAMERA = 0x3080,
   1.168 +		// ********************************************************************
   1.169 +
   1.170 +		// Mesh chunks
   1.171 +		CHUNK_OBJBLOCK  = 0x4000,
   1.172 +		CHUNK_TRIMESH   = 0x4100,
   1.173 +		CHUNK_VERTLIST  = 0x4110,
   1.174 +		CHUNK_VERTFLAGS = 0x4111,
   1.175 +		CHUNK_FACELIST  = 0x4120,
   1.176 +		CHUNK_FACEMAT   = 0x4130,
   1.177 +		CHUNK_MAPLIST   = 0x4140,
   1.178 +		CHUNK_SMOOLIST  = 0x4150,
   1.179 +		CHUNK_TRMATRIX  = 0x4160,
   1.180 +		CHUNK_MESHCOLOR = 0x4165,
   1.181 +		CHUNK_TXTINFO   = 0x4170,
   1.182 +		CHUNK_LIGHT     = 0x4600,
   1.183 +		CHUNK_CAMERA    = 0x4700,
   1.184 +		CHUNK_HIERARCHY = 0x4F00,
   1.185 +
   1.186 +		// Specifies the global scaling factor. This is applied
   1.187 +		// to the root node's transformation matrix
   1.188 +		CHUNK_MASTER_SCALE    = 0x0100,
   1.189 +
   1.190 +		// ********************************************************************
   1.191 +		// Material chunks
   1.192 +		CHUNK_MAT_MATERIAL  = 0xAFFF,
   1.193 +
   1.194 +			// asciiz containing the name of the material
   1.195 +			CHUNK_MAT_MATNAME   = 0xA000, 
   1.196 +			CHUNK_MAT_AMBIENT   = 0xA010, // followed by color chunk
   1.197 +			CHUNK_MAT_DIFFUSE   = 0xA020, // followed by color chunk
   1.198 +			CHUNK_MAT_SPECULAR  = 0xA030, // followed by color chunk
   1.199 +
   1.200 +			// Specifies the shininess of the material
   1.201 +			// followed by percentage chunk
   1.202 +			CHUNK_MAT_SHININESS  = 0xA040, 
   1.203 +			CHUNK_MAT_SHININESS_PERCENT  = 0xA041 ,
   1.204 +
   1.205 +			// Specifies the shading mode to be used
   1.206 +			// followed by a short
   1.207 +			CHUNK_MAT_SHADING  = 0xA100, 
   1.208 +
   1.209 +			// NOTE: Emissive color (self illumination) seems not
   1.210 +			// to be a color but a single value, type is unknown.
   1.211 +			// Make the parser accept both of them.
   1.212 +			// followed by percentage chunk (?)
   1.213 +			CHUNK_MAT_SELF_ILLUM = 0xA080,  
   1.214 +
   1.215 +			// Always followed by percentage chunk	(?)
   1.216 +			CHUNK_MAT_SELF_ILPCT = 0xA084,  
   1.217 +
   1.218 +			// Always followed by percentage chunk
   1.219 +			CHUNK_MAT_TRANSPARENCY = 0xA050, 
   1.220 +
   1.221 +			// Diffuse texture channel 0 
   1.222 +			CHUNK_MAT_TEXTURE   = 0xA200,
   1.223 +
   1.224 +			// Contains opacity information for each texel
   1.225 +			CHUNK_MAT_OPACMAP = 0xA210,
   1.226 +
   1.227 +			// Contains a reflection map to be used to reflect
   1.228 +			// the environment. This is partially supported.
   1.229 +			CHUNK_MAT_REFLMAP = 0xA220,
   1.230 +
   1.231 +			// Self Illumination map (emissive colors)
   1.232 +			CHUNK_MAT_SELFIMAP = 0xA33d,	
   1.233 +
   1.234 +			// Bumpmap. Not specified whether it is a heightmap
   1.235 +			// or a normal map. Assme it is a heightmap since
   1.236 +			// artist normally prefer this format.
   1.237 +			CHUNK_MAT_BUMPMAP = 0xA230,
   1.238 +
   1.239 +			// Specular map. Seems to influence the specular color
   1.240 +			CHUNK_MAT_SPECMAP = 0xA204,
   1.241 +
   1.242 +			// Holds shininess data. 
   1.243 +			CHUNK_MAT_MAT_SHINMAP = 0xA33C,
   1.244 +
   1.245 +			// Scaling in U/V direction.
   1.246 +			// (need to gen separate UV coordinate set 
   1.247 +			// and do this by hand)
   1.248 +			CHUNK_MAT_MAP_USCALE 	  = 0xA354,
   1.249 +			CHUNK_MAT_MAP_VSCALE 	  = 0xA356,
   1.250 +
   1.251 +			// Translation in U/V direction.
   1.252 +			// (need to gen separate UV coordinate set 
   1.253 +			// and do this by hand)
   1.254 +			CHUNK_MAT_MAP_UOFFSET 	  = 0xA358,
   1.255 +			CHUNK_MAT_MAP_VOFFSET 	  = 0xA35a,
   1.256 +
   1.257 +			// UV-coordinates rotation around the z-axis
   1.258 +			// Assumed to be in radians.
   1.259 +			CHUNK_MAT_MAP_ANG = 0xA35C,
   1.260 +
   1.261 +			// Tiling flags for 3DS files
   1.262 +			CHUNK_MAT_MAP_TILING = 0xa351,
   1.263 +
   1.264 +			// Specifies the file name of a texture
   1.265 +			CHUNK_MAPFILE   = 0xA300,
   1.266 +
   1.267 +			// Specifies whether a materail requires two-sided rendering
   1.268 +			CHUNK_MAT_TWO_SIDE = 0xA081,  
   1.269 +		// ********************************************************************
   1.270 +
   1.271 +		// Main keyframer chunk. Contains translation/rotation/scaling data
   1.272 +		CHUNK_KEYFRAMER		= 0xB000,
   1.273 +
   1.274 +		// Supported sub chunks
   1.275 +		CHUNK_TRACKINFO		= 0xB002,
   1.276 +		CHUNK_TRACKOBJNAME  = 0xB010,
   1.277 +		CHUNK_TRACKDUMMYOBJNAME  = 0xB011,
   1.278 +		CHUNK_TRACKPIVOT    = 0xB013,
   1.279 +		CHUNK_TRACKPOS      = 0xB020,
   1.280 +		CHUNK_TRACKROTATE   = 0xB021,
   1.281 +		CHUNK_TRACKSCALE    = 0xB022,
   1.282 +
   1.283 +		// ********************************************************************
   1.284 +		// Keyframes for various other stuff in the file
   1.285 +		// Partially ignored
   1.286 +		CHUNK_AMBIENTKEY    = 0xB001,
   1.287 +		CHUNK_TRACKMORPH    = 0xB026,
   1.288 +		CHUNK_TRACKHIDE     = 0xB029,
   1.289 +		CHUNK_OBJNUMBER     = 0xB030,
   1.290 +		CHUNK_TRACKCAMERA	= 0xB003,
   1.291 +		CHUNK_TRACKFOV		= 0xB023,
   1.292 +		CHUNK_TRACKROLL		= 0xB024,
   1.293 +		CHUNK_TRACKCAMTGT	= 0xB004,
   1.294 +		CHUNK_TRACKLIGHT	= 0xB005,
   1.295 +		CHUNK_TRACKLIGTGT	= 0xB006,
   1.296 +		CHUNK_TRACKSPOTL	= 0xB007,
   1.297 +		CHUNK_FRAMES		= 0xB008,
   1.298 +		// ********************************************************************
   1.299 +
   1.300 +		// light sub-chunks
   1.301 +		CHUNK_DL_OFF                 = 0x4620,
   1.302 +		CHUNK_DL_OUTER_RANGE         = 0x465A,
   1.303 +		CHUNK_DL_INNER_RANGE         = 0x4659,
   1.304 +		CHUNK_DL_MULTIPLIER          = 0x465B,
   1.305 +		CHUNK_DL_EXCLUDE             = 0x4654,
   1.306 +		CHUNK_DL_ATTENUATE           = 0x4625,
   1.307 +		CHUNK_DL_SPOTLIGHT           = 0x4610,
   1.308 +
   1.309 +		// camera sub-chunks
   1.310 +		CHUNK_CAM_RANGES             = 0x4720
   1.311 +	};
   1.312 +};
   1.313 +
   1.314 +// ---------------------------------------------------------------------------
   1.315 +/** Helper structure representing a 3ds mesh face */
   1.316 +struct Face : public FaceWithSmoothingGroup
   1.317 +{
   1.318 +};
   1.319 +
   1.320 +// ---------------------------------------------------------------------------
   1.321 +/** Helper structure representing a texture */
   1.322 +struct Texture
   1.323 +{
   1.324 +	//! Default constructor
   1.325 +	Texture()
   1.326 +		: mOffsetU	(0.0f)
   1.327 +		, mOffsetV	(0.0f)
   1.328 +		, mScaleU	(1.0f)
   1.329 +		, mScaleV	(1.0f)
   1.330 +		, mRotation	(0.0f)
   1.331 +		, mMapMode	(aiTextureMapMode_Wrap)
   1.332 +		, iUVSrc	(0)
   1.333 +	{
   1.334 +		mTextureBlend = get_qnan();
   1.335 +	}
   1.336 +
   1.337 +	//! Specifies the blend factor for the texture
   1.338 +	float mTextureBlend;
   1.339 +
   1.340 +	//! Specifies the filename of the texture
   1.341 +	std::string mMapName;
   1.342 +
   1.343 +	//! Specifies texture coordinate offsets/scaling/rotations
   1.344 +	float mOffsetU;
   1.345 +	float mOffsetV;
   1.346 +	float mScaleU;
   1.347 +	float mScaleV;
   1.348 +	float mRotation;
   1.349 +
   1.350 +	//! Specifies the mapping mode to be used for the texture
   1.351 +	aiTextureMapMode mMapMode;
   1.352 +
   1.353 +	//! Used internally
   1.354 +	bool bPrivate;
   1.355 +	int iUVSrc;
   1.356 +};
   1.357 +
   1.358 +#include "assimp/Compiler/poppack1.h"
   1.359 +
   1.360 +// ---------------------------------------------------------------------------
   1.361 +/** Helper structure representing a 3ds material */
   1.362 +struct Material
   1.363 +{
   1.364 +	//! Default constructor. Builds a default name for the material
   1.365 +	Material()
   1.366 +		: 
   1.367 +	mDiffuse			(0.6f,0.6f,0.6f), // FIX ... we won't want object to be black
   1.368 +	mSpecularExponent	(0.0f),
   1.369 +	mShininessStrength	(1.0f),
   1.370 +	mShading(Discreet3DS::Gouraud),
   1.371 +	mTransparency		(1.0f),
   1.372 +	mBumpHeight			(1.0f),
   1.373 +	mTwoSided			(false)
   1.374 +	{
   1.375 +		static int iCnt = 0;
   1.376 +		
   1.377 +		char szTemp[128];
   1.378 +		sprintf(szTemp,"UNNAMED_%i",iCnt++);
   1.379 +		mName = szTemp;
   1.380 +	}
   1.381 +
   1.382 +	//! Name of the material
   1.383 +	std::string mName;
   1.384 +	//! Diffuse color of the material
   1.385 +	aiColor3D mDiffuse;
   1.386 +	//! Specular exponent
   1.387 +	float mSpecularExponent;
   1.388 +	//! Shininess strength, in percent
   1.389 +	float mShininessStrength;
   1.390 +	//! Specular color of the material
   1.391 +	aiColor3D mSpecular;
   1.392 +	//! Ambient color of the material
   1.393 +	aiColor3D mAmbient;
   1.394 +	//! Shading type to be used
   1.395 +	Discreet3DS::shadetype3ds mShading;
   1.396 +	//! Opacity of the material
   1.397 +	float mTransparency;
   1.398 +	//! Diffuse texture channel
   1.399 +	Texture sTexDiffuse;
   1.400 +	//! Opacity texture channel
   1.401 +	Texture sTexOpacity;
   1.402 +	//! Specular texture channel
   1.403 +	Texture sTexSpecular;
   1.404 +	//! Reflective texture channel
   1.405 +	Texture sTexReflective;
   1.406 +	//! Bump texture channel
   1.407 +	Texture sTexBump;
   1.408 +	//! Emissive texture channel
   1.409 +	Texture sTexEmissive;
   1.410 +	//! Shininess texture channel
   1.411 +	Texture sTexShininess;
   1.412 +	//! Scaling factor for the bump values
   1.413 +	float mBumpHeight;
   1.414 +	//! Emissive color
   1.415 +	aiColor3D mEmissive;
   1.416 +	//! Ambient texture channel
   1.417 +	//! (used by the ASE format)
   1.418 +	Texture sTexAmbient;
   1.419 +	//! True if the material must be rendered from two sides
   1.420 +	bool mTwoSided;
   1.421 +};
   1.422 +
   1.423 +// ---------------------------------------------------------------------------
   1.424 +/** Helper structure to represent a 3ds file mesh */
   1.425 +struct Mesh : public MeshWithSmoothingGroups<D3DS::Face>
   1.426 +{
   1.427 +	//! Default constructor
   1.428 +	Mesh()
   1.429 +	{
   1.430 +		static int iCnt = 0;
   1.431 +		
   1.432 +		// Generate a default name for the mesh
   1.433 +		char szTemp[128];
   1.434 +		::sprintf(szTemp,"UNNAMED_%i",iCnt++);
   1.435 +		mName = szTemp;
   1.436 +	}
   1.437 +
   1.438 +	//! Name of the mesh
   1.439 +	std::string mName;
   1.440 +
   1.441 +	//! Texture coordinates
   1.442 +	std::vector<aiVector3D> mTexCoords;
   1.443 +
   1.444 +	//! Face materials
   1.445 +	std::vector<unsigned int> mFaceMaterials;
   1.446 +
   1.447 +	//! Local transformation matrix
   1.448 +	aiMatrix4x4 mMat;
   1.449 +};
   1.450 +
   1.451 +// ---------------------------------------------------------------------------
   1.452 +/** Float key - quite similar to aiVectorKey and aiQuatKey. Both are in the
   1.453 +    C-API, so it would be difficult to make them a template. */
   1.454 +struct aiFloatKey 
   1.455 +{
   1.456 +	double mTime;      ///< The time of this key
   1.457 +	float mValue;	///< The value of this key
   1.458 +
   1.459 +#ifdef __cplusplus
   1.460 +
   1.461 +	// time is not compared
   1.462 +	bool operator == (const aiFloatKey& o) const
   1.463 +		{return o.mValue == this->mValue;}
   1.464 +
   1.465 +	bool operator != (const aiFloatKey& o) const
   1.466 +		{return o.mValue != this->mValue;}
   1.467 +
   1.468 +	// Only time is compared. This operator is defined
   1.469 +	// for use with std::sort
   1.470 +	bool operator < (const aiFloatKey& o) const
   1.471 +		{return mTime < o.mTime;}
   1.472 +
   1.473 +	bool operator > (const aiFloatKey& o) const
   1.474 +		{return mTime < o.mTime;}
   1.475 +
   1.476 +#endif
   1.477 +};
   1.478 +
   1.479 +// ---------------------------------------------------------------------------
   1.480 +/** Helper structure to represent a 3ds file node */
   1.481 +struct Node
   1.482 +{
   1.483 +	Node()
   1.484 +
   1.485 +		:	mHierarchyPos		(0)
   1.486 +		,	mHierarchyIndex		(0)
   1.487 +
   1.488 +	{
   1.489 +		static int iCnt = 0;
   1.490 +		
   1.491 +		// Generate a default name for the node
   1.492 +		char szTemp[128];
   1.493 +		::sprintf(szTemp,"UNNAMED_%i",iCnt++);
   1.494 +		mName = szTemp;
   1.495 +
   1.496 +		aRotationKeys.reserve (20);
   1.497 +		aPositionKeys.reserve (20);
   1.498 +		aScalingKeys.reserve  (20);
   1.499 +	}
   1.500 +
   1.501 +	~Node()
   1.502 +	{
   1.503 +		for (unsigned int i = 0; i < mChildren.size();++i)
   1.504 +			delete mChildren[i];
   1.505 +	}
   1.506 +
   1.507 +	//! Pointer to the parent node
   1.508 +	Node* mParent;
   1.509 +
   1.510 +	//! Holds all child nodes
   1.511 +	std::vector<Node*> mChildren;
   1.512 +
   1.513 +	//! Name of the node
   1.514 +	std::string mName;
   1.515 +
   1.516 +	//! Dummy nodes: real name to be combined with the $$$DUMMY 
   1.517 +	std::string mDummyName;
   1.518 +
   1.519 +	//! Position of the node in the hierarchy (tree depth)
   1.520 +	int16_t mHierarchyPos;
   1.521 +
   1.522 +	//! Index of the node
   1.523 +	int16_t mHierarchyIndex;
   1.524 +
   1.525 +	//! Rotation keys loaded from the file
   1.526 +	std::vector<aiQuatKey> aRotationKeys;
   1.527 +
   1.528 +	//! Position keys loaded from the file
   1.529 +	std::vector<aiVectorKey> aPositionKeys;
   1.530 +
   1.531 +	//! Scaling keys loaded from the file
   1.532 +	std::vector<aiVectorKey> aScalingKeys;
   1.533 +
   1.534 +
   1.535 +	// For target lights (spot lights and directional lights):
   1.536 +	// The position of the target
   1.537 +	std::vector< aiVectorKey > aTargetPositionKeys;
   1.538 +
   1.539 +	// For cameras: the camera roll angle
   1.540 +	std::vector< aiFloatKey > aCameraRollKeys;
   1.541 +
   1.542 +	//! Pivot position loaded from the file
   1.543 +	aiVector3D vPivot;
   1.544 +
   1.545 +	//! Add a child node, setup the right parent node for it
   1.546 +	//! \param pc Node to be 'adopted'
   1.547 +	inline Node& push_back(Node* pc)
   1.548 +	{
   1.549 +		mChildren.push_back(pc);
   1.550 +		pc->mParent = this;
   1.551 +		return *this;
   1.552 +	}
   1.553 +};
   1.554 +// ---------------------------------------------------------------------------
   1.555 +/** Helper structure analogue to aiScene */
   1.556 +struct Scene
   1.557 +{
   1.558 +	//! List of all materials loaded
   1.559 +	//! NOTE: 3ds references materials globally
   1.560 +	std::vector<Material> mMaterials;
   1.561 +
   1.562 +	//! List of all meshes loaded
   1.563 +	std::vector<Mesh> mMeshes;
   1.564 +
   1.565 +	//! List of all cameras loaded
   1.566 +	std::vector<aiCamera*> mCameras;
   1.567 +
   1.568 +	//! List of all lights loaded
   1.569 +	std::vector<aiLight*> mLights;
   1.570 +
   1.571 +	//! Pointer to the root node of the scene
   1.572 +	// --- moved to main class
   1.573 +	// Node* pcRootNode;
   1.574 +};
   1.575 +
   1.576 +
   1.577 +} // end of namespace D3DS
   1.578 +} // end of namespace Assimp
   1.579 +
   1.580 +#endif // AI_XFILEHELPER_H_INC