summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/assimp/code/3DSHelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/assimp/code/3DSHelper.h')
-rw-r--r--src/3rdparty/assimp/code/3DSHelper.h75
1 files changed, 39 insertions, 36 deletions
diff --git a/src/3rdparty/assimp/code/3DSHelper.h b/src/3rdparty/assimp/code/3DSHelper.h
index 5911b9d47..9e701c3dd 100644
--- a/src/3rdparty/assimp/code/3DSHelper.h
+++ b/src/3rdparty/assimp/code/3DSHelper.h
@@ -2,7 +2,8 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
-Copyright (c) 2006-2016, assimp team
+Copyright (c) 2006-2017, assimp team
+
All rights reserved.
Redistribution and use of this software in source and binary forms,
@@ -43,15 +44,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_3DSFILEHELPER_H_INC
#define AI_3DSFILEHELPER_H_INC
-
#include "SpatialSort.h"
#include "SmoothingGroups.h"
#include "StringUtils.h"
#include "qnan.h"
-#include "./../include/assimp/material.h"
-#include "./../include/assimp/camera.h"
-#include "./../include/assimp/light.h"
-#include "./../include/assimp/anim.h"
+#include <assimp/material.h>
+#include <assimp/camera.h>
+#include <assimp/light.h>
+#include <assimp/anim.h>
#include <stdio.h> //sprintf
namespace Assimp {
@@ -63,16 +63,19 @@ namespace D3DS {
/** Discreet3DS class: Helper class for loading 3ds files. Defines chunks
* and data structures.
*/
-class Discreet3DS
-{
+class Discreet3DS {
private:
- inline Discreet3DS() {}
+ Discreet3DS() {
+ // empty
+ }
-public:
+ ~Discreet3DS() {
+ // empty
+ }
+public:
//! data structure for a single chunk in a .3ds file
- struct Chunk
- {
+ struct Chunk {
uint16_t Flag;
uint32_t Size;
} PACK_STRUCT;
@@ -129,6 +132,7 @@ public:
CHUNK_PERCENTW = 0x0030, // int2 percentage
CHUNK_PERCENTF = 0x0031, // float4 percentage
+ CHUNK_PERCENTD = 0x0032, // float8 percentage
// ********************************************************************
// Prj master chunk
@@ -327,11 +331,11 @@ struct Texture
{
//! Default constructor
Texture()
- : mOffsetU (0.0f)
- , mOffsetV (0.0f)
- , mScaleU (1.0f)
- , mScaleV (1.0f)
- , mRotation (0.0f)
+ : mOffsetU (0.0)
+ , mOffsetV (0.0)
+ , mScaleU (1.0)
+ , mScaleV (1.0)
+ , mRotation (0.0)
, mMapMode (aiTextureMapMode_Wrap)
, bPrivate()
, iUVSrc (0)
@@ -340,17 +344,17 @@ struct Texture
}
//! Specifies the blend factor for the texture
- float mTextureBlend;
+ ai_real mTextureBlend;
//! Specifies the filename of the texture
std::string mMapName;
//! Specifies texture coordinate offsets/scaling/rotations
- float mOffsetU;
- float mOffsetV;
- float mScaleU;
- float mScaleV;
- float mRotation;
+ ai_real mOffsetU;
+ ai_real mOffsetV;
+ ai_real mScaleU;
+ ai_real mScaleV;
+ ai_real mRotation;
//! Specifies the mapping mode to be used for the texture
aiTextureMapMode mMapMode;
@@ -368,14 +372,13 @@ struct Material
{
//! Default constructor. Builds a default name for the material
Material()
- :
- mDiffuse (0.6f,0.6f,0.6f), // FIX ... we won't want object to be black
- mSpecularExponent (0.0f),
- mShininessStrength (1.0f),
- mShading(Discreet3DS::Gouraud),
- mTransparency (1.0f),
- mBumpHeight (1.0f),
- mTwoSided (false)
+ : mDiffuse ( ai_real( 0.6 ), ai_real( 0.6 ), ai_real( 0.6 ) ) // FIX ... we won't want object to be black
+ , mSpecularExponent ( ai_real( 0.0 ) )
+ , mShininessStrength ( ai_real( 1.0 ) )
+ , mShading(Discreet3DS::Gouraud)
+ , mTransparency ( ai_real( 1.0 ) )
+ , mBumpHeight ( ai_real( 1.0 ) )
+ , mTwoSided (false)
{
static int iCnt = 0;
@@ -389,9 +392,9 @@ struct Material
//! Diffuse color of the material
aiColor3D mDiffuse;
//! Specular exponent
- float mSpecularExponent;
+ ai_real mSpecularExponent;
//! Shininess strength, in percent
- float mShininessStrength;
+ ai_real mShininessStrength;
//! Specular color of the material
aiColor3D mSpecular;
//! Ambient color of the material
@@ -399,7 +402,7 @@ struct Material
//! Shading type to be used
Discreet3DS::shadetype3ds mShading;
//! Opacity of the material
- float mTransparency;
+ ai_real mTransparency;
//! Diffuse texture channel
Texture sTexDiffuse;
//! Opacity texture channel
@@ -415,7 +418,7 @@ struct Material
//! Shininess texture channel
Texture sTexShininess;
//! Scaling factor for the bump values
- float mBumpHeight;
+ ai_real mBumpHeight;
//! Emissive color
aiColor3D mEmissive;
//! Ambient texture channel
@@ -459,7 +462,7 @@ struct Mesh : public MeshWithSmoothingGroups<D3DS::Face>
struct aiFloatKey
{
double mTime; ///< The time of this key
- float mValue; ///< The value of this key
+ ai_real mValue; ///< The value of this key
#ifdef __cplusplus