;//松浦電鉄３０００系　中間付随車,,,,
;------ボディ------,,,,
CreateMeshBuilder,,;//後面,,
AddVertex   ,-1.4,1,-17.5,
AddVertex   ,1.4,1,-17.5,
AddVertex   ,1.4,3.55,-17.5,
AddVertex   ,-1.4,3.55,-17.5,
AddFace,0,3,2,1
GenerateNormals,,,,

LoadTexture,3000-back.bmp,,,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,1,1,
SetTextureCoordinates,2,1,0.09,
SetTextureCoordinates,3,0,0.09,


CreateMeshBuilder,,;//後面,,,,,,
AddVertex,1.4,3.55,-17.5,,,,,
AddVertex,1.35,3.6,-17.5,,,,,
AddVertex,0.9,3.7,-17.5,,,,,
AddVertex,0.5,3.75,-17.5,,,,,
AddVertex,-0.5,3.75,-17.5,,,,,
AddVertex,-0.9,3.7,-17.5,,,,,
AddVertex,-1.35,3.6,-17.5,,,,,
AddVertex,-1.4,3.55,-17.5,,,,,
AddFace,0,7,6,5,4,3,2,1
SetColor,255,247,220,,,,,
GenerateNormals,,,,,,,,


CreateMeshBuilder,,;//左側面,,,,,,
AddVertex,1.4,1,-17.5,;0
AddVertex,1.4,3.55,-17.5,;1
AddVertex,1.4,3.55,0,;2
AddVertex,1.4,1,0,;3
AddVertex,1.35,3.6,-17.5,;4
AddVertex,1.35,3.6,0,;5
AddFace,0,1,2,3
AddFace,1,4,5,2
GenerateNormals,,,,

LoadTexture,3000T-side.bmp,,,
SetTextureCoordinates,0,0.003,1,
SetTextureCoordinates,1,0.003,0.02,
SetTextureCoordinates,2,1,0.02,
SetTextureCoordinates,3,1,1,
SetTextureCoordinates,4,0.003,0.01,
SetTextureCoordinates,5,1,0.01,


CreateMeshBuilder,,;//左側面転落防止柵,,
AddVertex     ,1.4,1.2,0,
AddVertex     ,1.4,2.4,0,
AddVertex     ,1.4,2.4,0.2,
AddVertex     ,1.4,1.2,0.2,
AddVertex     ,1.4,1.2,-17.5,
AddVertex     ,1.4,2.4,-17.5,
AddVertex     ,1.4,2.4,-17.7,
AddVertex     ,1.4,1.2,-17.7,
AddFace2,0,1,2,3
AddFace2,4,5,6,7
SetColor,180,180,180,
GenerateNormals,,,,


CreateMeshBuilder,,;//左側面行先表示,,
AddVertex  ,1.41,3.24,-6.46,
AddVertex  ,1.41,3.5,-6.46,
AddVertex  ,1.41,3.5,-5.46,
AddVertex  ,1.41,3.24,-5.46,
AddFace,0,1,2,3
GenerateNormals,,,,

LoadTexture,ikisaki.bmp,,,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,0,0,
SetTextureCoordinates,2,1,0,
SetTextureCoordinates,3,1,1,
SetDecalTransparentColor,0,0,255,


CreateMeshBuilder,,;//右側面,,
AddVertex,-1.4,1,-17.5,;0
AddVertex,-1.4,3.55,-17.5,;1
AddVertex,-1.4,3.55,0,;2
AddVertex,-1.4,1,0,;3
AddVertex,-1.35,3.6,-17.5,;4
AddVertex,-1.35,3.6,0,;5
AddFace,0,3,2,1
AddFace,1,2,5,4
GenerateNormals,,,,

LoadTexture,3000T-side.bmp,,,
SetTextureCoordinates,0,0.003,1,
SetTextureCoordinates,1,0.003,0.02,
SetTextureCoordinates,2,1,0.02,
SetTextureCoordinates,3,1,1,
SetTextureCoordinates,4,0.003,0.01,
SetTextureCoordinates,5,1,0.01,


CreateMeshBuilder,,;//右側面転落防止柵,,
AddVertex     ,-1.4,1.2,0,
AddVertex     ,-1.4,2.4,0,
AddVertex     ,-1.4,2.4,0.2,
AddVertex     ,-1.4,1.2,0.2,
AddVertex     ,-1.4,1.2,-17.5,
AddVertex     ,-1.4,2.4,-17.5,
AddVertex     ,-1.4,2.4,-17.7,
AddVertex     ,-1.4,1.2,-17.7,
AddFace2,0,1,2,3
AddFace2,4,5,6,7
SetColor,180,180,180,
GenerateNormals,,,,


CreateMeshBuilder,,;//右側面行先表示,,
AddVertex  ,-1.41,3.24,-6.46,
AddVertex  ,-1.41,3.5,-6.46,
AddVertex  ,-1.41,3.5,-5.46,
AddVertex  ,-1.41,3.24,-5.46,
AddFace,0,3,2,1
GenerateNormals,,,,

LoadTexture,ikisaki.bmp,,,
SetTextureCoordinates,0,1,1,
SetTextureCoordinates,1,1,0,
SetTextureCoordinates,2,0,0,
SetTextureCoordinates,3,0,1,
SetDecalTransparentColor,0,0,255,


CreateMeshBuilder,,;//後面,,
AddVertex   ,-1.4,1,0,
AddVertex   ,1.4,1,0,
AddVertex   ,1.4,3.55,0,
AddVertex   ,-1.4,3.55,0,
AddFace,0,1,2,3
GenerateNormals,,,,

LoadTexture,3000-back.bmp,,,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,1,1,
SetTextureCoordinates,2,1,0.09,,,,,
SetTextureCoordinates,3,0,0.09,,,,,


CreateMeshBuilder,,;//後面,,,,,,
AddVertex,1.4,3.55,0,,,,,
AddVertex,1.35,3.6,0,,,,,
AddVertex,0.9,3.7,0,,,,,
AddVertex,0.5,3.75,0,,,,,
AddVertex,-0.5,3.75,0,,,,,
AddVertex,-0.9,3.7,0,,,,,
AddVertex,-1.35,3.6,0,,,,,
AddVertex,-1.4,3.55,0,,,,,
AddFace,0,1,2,3,4,5,6,7
SetColor,255,247,220,,,,,
GenerateNormals,,,,,,,,


CreateMeshBuilder,,;//連結幌,,
AddVertex     ,0.45,1.22,0,;0
AddVertex     ,0.45,3.2,0,;1
AddVertex     ,0.45,3.2,0.5,;2
AddVertex     ,0.45,1.22,0.5,;3
AddVertex     ,-0.45,1.22,0,;4
AddVertex     ,-0.45,3.2,0,;5
AddVertex     ,-0.45,3.2,0.5,;6
AddVertex     ,-0.45,1.22,0.5,;7
AddVertex     ,0.38,3.27,0,;8
AddVertex     ,-0.38,3.27,0,;9
AddVertex     ,-0.38,3.27,0.5,;10
AddVertex     ,0.38,3.27,0.5,;11
AddVertex     ,0.38,1.15,0,;12
AddVertex     ,-0.38,1.15,0,;13
AddVertex     ,-0.38,1.15,0.5,;14
AddVertex     ,0.38,1.15,0.5,;15
AddFace2,0,1,2,3
AddFace2,4,5,6,7
AddFace2,8,9,10,11
AddFace2,12,13,14,15
AddFace2,1,8,11,2
AddFace2,5,9,10,6
AddFace2,12,0,3,15
AddFace2,13,4,7,14
SetColor,50,50,50,
GenerateNormals,,,,


CreateMeshBuilder,,;//底面,,
AddVertex,-1.4,1,-17.5,;0
AddVertex,-1.4,1,0,;1
AddVertex,1.4,1,0,;2
AddVertex,1.4,1,-17.5,;3
AddFace,0,3,2,1
SetColor,0,0,0,
GenerateNormals,,,,


;------屋根------,,,,
CreateMeshBuilder,,;//屋根,,
AddVertex,-1.35,3.6,-17.5,
AddVertex,1.35,3.6,-17.5,
AddVertex,-0.9,3.7,-17.5,
AddVertex,0.9,3.7,-17.5,
AddVertex,-0.5,3.75,-17.5,
AddVertex,0.5,3.75,-17.5,
AddVertex,-1.35,3.6,0,
AddVertex,1.35,3.6,0,
AddVertex,-0.9,3.7,0,
AddVertex,0.9,3.7,0,
AddVertex,-0.5,3.75,0,
AddVertex,0.5,3.75,0,
AddFace,1,3,9,7
AddFace,3,5,11,9
AddFace,5,4,10,11
AddFace,4,2,8,10
AddFace,2,0,6,8
SetColor,120,120,120,
GenerateNormals,,,,


;------屋根上機器------,,,,
CreateMeshBuilder,,;//屋根上機器,,
AddVertex ,1.05,3.6,-10.9,;0
AddVertex ,1.05,3.85,-10.9,;1
AddVertex ,1.05,3.85,-6.6,;2
AddVertex ,1.05,3.6,-6.6,;3
AddVertex ,0.6,4.03,-10.9,;4
AddVertex ,0.6,4.03,-6.6,;5
AddVertex ,0,4.12,-6.6,;6
AddVertex ,0,4.12,-10.9,;7
AddVertex ,-0.6,4.03,-10.9,;8
AddVertex ,-0.6,4.03,-6.6,;9
AddVertex ,-1.05,3.6,-10.9,;10
AddVertex ,-1.05,3.85,-10.9,;11
AddVertex ,-1.05,3.85,-6.6,;12
AddVertex ,-1.05,3.6,-6.6,;13
AddFace,0,1,2,3
AddFace,1,4,5,2
AddFace,4,7,6,5
AddFace,7,8,9,6
AddFace,8,11,12,9
AddFace,11,10,13,12
GenerateNormals,,,,

LoadTexture,..\common-texture\cooler.bmp,,,
SetTextureCoordinates,0,0,0,
SetTextureCoordinates,1,0,0.1,
SetTextureCoordinates,2,1,0.1,
SetTextureCoordinates,3,1,0,
SetTextureCoordinates,4,0,0.3,
SetTextureCoordinates,5,1,0.3,
SetTextureCoordinates,6,1,0.5,
SetTextureCoordinates,7,0,0.5
SetTextureCoordinates,8,0,0.7
SetTextureCoordinates,9,1,0.7
SetTextureCoordinates,10,0,1
SetTextureCoordinates,11,0,0.9
SetTextureCoordinates,12,1,0.9
SetTextureCoordinates,13,1,1


CreateMeshBuilder,,;//屋根上機器,
AddVertex ,-1.05,3.6,-10.9
AddVertex ,-1.05,3.85,-10.9
AddVertex ,-0.6,4.03,-10.9
AddVertex ,0,4.12,-10.9
AddVertex ,0.6,4.03,-10.9
AddVertex ,1.05,3.85,-10.9
AddVertex ,1.05,3.6,-10.9,,,,
AddVertex ,-1.05,3.6,-6.6,,,,
AddVertex ,-1.05,3.85,-6.6,,,,
AddVertex ,-0.6,4.03,-6.6,,,,
AddVertex ,0,4.12,-6.6,,,,
AddVertex ,0.6,4.03,-6.6,,,,
AddVertex ,1.05,3.85,-6.6,,,,
AddVertex ,1.05,3.6,-6.6,,,,
AddFace2,0,1,2,3,4,5,6
AddFace2,7,8,9,10,11,12,13
GenerateNormals,,,,,,,


;------連結器------,,,,,,,
CreateMeshBuilder,,;//前面連結器,,,,,
AddVertex ,-0.18,1.05,-17.75,,,,
AddVertex ,0.18,1.05,-17.75,
AddVertex ,0.18,0.7,-17.75,
AddVertex ,-0.18,0.7,-17.75,
AddVertex ,-0.18,1.05,-17.5,
AddVertex ,0.18,1.05,-17.5,
AddVertex ,0.18,0.7,-17.5,
AddVertex ,-0.18,0.7,-17.5,
AddFace,0,4,5,1
AddFace,2,1,5,6
AddFace,3,7,4,0
AddFace,2,3,0,1
SetColor,25,25,25,
GenerateNormals,,,,


CreateMeshBuilder,,;//後面連結器,,
AddVertex ,-0.18,1.05,0.25,
AddVertex ,0.18,1.05,0.25,
AddVertex ,0.18,0.7,0.25,
AddVertex ,-0.18,0.7,0.25,
AddVertex ,-0.18,1.05,0,
AddVertex ,0.18,1.05,0,
AddVertex ,0.18,0.7,0,
AddVertex ,-0.18,0.7,0,
AddFace,0,1,5,4
AddFace,2,6,5,1
AddFace,3,0,4,7
AddFace,2,1,0,3
SetColor,25,25,25,
GenerateNormals,,,,


;------床下機器------,,,,
CreateMeshBuilder,,;//左側床下機器,,
AddVertex     ,1.15,0.3,-12.8,
AddVertex     ,1.15,1,-12.8,
AddVertex     ,1.15,1,-4.8,
AddVertex     ,1.15,0.3,-4.8,
AddFace,0,1,2,3
GenerateNormals,,,,

LoadTexture,T-under.bmp,,,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,0,0,
SetTextureCoordinates,2,1,0,
SetTextureCoordinates,3,1,1,


CreateMeshBuilder,,;//右側床下機器,,
AddVertex     ,-1.15,0.3,-12.8,
AddVertex     ,-1.15,1,-12.8,
AddVertex     ,-1.15,1,-4.8,
AddVertex     ,-1.15,0.3,-4.8,
AddFace,0,3,2,1
GenerateNormals,,,,

LoadTexture,T-under.bmp,,,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,0,0,
SetTextureCoordinates,2,1,0,
SetTextureCoordinates,3,1,1,


CreateMeshBuilder,,;//床下機器,,
AddVertex     ,-1.15,0.3,-12.8,
AddVertex     ,-1.15,1,-12.8,
AddVertex     ,1.15,1,-12.8,
AddVertex     ,1.15,0.3,-12.8,
AddVertex     ,-1.15,0.3,-4.8,
AddVertex     ,-1.15,1,-4.8,
AddVertex     ,1.15,1,-4.8,
AddVertex     ,1.15,0.3,-4.8,
AddFace,0,1,2,3
AddFace,4,7,6,5
SetColor,100,100,100,
GenerateNormals,,,,

LoadTexture,T-under.bmp,,,
SetTextureCoordinates,0,0.01,1,
SetTextureCoordinates,1,0.01,0,
SetTextureCoordinates,2,0.02,0
SetTextureCoordinates,3,0.02,1
SetTextureCoordinates,4,0.01,1
SetTextureCoordinates,5,0.01,0
SetTextureCoordinates,6,0.02,0
SetTextureCoordinates,7,0.02,1


CreateMeshBuilder,,;//床下機器,
Cube,0.8,0.15,0.5
SetColor,38,34,28
Translate ,0,0.85,-0.5
GenerateNormals,,,


CreateMeshBuilder,,;//床下機器,
Cube,0.8,0.15,0.5,
SetColor,38,34,28,
Translate ,0,0.85,-17,
GenerateNormals,,,,


;------影------,,,,
CreateMeshBuilder,,;//影,,
AddVertex   ,-1.4,-0.1,-17.5,
AddVertex   ,-1.4,-0.1,0.5,
AddVertex   ,1.4,-0.1,0.5,
AddVertex   ,1.4,-0.1,-17.5,
AddFace,0,1,2,3
SetColor,0,0,0,150
GenerateNormals,,,,
