voici un exemple de ce que tu peu lire dans le format 3ds avec la lib3ds (extrait de 3dsftk.h )
voici quelque lien interressant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 typedef struct { char3ds name[11]; /* Object name */ byte3ds ishidden; /* Hidden object flag */ byte3ds isvislofter; /* Lofter visibility flag */ byte3ds ismatte; /* Matte object flag */ byte3ds isnocast; /* Doesn't cast shadow's flag */ byte3ds isfast; /* Fast display flag */ byte3ds isnorcvshad; /* Doesn't recieve shadows */ byte3ds isfrozen; /* Frozen object flag */ ushort3ds nvertices; /* Vertice count */ point3ds *vertexarray; /* List of vertices */ ushort3ds nvflags; /* Number of vertex flags */ ushort3ds *vflagarray; /* List of vertex flags */ ushort3ds ntextverts; /* Number of texture vertices */ textvert3ds *textarray; /* List of texture coordinates */ byte3ds usemapinfo; /* Boolean for use of mapping icon information */ mapinfo3ds map; /* Mapping icon info */ float3ds locmatrix[12]; /* Object orientation matrix */ ushort3ds nfaces; /* Face count */ face3ds *facearray; /* List of faces */ ulong3ds *smootharray; /* Smoothing group assignment list */ byte3ds useboxmap; /* Boolean used to indicate the use of box mapping */ char3ds boxmap[6][17]; /* Material names used in boxmapping */ ubyte3ds meshcolor; /* UI color assigned to the mesh */ ushort3ds nmats; /* Assigned materials count */ objmat3ds *matarray; /* Material assignment list */ byte3ds useproc; /* Use animated stand-in flag */ ulong3ds procsize; /* Size of animated stand-in data */ char3ds procname[13]; /* Name of animated stand-in procedure */ void3ds *procdata; /* Animated stand-in data */ } mesh3ds;
http://freddec.free.fr/tutoriels/fichiers/CFile3DS.zip
Tutorial GameDev : http://www.gamedev.net/reference/art...rticle1259.asp
Lesson 31 de NeHe : http://nehe.gamedev.net/data/lessons....asp?lesson=31
Partager