goat3d

view doc/goatfmt @ 21:0e31f2c3f29d

macfix
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 27 Sep 2013 07:14:27 +0300
parents 188c697b3b49
children 4f8383183d62
line source
1 Chunk structure
2 ---------------
4 Leaf nodes which carry actual data are marked with <SINGLE_CHILD>, or
5 [MULTIPLE_CHILDREN]. Where choice is involved, options are seperated with the |
6 symbol.
8 SCENE
9 +--ENV
10 | +--AMBIENT
11 | | +--<FLOAT3>
12 | +--FOG
13 | +--FOG_COLOR
14 | | +--<FLOAT3>
15 | +--FOG_EXP
16 | +--<FLOAT>
17 +--MTL
18 | +--MTL_NAME
19 | | +--<STRING>
20 | +--MTL_ATTR
21 | +--MTL_ATTR_NAME
22 | | +--<STRING>
23 | +--MTL_ATTR_VAL
24 | | +--<FLOAT|FLOAT3|FLOAT4>
25 | +--MTL_ATTR_MAP
26 | +--<STRING> (filename)
27 +--MESH
28 | +--MESH_NAME
29 | | +--<STRING>
30 | +--MESH_MATERIAL
31 | | +--<STRING|INT> (material name or index)
32 | +--MESH_VERTEX_LIST
33 | | +--[FLOAT3]
34 | +--MESH_NORMAL_LIST
35 | | +--[FLOAT3]
36 | +--MESH_TANGENT_LIST
37 | | +--[FLOAT3]
38 | +--MESH_TEXCOORD_LIST
39 | | +--[FLOAT3]
40 | +--MESH_SKINWEIGHT_LIST
41 | | +--[FLOAT4] (vector elements are the 4 skin weights/vertex)
42 | +--MESH_SKINMATRIX_LIST
43 | | +--[INT4] (vector elements are the 4 matrix indices/vertex)
44 | +--MESH_COLOR_LIST
45 | | +--[FLOAT4]
46 | +--MESH_BONES_LIST
47 | | +--[INT|STRING] (list of bone nodes by name or index)
48 | +--MESH_FACE_LIST
49 | | +--MESH_FACE
50 | | +--[INT] (three INT chunks for the vertex indices)
51 | +--MESH_FILE
52 | +--<STRING> (filename of mesh file to get all the data from)
53 +--LIGHT
54 | +--LIGHT_NAME
55 | | +--<STRING>
56 | +--LIGHT_POS
57 | | +--<FLOAT3>
58 | +--LIGHT_COLOR
59 | | +--<FLOAT3>
60 | +--LIGHT_ATTEN
61 | | +--<FLOAT3> (constant, linear, and quadratic attenuation)
62 | +--LIGHT_DISTANCE
63 | | +--<FLOAT>
64 | +--LIGHT_DIR
65 | | +--<FLOAT3>
66 | +--LIGHT_CONE_INNER
67 | | +--<FLOAT>
68 | +--LIGHT_CONE_OUTER
69 | +--<FLOAT>
70 +--CAMERA
71 | +--CAMERA_NAME
72 | | +--<STRING>
73 | +--CAMERA_POS
74 | | +--<FLOAT3>
75 | +--CAMERA_TARGET
76 | | +--<FLOAT3>
77 | +--CAMERA_FOV
78 | | +--<FLOAT>
79 | +--CAMERA_NEARCLIP
80 | | +--<FLOAT>
81 | +--CAMERA_FARCLIP
82 | +--<FLOAT>
83 +--NODE
84 +--NODE_NAME
85 | +--<STRING>
86 +--NODE_PARENT
87 | +--<INT|STRING>
88 +--NODE_MESH|NODE_LIGHT|NODE_CAMERA
89 | +--<INT|STRING>
90 +--NODE_POS
91 | +--<FLOAT3>
92 +--NODE_ROT
93 | +--<FLOAT4> ([x, y, z], w <- real part)
94 +--NODE_SCALE
95 | +--<FLOAT3>
96 +--NODE_PIVOT
97 | +--<FLOAT3>
98 +--NODE_MATRIX0
99 | +--<FLOAT4> (first row)
100 +--NODE_MATRIX1
101 | +--<FLOAT4> (second row)
102 +--NODE_MATRIX2
103 +--<FLOAT4> (third row)
105 NOTES:
106 * Name chunks are mandatory. If something doesn't have a name, one must be made
107 up, even if it's just "object%d".
108 * In node chunks, both POS/ROT/SCALE, and MATRIX0/MATRIX1/MATRIX2 are mandatory
109 and they must agree. Makes it easy for the reader to pick the transformation
110 data in whichever way is more convenient.