summaryrefslogtreecommitdiff
path: root/src/mesh/assimp-master/port/AssimpDelphi/aiMesh.pas
blob: a05a0f200e67dad7f99564b76fe756a513e2c315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
unit aiMesh;

interface

uses aiTypes, aiMatrix4x4, aiVector3D, aiColor4D;

const
   AI_MAX_NUMBER_OF_COLOR_SETS = $4;
   AI_MAX_NUMBER_OF_TEXTURECOORDS = $4;

type TaiFace = packed record
   mNumIndicies: cardinal;
   mIndices: PCardinalArray;
end;
type PaiFace = ^TaiFace;
type PaiFaceArray = array [0..0] of PaiFace;

type TaiFaceArray = array [0..0] of TaiFace;
type PTaiFaceArray = ^TaiFaceArray;

type TaiVertexWeight = packed record
   mVertexId: cardinal;
   mWeight: single;
end;

type TaiBone = packed record
   mName: aiString;
   mNumWeights: cardinal;
   mWeights: Pointer;
   mOffsetMatrix: TaiMatrix4x4;
end;
type PaiBone = ^TaiBone;

type TaiPrimitiveType =
   (
   	aiPrimitiveType_POINT       = $1,
   	aiPrimitiveType_LINE        = $2,
	   aiPrimitiveType_TRIANGLE    = $4,
   	aiPrimitiveType_POLYGON     = $8
	   //,_aiPrimitiveType_Force32Bit = $9fffffff
   );

type TaiMesh = packed record
   mPrimitiveTypes: cardinal;
   mNumVertices: cardinal;
   mNumFaces: cardinal;
   mVertices: PTaiVector3DArray;
   mNormals: PTaiVector3DArray;
   mTangents: PaiVector3DArray;
   mBitangents: PaiVector3DArray;
   mColors: array[0..3] of PTaiColor4Darray; //array [0..3] of PaiColor4DArray; //array of 4
   mTextureCoords: array [0..3] of PTaiVector3DArray; //array of 4
   mNumUVComponents: array[0..AI_MAX_NUMBER_OF_TEXTURECOORDS -1] of cardinal;
   mFaces: PTaiFaceArray;
   mNumBones: cardinal;
   mBones: PaiBone;
   mMaterialIndex: cardinal;
   mName: aiString;
   mNumAniMeshes: cardinal;
   mAniMeshes: pointer;
end;
type PaiMesh = ^TaiMesh;
type PPaiMesh = ^PaiMesh;
type PaiMeshArray = array [0..0] of PaiMesh;
type PPaiMeshArray = ^PaiMeshArray;



implementation

end.