diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-05-26 10:35:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-04 10:09:11 +0200 |
commit | 1cb807d440cc0d434bfd02fd0c699447b788b8ba (patch) | |
tree | f28f64fba6ebb30449c3301a75bba2b233b1f34e /src/3rdparty/assimp/code/BlenderScene.h | |
parent | a45b8308ada361872502a678a12f08cff1760c64 (diff) |
Upgrade to Assimp 3.1
https://github.com/assimp/assimp/releases/tag/v3.1
This commit imports assimp 3.1, including CHANGES, CREDITS, LICENSE, README,
Readme.md, revision.h and code, contrib, include directories. contrib/zlib
was excluded.
assimp.pri was also updated.
Uses zlib from system or qt instead of contrib/zlib.
Task-number: QTBUG-39251
Change-Id: Ia0b446dcd9bc867d65897b9e2b157f6544ccaeac
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/assimp/code/BlenderScene.h')
-rw-r--r-- | src/3rdparty/assimp/code/BlenderScene.h | 78 |
1 files changed, 75 insertions, 3 deletions
diff --git a/src/3rdparty/assimp/code/BlenderScene.h b/src/3rdparty/assimp/code/BlenderScene.h index a3a4920bb..37ad282f3 100644 --- a/src/3rdparty/assimp/code/BlenderScene.h +++ b/src/3rdparty/assimp/code/BlenderScene.h @@ -94,6 +94,7 @@ namespace Assimp { struct Object; struct MTex; +struct Image; #define AI_BLEND_MESH_MAX_VERTS 2000000000L @@ -157,6 +158,38 @@ struct MEdge : ElemBase { }; // ------------------------------------------------------------------------------- +struct MLoop : ElemBase { + int v, e; +}; + +// ------------------------------------------------------------------------------- +struct MLoopUV : ElemBase { + float uv[2]; + int flag; +}; + +// ------------------------------------------------------------------------------- +// Note that red and blue are not swapped, as with MCol +struct MLoopCol : ElemBase { + char r, g, b, a; +}; + +// ------------------------------------------------------------------------------- +struct MPoly : ElemBase { + int loopstart; + int totloop; + short mat_nr; + char flag; +}; + +// ------------------------------------------------------------------------------- +struct MTexPoly : ElemBase { + Image* tpage; + char flag, transp; + short mode, tile, pad; +}; + +// ------------------------------------------------------------------------------- struct MCol : ElemBase { char r,g,b,a FAIL; }; @@ -235,6 +268,8 @@ struct Mesh : ElemBase { int totface FAIL; int totedge FAIL; int totvert FAIL; + int totloop; + int totpoly; short subdiv; short subdivr; @@ -246,6 +281,11 @@ struct Mesh : ElemBase { vector<TFace> tface; vector<MVert> mvert FAIL; vector<MEdge> medge WARN; + vector<MLoop> mloop; + vector<MLoopUV> mloopuv; + vector<MLoopCol> mloopcol; + vector<MPoly> mpoly; + vector<MTexPoly> mtpoly; vector<MDeformVert> dvert; vector<MCol> mcol; @@ -558,6 +598,18 @@ struct Tex : ElemBase { ,Type_VOXELDATA = 15 }; + enum ImageFlags { + ImageFlags_INTERPOL = 1 + ,ImageFlags_USEALPHA = 2 + ,ImageFlags_MIPMAP = 4 + ,ImageFlags_IMAROT = 16 + ,ImageFlags_CALCALPHA = 32 + ,ImageFlags_NORMALMAP = 2048 + ,ImageFlags_GAUSS_MIP = 4096 + ,ImageFlags_FILTER_MIN = 8192 + ,ImageFlags_DERIVATIVEMAP = 16384 + }; + ID id FAIL; // AnimData *adt; @@ -578,7 +630,8 @@ struct Tex : ElemBase { //short noisedepth, noisetype; //short noisebasis, noisebasis2; - //short imaflag, flag; + //short flag; + ImageFlags imaflag; Type type FAIL; //short stype; @@ -645,7 +698,25 @@ struct MTex : ElemBase { ,BlendType_BLEND_COLOR = 13 }; - // short texco, mapto, maptoneg; + enum MapType { + MapType_COL = 1 + ,MapType_NORM = 2 + ,MapType_COLSPEC = 4 + ,MapType_COLMIR = 8 + ,MapType_REF = 16 + ,MapType_SPEC = 32 + ,MapType_EMIT = 64 + ,MapType_ALPHA = 128 + ,MapType_HAR = 256 + ,MapType_RAYMIRR = 512 + ,MapType_TRANSLU = 1024 + ,MapType_AMB = 2048 + ,MapType_DISPLACE = 4096 + ,MapType_WARP = 8192 + }; + + // short texco, maptoneg; + MapType mapto; BlendType blendtype; boost::shared_ptr<Object> object; @@ -665,7 +736,8 @@ struct MTex : ElemBase { //float colfac, varfac; - //float norfac, dispfac, warpfac; + float norfac; + //float dispfac, warpfac; float colspecfac, mirrfac, alphafac; float difffac, specfac, emitfac, hardfac; //float raymirrfac, translfac, ambfac; |