;SNCF BB 66000 bleu

;----------Coté gauche----------

;Moteur
CreateMeshBuilder,
AddVertex,-0.81, 2.86, 6.76,
AddVertex,-0.81, 2.86,-6.76,
AddVertex,-0.81, 1.11,-6.76,
AddVertex,-0.81, 1.11, 6.76,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,Side-m_l.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255,

;Cabine
CreateMeshBuilder,
AddVertex,-1.49, 3.04, 7.18,
AddVertex,-1.49, 3.04,-7.18,
AddVertex,-1.49, 0.82,-7.18,
AddVertex,-1.49, 0.82, 7.18,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,Side-c_l.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255,

CreateMeshBuilder,
AddVertex,-1.489, 3.04,-1.94,
AddVertex,-1.489, 3.04,-4.10,
AddVertex,-1.489, 1.11,-4.10,
AddVertex,-1.489, 1.11,-1.94,
AddFace2,0,1,2,3,
SetColor, 101, 135, 162,

;Rambarde avant
CreateMeshBuilder,
Cube, 0.015, 0.015, 4.28,
Translate,-1.475, 2.205, 2.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.015, 4.28,
Translate,-1.475, 1.705, 2.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate,-1.475, 1.72, 6.615,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate,-1.475, 1.72, 5.375,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate,-1.475, 1.72, 4.135,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate,-1.475, 1.72, 2.895,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate,-1.475, 1.72, 1.655,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate,-1.475, 1.72, 0.415,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate,-1.475, 1.72,-0.825,
SetColor, 101, 135, 162,

;Rambarde arrière,
CreateMeshBuilder,
Cube, 0.015, 0.015, 1.26,
Translate,-1.475, 2.205,-5.36,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.015, 1.26,
Translate,-1.475, 1.705,-5.36,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate,-1.475, 1.72,-6.615,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate,-1.475, 1.72,-5.375,
SetColor, 101, 135, 162,



;----------Coté droit----------

;Moteur,
CreateMeshBuilder,
AddVertex, 0.81, 2.86,-6.76,
AddVertex, 0.81, 2.86, 6.76,
AddVertex, 0.81, 1.11, 6.76,
AddVertex, 0.81, 1.11,-6.76,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,Side-m_r.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255,

;Cabine
CreateMeshBuilder,
AddVertex, 1.49, 3.04,-7.18,
AddVertex, 1.49, 3.04, 7.18,
AddVertex, 1.49, 0.82, 7.18,
AddVertex, 1.49, 0.82,-7.18,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,Side-c_r.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255,

CreateMeshBuilder,
AddVertex, 1.489, 3.04,-1.94,
AddVertex, 1.489, 3.04,-4.10,
AddVertex, 1.489, 1.11,-4.10,
AddVertex, 1.489, 1.11,-1.94,
AddFace2,0,1,2,3,
SetColor, 101, 135, 162,

;Rambarde avant
CreateMeshBuilder,
Cube, 0.015, 0.015, 4.28,
Translate, 1.475, 2.205, 2.34
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.015, 4.28,
Translate, 1.475, 1.705, 2.34
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate, 1.475, 1.72, 6.615,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate, 1.475, 1.72, 5.375,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate, 1.475, 1.72, 4.135,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate, 1.475, 1.72, 2.895,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate, 1.475, 1.72, 1.655,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate, 1.475, 1.72, 0.415,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate, 1.475, 1.72,-0.825,
SetColor, 101, 135, 162,

;Rambarde arrière,
CreateMeshBuilder,
Cube, 0.015, 0.015, 1.26,
Translate, 1.475, 2.205,-5.36,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.015, 1.26,
Translate, 1.475, 1.705,-5.36,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate, 1.475, 1.72,-6.615,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.50, 0.015,
Translate, 1.475, 1.72,-5.375,
SetColor, 101, 135, 162,


;Front moteur
CreateMeshBuilder,
AddVertex, 0.81, 2.96, 6.76,
AddVertex,-0.81, 2.96, 6.76,
AddVertex,-0.81, 1.11, 6.76,
AddVertex, 0.81, 1.11, 6.76,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,front-m.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255,

;Front rampe
CreateMeshBuilder,
Cube, 1.318, 0.015, 0.015,
Translate, 0, 2.206, 7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 1.49, 0.015, 0.015,
Translate, 0, 1.605, 7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.27, 0.015,
Rotate, 0, 0, 1, 22
Translate, 1.405, 1.965, 7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.25, 0.015,
Translate, 1.505, 1.47, 7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.10, 0.015,
Rotate, 1, 0, 0, 45
Translate, 1.505, 1.160, 7.274,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.486, 0.015,
Translate, 0.405, 1.706, 7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.10, 0.015,
Rotate, 1, 0, 0, 45
Translate, 0.405, 1.160, 7.274,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.486, 0.015,
Translate,-0.405, 1.706, 7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.10, 0.015,
Rotate, 1, 0, 0, 45
Translate,-0.405, 1.160, 7.274,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.25, 0.015,
Translate,-1.505, 1.47, 7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.10, 0.015,
Rotate, 1, 0, 0, 45
Translate,-1.505, 1.160, 7.274,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.27, 0.015,
Rotate, 0, 0, 1,-22
Translate,-1.405, 1.965, 7.34,
SetColor, 101, 135, 162,


;phares avant
CreateMeshBuilder,
Cube, 0.25, 0.17, 0.01,
Translate, 1.1, 1.435, 7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cylinder, 20, 0.17, 0.07, 0.1
Rotate, 1, 0, 0, 90
Translate, 1.02, 1.435, 7.40,
SetColor, 101, 135, 162,

CreateMeshBuilder,
AddVertex, 1.18, 1.595, 7.451,
AddVertex, 0.86, 1.595, 7.451,
AddVertex, 0.86, 1.275, 7.451,
AddVertex, 1.18, 1.275, 7.451,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,phare.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,192,192,192,

;Lueur droite avant
CreateMeshBuilder,
AddVertex, 1.65, 2.065, 7.454,
AddVertex, 0.39, 2.065, 7.454,
AddVertex, 0.39, 0.805, 7.454,
AddVertex, 1.65, 0.805, 7.454,
AddFace2, 0,1,2,3,

LoadTexture,lueur_blanche.png,
SetTextureCoordinates, 0, 0, 0,
SetTextureCoordinates, 1, 1, 0,
SetTextureCoordinates, 2, 1, 1,
SetTextureCoordinates, 3, 0, 1,
SetDecalTransparentColor,0,0,0,
SetEmissiveColor, 255,255,255,
setBlendMode,Additive,10,

CreateMeshBuilder,
Cube, 0.25, 0.17, 0.01,
Translate,-1.1, 1.435, 7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cylinder, 20, 0.17, 0.07, 0.1
Rotate, 1, 0, 0, 90
Translate,-1.02, 1.435, 7.40,
SetColor, 101, 135, 162,

CreateMeshBuilder,
AddVertex,-0.86, 1.595, 7.451,
AddVertex,-1.18, 1.595, 7.451,
AddVertex,-1.18, 1.275, 7.451,
AddVertex,-0.86, 1.275, 7.451,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,phare.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,192,192,192,

;Lueur gauche avant
CreateMeshBuilder,
AddVertex,-0.39, 2.065, 7.454,
AddVertex,-1.65, 2.065, 7.454,
AddVertex,-1.65, 0.805, 7.454,
AddVertex,-0.39, 0.805, 7.454,
AddFace2, 0,1,2,3,

LoadTexture,lueur_blanche.png,
SetTextureCoordinates, 0, 0, 0,
SetTextureCoordinates, 1, 1, 0,
SetTextureCoordinates, 2, 1, 1,
SetTextureCoordinates, 3, 0, 1,
SetDecalTransparentColor,0,0,0,
SetEmissiveColor, 255,255,255,
setBlendMode,Additive,10,


;Rear moteur
CreateMeshBuilder,
AddVertex,-0.81, 2.96,-6.76,
AddVertex, 0.81, 2.96,-6.76,
AddVertex, 0.81, 1.11,-6.76,
AddVertex,-0.81, 1.11,-6.76,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,front-m.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255,

;Rear rampe
CreateMeshBuilder,
Cube, 1.32, 0.015, 0.015,
Translate, 0, 2.205,-7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 1.49, 0.015, 0.015,
Translate, 0, 1.605,-7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.27, 0.015,
Rotate, 0, 0, 1, 22
Translate, 1.405, 1.965,-7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.25, 0.015,
Translate, 1.505, 1.47,-7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.10, 0.015,
Rotate, 1, 0, 0,-45
Translate, 1.505, 1.160,-7.274,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.486, 0.015,
Translate, 0.405, 1.706,-7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.10, 0.015,
Rotate, 1, 0, 0,-45
Translate, 0.405, 1.160,-7.274,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.486, 0.015,
Translate,-0.405, 1.706,-7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.10, 0.015,
Rotate, 1, 0, 0,-45
Translate,-0.405, 1.160,-7.274,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.25, 0.015,
Translate,-1.505, 1.47,-7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.10, 0.015,
Rotate, 1, 0, 0,-45
Translate,-1.505, 1.160,-7.274,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cube, 0.015, 0.27, 0.015,
Rotate, 0, 0, 1,-22
Translate,-1.405, 1.965,-7.34,
SetColor, 101, 135, 162,

;phares arrière

CreateMeshBuilder,
Cube, 0.25, 0.17, 0.01,
Translate, 1.1, 1.435,-7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cylinder, 20, 0.17, 0.07, 0.1
Rotate, 1, 0, 0,-90
Translate, 1.02, 1.435,-7.40,
SetColor, 101, 135, 162,

CreateMeshBuilder,
AddVertex, 1.18, 1.595,-7.451,
AddVertex, 0.86, 1.595,-7.451,
AddVertex, 0.86, 1.275,-7.451,
AddVertex, 1.18, 1.275,-7.451,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,phare-rouge.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,192,192,192,

CreateMeshBuilder,
Cube, 0.25, 0.17, 0.01,
Translate,-1.1, 1.435,-7.34,
SetColor, 101, 135, 162,

CreateMeshBuilder,
Cylinder, 20, 0.17, 0.07, 0.1
Rotate, 1, 0, 0,-90
Translate,-1.02, 1.435,-7.40,
SetColor, 101, 135, 162,

CreateMeshBuilder,
AddVertex,-0.86, 1.595,-7.451,
AddVertex,-1.18, 1.595,-7.451,
AddVertex,-1.18, 1.275,-7.451,
AddVertex,-0.86, 1.275,-7.451,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,phare-rouge.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,192,192,192,


;----------Sol----------

CreateMeshBuilder,
AddVertex, 1.49, 1.22, 7.18,
AddVertex, 1.49, 1.22,-7.18,
AddVertex,-1.49, 1.22,-7.18,
AddVertex,-1.49, 1.22, 7.18,
AddFace,0,1,2,3,
SetColor, 90, 90, 90,
GenerateNormals,


;----------Cabine----------

;Avant
CreateMeshBuilder,
AddVertex, 1.49, 4.26,-1.94,
AddVertex,-1.49, 4.26,-1.94,
AddVertex,-1.49, 1.11,-1.94,
AddVertex, 1.49, 1.11,-1.94,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,front-c.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255,

CreateMeshBuilder,
AddVertex, 1.22, 3.70,-1.95,
AddVertex,-1.22, 3.70,-1.95,
AddVertex,-1.48, 2.96,-1.95,
AddVertex, 1.48, 2.96,-1.95,
AddFace2,0,1,2,3,
SetColor, 0, 0, 0, 128,
GenerateNormals,

;Arrière
CreateMeshBuilder,
AddVertex,-1.49, 4.26,-4.10,
AddVertex, 1.49, 4.26,-4.10,
AddVertex, 1.49, 1.11,-4.10,
AddVertex,-1.49, 1.11,-4.10,
AddFace2,0,1,2,3,
GenerateNormals,

LoadTexture,front-c.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255,

CreateMeshBuilder,
AddVertex, 1.22, 3.70,-4.09,
AddVertex,-1.22, 3.70,-4.09,
AddVertex,-1.48, 2.96,-4.09,
AddVertex, 1.48, 2.96,-4.09,
AddFace2,0,1,2,3,
SetColor, 0, 0, 0, 128,
GenerateNormals,


;----------Heurtoir----------

;Barre
CreateMeshBuilder,
Cube, 1.49, 0.20, 0.01,
Translate, 0, 1.02, 7.19,
SetColor, 183, 50, 43,

;Avant gauche
CreateMeshBuilder,
Cylinder, 16, 0.12, 0.14, 0.28,
Rotate, 1,0,0,90,
Translate, 0.8, 1.05, 7.34,
SetColor, 51, 71, 102,

CreateMeshBuilder,
Cylinder, 16, 0.10, 0.10, 0.20, 
Rotate, 1,0,0,90,
Translate, 0.8, 1.05, 7.58,
SetColor, 66,66,66,

CreateMeshBuilder,
Cylinder, 16, 0.18, 0.18, 0.02,
Rotate, 1,0,0,90,
Translate, 0.89, 1.05, 7.69,
SetColor, 166,166,166,

CreateMeshBuilder,
Cube, 0.18, 0.01, 0.18,
Rotate, 1,0,0,90,
Translate, 0.71, 1.05, 7.69,
SetColor, 166,166,166,

;Avant droite
CreateMeshBuilder,
Cylinder, 16, 0.12, 0.14, 0.28,
Rotate, 1,0,0,90,
Translate,-0.8, 1.05, 7.34,
SetColor, 51, 71, 102,

CreateMeshBuilder,
Cylinder, 16, 0.10, 0.10, 0.20, 
Rotate, 1,0,0,90,
Translate,-0.8, 1.05, 7.58,
SetColor, 66, 66, 66,

CreateMeshBuilder,
Cylinder, 16, 0.18, 0.18, 0.02,
Rotate, 1,0,0,90,
Translate,-0.89, 1.05, 7.69,
SetColor, 166, 166, 166,

CreateMeshBuilder,
Cube, 0.18, 0.01, 0.18,
Rotate, 1,0,0,90,
Translate,-0.71, 1.05, 7.69,
SetColor, 166, 166, 166,

;Barre
CreateMeshBuilder,
Cube, 1.49, 0.20, 0.01,
Translate, 0, 1.02,-7.19,
SetColor, 183, 50, 43,

;Arriere gauche
CreateMeshBuilder,
Cylinder, 16, 0.12, 0.12, 0.28,
Rotate, 1,0,0,90,
Translate, 0.8, 1.05,-7.34,
SetColor, 51, 71, 102,

CreateMeshBuilder,
Cylinder, 16, 0.10, 0.10, 0.20, 
Rotate, 1,0,0,90,
Translate, 0.8, 1.05,-7.58,
SetColor, 66, 66, 66,

CreateMeshBuilder,
Cylinder, 16, 0.18, 0.18, 0.02,
Rotate, 1,0,0,90,
Translate, 0.89, 1.05,-7.69,
SetColor, 166, 166, 166,

CreateMeshBuilder,
Cube, 0.18, 0.01, 0.18,
Rotate, 1,0,0,90,
Translate, 0.71, 1.05,-7.69,
SetColor, 166, 166, 166,

;Arriere droite
CreateMeshBuilder,
Cylinder, 16, 0.12, 0.12, 0.28,
Rotate, 1,0,0,90,
Translate,-0.8, 1.05,-7.34,
SetColor, 51, 71, 102,

CreateMeshBuilder,
Cylinder, 16, 0.10, 0.10, 0.20, 
Rotate, 1,0,0,90,
Translate,-0.8, 1.05,-7.58,
SetColor, 66, 66, 66,

CreateMeshBuilder,
Cylinder, 16, 0.18, 0.18, 0.02,
Rotate, 1,0,0,90,
Translate,-0.89, 1.05,-7.69,
SetColor, 166, 166, 166,

CreateMeshBuilder,
Cube, 0.18, 0.01, 0.18,
Rotate, 1,0,0,90,
Translate,-0.71, 1.05,-7.69,
SetColor, 166, 166, 166,

;----------Toit----------

;Cabine
CreateMeshBuilder,
AddVertex, 1.19, 3.86,-1.68
AddVertex, 1.19, 3.86,-4.36
AddVertex, 0.49, 4.26,-4.36
AddVertex, 0.49, 4.26,-1.68
AddVertex,-0.49, 4.26,-4.36
AddVertex,-0.49, 4.26,-1.68
AddVertex,-1.19, 3.86,-4.36
AddVertex,-1.19, 3.86,-1.68
AddFace2,0,1,2,3,
AddFace2,3,2,4,5,
AddFace2,5,4,6,7,
SetColor, 65, 91, 110,
GenerateNormals,

CreateMeshBuilder,
AddVertex, 1.19, 3.86,-4.10
AddVertex, 1.19, 3.86,-1.94
AddVertex, 1.491, 3.039,-1.94
AddVertex, 1.491, 3.039,-4.10
AddVertex,-1.19, 3.86,-1.94
AddVertex,-1.19, 3.86,-4.10
AddVertex,-1.491, 3.039,-4.10
AddVertex,-1.491, 3.039,-1.94
AddFace2,0,1,2,3,
AddFace2,4,5,6,7,
;SetColor, 65, 91, 110,
GenerateNormals,

LoadTexture,toit-cote.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetTextureCoordinates,4,0,0,
SetTextureCoordinates,5,1,0,
SetTextureCoordinates,6,1,1,
SetTextureCoordinates,7,0,1,
SetDecalTransparentColor,0,0,255,

CreateMeshBuilder,
AddVertex, 1.17, 3.85,-4.08
AddVertex, 1.17, 3.85,-1.96
AddVertex, 1.47, 3.05,-1.96
AddVertex, 1.47, 3.05,-4.08
AddVertex,-1.17, 3.85,-1.96
AddVertex,-1.17, 3.85,-4.08
AddVertex,-1.47, 3.05,-4.08
AddVertex,-1.47, 3.05,-1.96
AddFace2,0,1,2,3,
AddFace2,4,5,6,7,
SetColor, 0, 0, 0, 128,
GenerateNormals,

CreateMeshBuilder,
AddVertex, 0.41, 4.26,-1.66
AddVertex,-0.41, 4.26,-1.66
AddVertex,-0.41, 4.00,-1.66
AddVertex, 0.41, 4.00,-1.66
AddVertex, 0.15, 3.62,-1.66
AddVertex,-0.15, 3.62,-1.66
AddVertex,-0.15, 3.04,-1.66
AddVertex, 0.15, 3.04,-1.66
AddVertex, 0.49, 4.26,-1.94
AddVertex, 0.49, 4.26,-1.74
AddVertex, 0.49, 4.00,-1.74
AddVertex, 0.49, 4.00,-1.94
AddVertex, 0.23, 3.62,-1.94
AddVertex, 0.23, 3.62,-1.74
AddVertex, 0.23, 3.04,-1.74
AddVertex, 0.23, 3.04,-1.94
AddVertex,-0.49, 4.26,-1.74
AddVertex,-0.49, 4.26,-1.94
AddVertex,-0.49, 4.00,-1.94
AddVertex,-0.49, 4.00,-1.74
AddVertex,-0.23, 3.62,-1.74
AddVertex,-0.23, 3.62,-1.94
AddVertex,-0.23, 3.04,-1.94
AddVertex,-0.23, 3.04,-1.74

AddFace2,0,1,2,3,
AddFace2,3,2,5,4,
AddFace2,4,5,6,7,
AddFace2,8,9,10,11,
AddFace2,11,10,13,12,
AddFace2,12,13,14,15,
AddFace2,16,17,18,19,
AddFace2,19,18,21,20,
AddFace2,20,21,22,23,
AddFace2,9,0,3,10,
AddFace2,10,3,4,13,
AddFace2,13,4,7,15,
AddFace2,1,16,18,2
AddFace2,2,18,20,5
AddFace2,5,20,23,6
SetColor, 65, 91, 110,

;----------Moteur----------

;Dessus
CreateMeshBuilder,
AddVertex,-0.771, 2.96, 6.76,
AddVertex, 0.771, 2.96, 6.76,
AddVertex, 0.771, 3.04, 5.94,
AddVertex,-0.771, 3.04, 5.94,
AddVertex, 0.771, 3.04,-5.94,
AddVertex,-0.771, 3.04,-5.94,
AddVertex, 0.771, 2.96,-6.76,
AddVertex,-0.771, 2.96,-6.76,
AddFace2,0,1,2,3,
AddFace2,3,2,4,5,
AddFace2,5,4,6,7,

LoadTexture,toit-m.png,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,0,0,
SetTextureCoordinates,2,0.06,0,
SetTextureCoordinates,3,0.06,1,
SetTextureCoordinates,4,0.94,0,
SetTextureCoordinates,5,0.94,1,
SetTextureCoordinates,6,1,0,
SetTextureCoordinates,7,1,1,
SetDecalTransparentColor,0,0,255,

;coté avant
CreateMeshBuilder,
AddVertex,-0.77, 3.04, 5.94,
AddVertex,-0.77, 3.04,-1.94,
AddVertex,-0.81, 3.00,-1.94,
AddVertex,-0.81, 3.00, 5.94,
AddVertex,-0.81, 2.86,-1.94,
AddVertex,-0.81, 2.86, 5.94,
AddVertex, 0.77, 3.04,-1.94,
AddVertex, 0.77, 3.04, 5.94,
AddVertex, 0.81, 3.00, 5.94,
AddVertex, 0.81, 3.00,-1.94,
AddVertex, 0.81, 2.86, 5.94,
AddVertex, 0.81, 2.86,-1.94,
AddFace2,0,1,2,3,
AddFace2,3,2,4,5,
AddFace2,6,7,8,9,
AddFace2,9,8,10,11,

LoadTexture,toit-ma.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,0.55,
SetTextureCoordinates,3,0,0.55,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetTextureCoordinates,6,0,0,
SetTextureCoordinates,7,1,0,
SetTextureCoordinates,8,1,0.55,
SetTextureCoordinates,9,0,0.55,
SetTextureCoordinates,10,1,1,
SetTextureCoordinates,11,0,1,

CreateMeshBuilder,
AddVertex,-0.77, 2.96, 6.76,
AddVertex,-0.77, 3.04, 5.94,
AddVertex,-0.81, 3.00, 5.94,
AddVertex,-0.81, 2.92, 6.76,
AddVertex,-0.81, 2.86, 5.94,
AddVertex,-0.81, 2.86, 6.76,
AddVertex, 0.77, 3.04, 5.94,
AddVertex, 0.77, 2.96, 6.76,
AddVertex, 0.81, 2.92, 6.76,
AddVertex, 0.81, 3.00, 5.94,
AddVertex, 0.81, 2.86, 6.76,
AddVertex, 0.81, 2.86, 5.94,
AddFace2,0,1,2,3,
AddFace2,3,2,4,5,
AddFace2,6,7,8,9,
AddFace2,9,8,10,11,
SetColor, 81, 111, 135,

;coté arrière
CreateMeshBuilder,
AddVertex,-0.77, 3.04,-4.10,
AddVertex,-0.77, 3.04,-5.94,
AddVertex,-0.81, 3.00,-5.94,
AddVertex,-0.81, 3.00,-4.10,
AddVertex,-0.81, 2.86,-5.94,
AddVertex,-0.81, 2.86,-4.10,
AddVertex, 0.77, 3.04,-5.94,
AddVertex, 0.77, 3.04,-4.10,
AddVertex, 0.81, 3.00,-4.10,
AddVertex, 0.81, 3.00,-5.94,
AddVertex, 0.81, 2.86,-4.10,
AddVertex, 0.81, 2.86,-5.94,
AddFace2,0,1,2,3,
AddFace2,3,2,4,5,
AddFace2,6,7,8,9,
AddFace2,9,8,10,11,

LoadTexture,toit-ma.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,0.55,
SetTextureCoordinates,3,0,0.55,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetTextureCoordinates,6,0,0,
SetTextureCoordinates,7,1,0,
SetTextureCoordinates,8,1,0.55,
SetTextureCoordinates,9,0,0.55,
SetTextureCoordinates,10,1,1,
SetTextureCoordinates,11,0,1,

CreateMeshBuilder,
AddVertex,-0.77, 3.04,-5.94,
AddVertex,-0.77, 2.96,-6.76,
AddVertex,-0.81, 2.92,-6.76,
AddVertex,-0.81, 3.00,-5.94,
AddVertex,-0.81, 2.86,-6.76,
AddVertex,-0.81, 2.86,-5.94,
AddVertex, 0.77, 2.96,-6.76,
AddVertex, 0.77, 3.04,-5.94,
AddVertex, 0.81, 3.00,-5.94,
AddVertex, 0.81, 2.92,-6.76,
AddVertex, 0.81, 2.86,-5.94,
AddVertex, 0.81, 2.86,-6.76,
AddFace2,0,1,2,3,
AddFace2,3,2,4,5,
AddFace2,6,7,8,9,
AddFace2,9,8,10,11,
SetColor, 81, 111, 135,

;Ventilo sur moteur
CreateMeshBuilder,
Cylinder, 70, 0.76, 0.76, 0.06,
Translate, 0, 3.07, 4.17,
SetColor,65, 91, 110,

CreateMeshBuilder,
AddVertex, 0.75, 3.101, 4.92,
AddVertex, 0.75, 3.101, 3.42,
AddVertex,-0.75, 3.101, 3.42,
AddVertex,-0.75, 3.101, 4.92,
AddFace2,0,1,2,3,

LoadTexture,soufle.png,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,1,1,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255,

CreateMeshBuilder,
Cylinder, 20, 0.11, 0.22, 0.04,
Translate, 0, 3.12, 4.17,
SetColor,65, 91, 110,

CreateMeshBuilder,
Cube, 0.36, 0.03, 0.58,
Translate, 0, 3.07, 2.34,
SetColor,65, 91, 110,

CreateMeshBuilder,
Cube, 0.36, 0.03, 0.58,
Translate, 0, 3.07, 1.10,
SetColor,65, 91, 110,

