GiN Tjobingz0r
// Means it's a comment, our superior text-parser won't read it.. 
// So, this means you suck, cause you tried to hack the format punk!!... ;)

//This is unortodox fox.

//Bitch	
Format=GiNInternalMesh
//means it's not encrypted
EncryptKey=0 
//special thanks to all my friends..

//only one model.
NrOfModels=1

//Here comes some modelinfo.
model 1 start
modelName=the super test model

PositionX=0
PositionY=0
PositionZ=0

//quaternations shit, aight.. convert to matrix offcourse
RotationX=0
RotationY=0
RotationZ=0.7
RotationW=0.7

ScaleX=1
ScaleY=1
ScaleZ=1

nrOfVertices=144
nrOfIndices=156
// max would be 8 texturecoords for my engine.
nrOfTextureCoords=1 
nrOfVertexColours=0
normalsStored=false

//Indices have now come before the vertex data, must be fixed in loader.
Indices
{
0 1 2
1 0 3
4 5 6
7 5 4
8 5 7
9 5 8
9 10 5
9 11 10
12 13 14
13 12 15
16 17 18
16 19 17
20 19 16
21 19 20
22 19 21
23 19 22
24 19 23
24 25 19
26 25 24
27 25 26
28 25 27
29 25 28
29 30 25
29 31 30
32 33 34
33 32 35
36 37 38
37 39 40
37 41 39
37 42 41
37 43 42
36 43 37
44 45 46
44 47 45
48 47 44
49 47 48
50 47 49
51 47 50
51 52 47
53 54 55
52 54 53
52 56 54
52 57 56
52 58 57
52 59 58
51 59 52
60 61 62
61 60 63
64 65 66
65 64 67
67 68 65
68 67 69
69 70 68
70 69 71
72 73 74
73 72 75
75 76 73
76 75 77
77 78 76
78 77 79
80 81 82
81 80 83
83 84 81
84 83 85
85 60 84
60 85 63
66 86 87
86 66 65
65 88 86
88 65 68
68 89 88
89 68 70
74 90 91
90 74 73
73 92 90
92 73 76
76 93 92
93 76 78
82 94 95
94 82 81
81 96 94
96 81 84
84 97 96
97 84 60
98 99 100
99 98 97
87 101 102
101 87 86
86 103 101
103 86 88
88 104 103
104 88 89
91 105 106
105 91 90
90 107 105
107 90 92
92 108 107
108 92 93
95 109 110
109 95 94
94 111 109
111 94 96
96 98 111
98 96 97
63 112 61
112 63 113
66 114 64
114 66 115
97 62 99
62 97 60
87 115 66
115 87 116
117 118 119
118 117 102
102 116 87
116 102 117
101 120 121
120 101 103
102 121 118
121 102 101
106 122 123
122 106 105
103 124 120
124 103 104
107 125 126
125 107 108
105 126 122
126 105 107
109 127 128
127 109 111
110 128 129
128 110 109
130 98 100
98 130 131
111 131 127
131 111 98
132 64 114
64 132 133
67 133 134
133 67 64
69 134 135
134 69 67
71 135 136
135 71 69
75 137 138
137 75 72
77 138 139
138 77 75
79 139 140
139 79 77
83 141 142
141 83 80
85 142 143
142 85 83
63 143 113
143 63 85
}

//Here we must have something to build up our vertic list and texturecoordlist correctly.

//also note, for models without texturecoords, vertexdata can be read directly. (I think, maybe not)

//this number is used to create a temporary list of the vertices used. it is a list without repeated data.
NrOfVertexPoints=80
//this is a number who is used for computing the real list of texurecoords.. oh, all the hazzle we must go through! o.O
NrOfTextureCoords 1=144
//this is some data used to compute the _real_ list of vertices to be used. O_o Hazzle!
//it is the size of nrOfVertices
VertexIndices
{
0 3 2 1 26 5 28 24 22 9 7 8 1 7 3 5 10 7 8 3 21 20 19 18 17 2 16 15 14 12 6 11 2 4 0 6 11 4 6 27 30 25 23 13 31 4 30 0 32 33 34 35 1 5 29 28 39 38 37 36 50 9 22 40 
41 52 51 42 53 43 54 44 44 55 54 45 56 46 57 47 47 58 57 48 59 49 62 61 63 64 65 64 66 67 68 67 69 60 70 24 26 72 71 73 74 75 74 76 77 78 77 79 8 10 13 23 25 27 31 30 33 32 35 34 34 37 36 39 
38 37 28 29 11 12 14 15 16 16 17 18 19 19 20 21 
}

//the size of this is NrOfVertexPoints
Vertices
{
-28.373549 0.000000 -50.246250 
28.373549 0.000000 -50.246250 
-28.373549 0.000000 50.246250 
28.373549 0.000000 50.246250 
-28.373549 29.900475 -50.246250 
28.373549 29.900475 -50.246250 
-28.373549 29.900475 50.246250 
28.373549 29.900475 50.246250 
24.881439 29.900471 50.246243 
24.881439 29.900471 30.160919 
25.182743 28.204363 50.246246 
-24.624498 29.900471 50.246243 
-24.925800 28.204365 50.246246 
-24.624496 29.900471 30.160919 
-23.414845 19.698790 50.246246 
-19.064215 12.219115 50.246246 
-12.398668 6.667497 50.246246 
-4.222161 3.713539 50.246246 
4.479096 3.713539 50.246246 
12.655603 6.667494 50.246246 
19.321152 12.219110 50.246246 
23.671782 19.698786 50.246246 
24.881439 29.900471 9.572586 
-24.624496 29.900471 9.572585 
24.881439 29.900471 -11.015746 
-24.624496 29.900471 -11.015746 
24.881439 29.900471 -31.604084 
-24.624496 29.900471 -31.604084 
24.881439 29.900471 -50.246243 
25.182743 28.204367 -50.246243 
-24.624496 29.900471 -50.246243 
-24.925800 28.204369 -50.246246 
-23.414845 19.698793 -50.246246 
-19.064215 12.219121 -50.246246 
-12.398668 6.667501 -50.246246 
-4.222161 3.713543 -50.246246 
4.479096 3.713543 -50.246246 
12.655603 6.667497 -50.246246 
19.321152 12.219113 -50.246246 
23.671783 19.698790 -50.246246 
25.182745 28.204367 30.160923 
-24.925802 28.204369 30.160923 
-23.414846 19.698793 30.160921 
-19.064217 12.219118 30.160921 
-12.398668 6.667500 30.160919 
-4.222162 3.713543 30.160919 
4.479095 3.713543 30.160919 
12.655603 6.667497 30.160919 
19.321156 12.219113 30.160921 
23.671785 19.698788 30.160921 
25.182745 28.204367 9.572586 
-24.925802 28.204370 9.572586 
-23.414846 19.698795 9.572585 
-19.064217 12.219119 9.572583 
-12.398668 6.667501 9.572583 
-4.222162 3.713544 9.572582 
4.479095 3.713544 9.572582 
12.655603 6.667497 9.572583 
19.321156 12.219114 9.572583 
23.671785 19.698790 9.572585 
25.182745 28.204369 -11.015748 
-24.925802 28.204370 -11.015748 
-23.414846 19.698795 -11.015750 
-19.064217 12.219120 -11.015751 
-12.398668 6.667502 -11.015752 
-4.222162 3.713545 -11.015753 
4.479095 3.713545 -11.015753 
12.655603 6.667498 -11.015752 
19.321156 12.219114 -11.015751 
23.671785 19.698790 -11.015750 
25.182745 28.204369 -31.604088 
-24.925802 28.204370 -31.604088 
-23.414846 19.698795 -31.604088 
-19.064217 12.219121 -31.604088 
-12.398668 6.667502 -31.604092 
-4.222162 3.713545 -31.604092 
4.479095 3.713545 -31.604092 
12.655603 6.667499 -31.604092 
19.321156 12.219115 -31.604088 
23.671785 19.698792 -31.604088 
}

//this is to construct the _real_ texturecoord list. it is the size of nrOfVertices
TextureCoordsIndices 1
{
73 127 71 122 114 125 113 115 116 117 128 118 142 77 76 143 121 129 119 126 111 109 96 10 18 68 36 54 56 66 70 59 89 130 131 88 58 75 69 63 65 62 61 60 67 72 64 74 57 55 42 24 123 124 120 112 110 108 90 16 26 44 27 45 
53 33 35 51 32 50 31 49 38 21 39 20 13 12 94 95 48 29 30 47 28 46 7 8 6 5 22 40 14 93 3 4 2 0 107 1 106 100 99 101 102 23 41 15 92 104 103 105 78 79 52 34 9 98 132 133 135 134 25 43 136 91 17 139 
138 137 141 140 86 87 85 84 83 37 19 11 97 82 81 80 
}

//these are the texturecoords. size of "NrOfTextureCoords 1"
TextureCoords 1
{
6.632980 0.389453 
7.219455 0.389453 
3.691942 0.389454 
1.105639 0.389459 
-0.813986 0.389468 
4.913983 0.389499 
2.994358 0.389508 
0.408054 0.389513 
-2.532982 0.389516 
-3.119456 0.389516 
5.935398 1.175928 
10.127273 1.175928 
6.898479 1.175943 
3.588825 1.175958 
0.279171 1.175974 
-3.030483 1.175989 
-1.835397 1.176003 
-6.027282 1.176003 
5.935397 4.447395 
10.127281 4.447395 
6.898488 4.447410 
3.588833 4.447425 
0.279179 4.447441 
-3.030476 4.447456 
-1.835397 4.447470 
-6.027274 4.447470 
6.632980 5.006824 
7.219455 5.006824 
3.691942 5.006825 
1.105639 5.006830 
-0.813986 5.006838 
4.913983 5.006870 
2.994358 5.006878 
0.408054 5.006884 
-3.119456 5.006886 
-2.532982 5.006886 
4.913985 7.521569 
10.127288 7.521569 
6.898495 7.521584 
3.588840 7.521599 
0.279186 7.521615 
-3.030468 7.521630 
-0.813984 7.521645 
-6.027267 7.521645 
7.219455 9.624194 
6.632980 9.624195 
3.691941 9.624196 
1.105638 9.624202 
-0.813986 9.624210 
4.913984 9.624242 
2.994359 9.624250 
0.408055 9.624256 
-3.119456 9.624256 
-2.532982 9.624258 
2.994360 10.027658 
1.105641 10.027733 
0.408056 11.663390 
3.691945 11.663465 
10.127298 12.118193 
-3.119456 12.118193 
6.898505 12.118207 
3.588851 12.118221 
0.279198 12.118238 
-3.030456 12.118253 
7.219455 12.118267 
-6.027255 12.118267 
-2.532980 12.231475 
6.632981 12.231549 
7.219456 13.527747 
10.127303 13.527747 
-3.119457 13.527747 
-6.027304 13.527747 
7.219457 13.527822 
10.127252 13.527822 
-3.119456 13.527822 
-6.027253 13.527822 
7.219456 14.128751 
-3.119457 14.128751 
7.219455 14.128754 
6.632979 14.128756 
3.691941 14.128757 
1.105637 14.128762 
-0.813987 14.128770 
4.913985 14.128801 
2.994360 14.128810 
0.408056 14.128816 
-3.119456 14.128817 
-2.532980 14.128818 
7.219457 14.128823 
-3.119456 14.128823 
-0.813986 -1.898171 
-6.027289 -1.898171 
-3.030491 -1.898185 
0.279164 -1.898200 
3.588818 -1.898216 
6.898472 -1.898231 
4.913986 -1.898246 
10.127265 -1.898246 
-3.119456 -4.227856 
-2.532982 -4.227856 
0.408054 -4.227859 
2.994358 -4.227864 
4.913983 -4.227873 
-0.813985 -4.227904 
1.105639 -4.227911 
3.691943 -4.227917 
7.219455 -4.227918 
6.632980 -4.227919 
1.105638 -4.404261 
2.994362 -4.404335 
3.691942 -6.039996 
0.408058 -6.040070 
7.219455 -6.494798 
-6.027299 -6.494798 
-3.030500 -6.494812 
0.279154 -6.494827 
3.588807 -6.494843 
6.898461 -6.494858 
10.127254 -6.494873 
-3.119455 -6.494873 
6.632980 -6.608080 
-2.532979 -6.608156 
10.127303 -7.807748 
-3.119457 -7.807748 
7.219456 -7.807749 
-6.027304 -7.807749 
7.219456 -7.807824 
-6.027253 -7.807824 
10.127252 -7.807824 
-3.119457 -7.807824 
7.219457 -8.408752 
-3.119456 -8.408752 
-2.532982 -8.408756 
-3.119456 -8.408756 
0.408055 -8.408758 
2.994358 -8.408764 
4.913983 -8.408772 
-0.813986 -8.408804 
1.105638 -8.408812 
3.691942 -8.408817 
6.632980 -8.408818 
7.219455 -8.408818 
7.219456 -8.408824 
-3.119457 -8.408824 
} 



//do more work tomorow ol' chap ;=), yes offcourse.. this is tomorow, work commending. :) I must go to the toilet and shit some too.
//what the fuck, why do I write these dirty comments,, hehe *added 2. april 2004*
MeshDependant Modifiers
//Modifier skinning

//skinning 1 *doesnt use skinning, I comment it out.
//another one, for test purposes


MeshIndependant Modifiers
//modifier noise not implemented yet.


//end of model 1 data.
model 1 end

//say that we start meshDependant modifiers..
MeshDependant Modifiers start

skinning 1 start

//what kind of model is it?
modelDep 1
//what skeleton id's is it compatible with?
skeleton 1
//length of this is same as nr of vertices.. info is used to compute length of next tables.
BonesNr
{
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 1 1 1 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2
}

//used to index bones.. bones is in a tree-structure so it will actually be searching.
BonesIdArray
{
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 3 3 3 3 3 3 3 
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4 4 4 4 3 4 3 4 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5
}

//same function as id's, but it's text based. we could ignore them, though names are always nice.
boneNames
{
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone01
Bone02
Bone01
Bone02
Bone01
Bone02
Bone01
Bone02
Bone01
Bone02
Bone01
Bone02
Bone01
Bone02
Bone01
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone02
Bone03
Bone02
Bone03
Bone02
Bone03
Bone02
Bone03
Bone02
Bone03
Bone02
Bone03
Bone02
Bone03
Bone02
Bone03
Bone03
Bone03
Bone03
Bone02
Bone03
Bone02
Bone03
Bone02
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone03
Bone04
}

//Here are the meat of the shiat, the weights. it has the length calculated by that shit up there. ;)
Weights
{
1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 0.090246 0.909754 0.076569 0.923431 0.046200 0.953800 0.021932 0.978068 0.014329 0.985671 0.021933 0.978067 0.046202 0.953798 0.076571 0.923429 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 
1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 0.603183 0.396817 0.590508 0.409492 0.567538 0.432462 0.551603 0.448397 0.546383 0.453617 0.551603 0.448397 0.567535 0.432465 0.590505 0.409495 1.000000 1.000000 1.000000 0.000161 0.999839 0.000997 0.999003 0.000161 0.999839 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 0.500000 0.500000
}
skinning 1 end
MeshDependant Modifiers end

MeshIndependant Modifiers start
//we don't have anyone.
MeshIndependant Modifiers end

skeleton 1 start
//bones go here..
//aight, hva skal vi gjre dersom det ikke finner parent fordi parent ikke er lastet enda?...
bone 1 start
Parent=0
NodeId=2
Name=Bone01

PositionX=0.0000002
PositionY=-30.000210
PositionZ=0.2

RotationX=-0.15
RotationY=0.68
RotationZ=0.15
RotationW=0.68

ScaleX=1
ScaleY=1
ScaleZ=1

NrOfVertices=9
NrOfIndices=14
NormalsStored=false

Vertices
{
4.999876 -4.999996 4.999997
4.999876 4.999996 4.999997
4.999876 4.999996 -4.999997
4.999876 -4.999996 -4.999997
66.170631 -0.500000 0.500000
66.170631 0.500000 0.500000
66.170631 0.500000 -0.500000
66.170631 -0.500000 -0.500000
0.000000 0.000000 0.000000
}

Indices
{
4 7 5  
6 5 7  
1 5 2  
6 2 5  
0 4 1  
5 1 4  
7 3 6  
2 6 3  
4 0 7  
3 7 0  
8 0 1  
8 1 2  
8 2 3  
8 3 0  
}

bone 1 end

bone 2 start
Parent=2
NodeId=3
Name=Bone02

PositionX=66.1706
PositionY=-0.000002
PositionZ=0.0000004

RotationX=-0.0000012
RotationY=-0.0000010
RotationZ=-0.4504004
RotationW=0.8797

ScaleX=1
ScaleY=1
ScaleZ=1


NrVertices=9
NrOfIndices=14
NormalsStored=false

Vertices
{
4.999924 -4.999995 4.999994
4.999924 4.999995 4.999994
4.999924 4.999995 -4.999994
4.999924 -4.999995 -4.999994
63.841290 -0.500000 0.499999
63.841290 0.500000 0.499999
63.841290 0.500000 -0.499999
63.841290 -0.500000 -0.499999
0.000000 0.000000 0.000000
}

Indices
{
4 7 5  
6 5 7  
1 5 2  
6 2 5  
0 4 1  
5 1 4  
7 3 6  
2 6 3  
4 0 7  
3 7 0  
8 0 1  
8 1 2  
8 2 3  
8 3 0  
}

bone 2 end

bone 3 start
Parent=3
NodeId=4
Name=Bone03

PositionX=63.032032
PositionY=0.0000012
PositionZ=0.0

RotationX=0.24
RotationY=0.27
RotationZ=0.38
RotationW=0.84

ScaleX=1
ScaleY=1
ScaleZ=1

NrVertices=9
NrOfIndices=14
NormalsStored=false

Vertices
{
4.999991 -4.999994 4.999993
4.999991 4.999994 4.999993
4.999991 4.999994 -4.999993
4.999991 -4.999994 -4.999993
37.483597 -0.500000 0.499999
37.483597 0.500000 0.499999
37.483597 0.500000 -0.499999
37.483597 -0.500000 -0.499999
0.000000 0.000000 0.000000
}

Indices
{
4 7 5  
6 5 7  
1 5 2  
6 2 5  
0 4 1  
5 1 4  
7 3 6  
2 6 3  
4 0 7  
3 7 0  
8 0 1  
8 1 2  
8 2 3  
8 3 0  
}

bone 3 end

bone 4 start
Parent=4
NodeId=5
Name=Bone4

PositionX=37.43
PositionY=0.0
PositionZ=0.0

RotationX=0
RotationY=0
RotationZ=0
RotationW=1

ScaleX=1
ScaleY=1
ScaleZ=1

NrVertices=9
NrOfIndices=14
NormalsStored=false

Vertices
{
4.999990 -4.999992 4.999991
4.999990 4.999992 4.999991
4.999990 4.999992 -4.999991
4.999990 -4.999992 -4.999991
9.999979 -0.499999 0.499999
9.999979 0.499999 0.499999
9.999979 0.499999 -0.499999
9.999979 -0.499999 -0.499999
0.000000 0.000000 0.000000
}

Indices
{
4 7 5  
6 5 7  
1 5 2  
6 2 5  
0 4 1  
5 1 4  
7 3 6  
2 6 3  
4 0 7  
3 7 0  
8 0 1  
8 1 2  
8 2 3  
8 3 0  
} 

bone 4 end

Skeleton 1 end
//we state EOF because of stupid shit, that wouldn't work, with this we could jump when finding end
//we even need to have it twice, I'll just say WTF!! stupid ifstream, c++ standard lack libary
EOF-GiN
EOF-GiN