;//舞浜地下鉄２０系　中間付随車,,,,
;------ボディ------,,,,
CreateMeshBuilder,,;//正面,,
AddVertex   ,-1.4,1,-17.5,
AddVertex   ,1.4,1,-17.5,
AddVertex   ,1.4,3.6,-17.5,
AddVertex   ,-1.4,3.6,-17.5,
AddFace,0,3,2,1
GenerateNormals,,,,

LoadTexture,20-back.bmp,,,
SetTextureCoordinates,0,0,1,
SetTextureCoordinates,1,1,1,
SetTextureCoordinates,2,1,0.11,
SetTextureCoordinates,3,0,0.11,


CreateMeshBuilder,,;//正面,,,
AddVertex   ,-1.4,3.6,-17.5,,
AddVertex   ,1.4,3.6,-17.5,,
AddVertex   ,0,3.75,-17.5,,
AddVertex   ,1,3.7,-17.5,,
AddVertex   ,-1,3.7,-17.5,,
AddFace,0,4,2,3,1
SetColor,240,240,240,,
GenerateNormals,,,,,


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

LoadTexture,20T-side.bmp,,,
SetTextureCoordinates,0,0.005,0.995,
SetTextureCoordinates,1,0.005,0,
SetTextureCoordinates,2,1,0,
SetTextureCoordinates,3,1,0.995,


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,150,150,150,
GenerateNormals,,,,


CreateMeshBuilder,,;//左側面行先表示,,
AddVertex  ,1.41,3.24,-7.22,
AddVertex  ,1.41,3.5,-7.22,
AddVertex  ,1.41,3.5,-6.12,
AddVertex  ,1.41,3.24,-6.12,
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,
AddVertex   ,-1.4,3.6,-17.5,
AddVertex   ,-1.4,3.6,0,
AddVertex   ,-1.4,1,0,
AddFace,0,3,2,1
GenerateNormals,,,

LoadTexture,20T-side.bmp,,
SetTextureCoordinates,0,0.005,0.995
SetTextureCoordinates,1,0.005,0
SetTextureCoordinates,2,1,0
SetTextureCoordinates,3,1,0.995


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,150,150,150,
GenerateNormals,,,,


CreateMeshBuilder,,;//右側面行先表示,,
AddVertex  ,-1.41,3.24,-7.22,
AddVertex  ,-1.41,3.5,-7.22,
AddVertex  ,-1.41,3.5,-6.12,
AddVertex  ,-1.41,3.24,-6.12,
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.6,0,
AddVertex   ,-1.4,3.6,0,
AddFace,0,1,2,3
GenerateNormals,,,,

LoadTexture,20-back.bmp,,,,
SetTextureCoordinates,0,0,1,,
SetTextureCoordinates,1,1,1,,
SetTextureCoordinates,2,1,0.11,,
SetTextureCoordinates,3,0,0.11,,


CreateMeshBuilder,,;//後面,,,
AddVertex   ,-1.4,3.6,0,,
AddVertex   ,1.4,3.6,0,,
AddVertex   ,0,3.75,0,,
AddVertex   ,1,3.7,0,,
AddVertex   ,-1,3.7,0,,
AddFace,0,1,3,2,4
SetColor,240,240,240,,
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.4,
AddVertex   ,-1.4,1,0,
AddVertex   ,1.4,1,0,
AddVertex   ,1.4,1,-17.4,
AddVertex   ,-1.3,1,-17.5,
AddVertex   ,1.3,1,-17.5,
AddFace,0,3,2,1
AddFace,4,5,3,0
SetColor,0,0,0,
GenerateNormals,,,,


;------屋根------,,,,
CreateMeshBuilder,,;//屋根,,
AddVertex   ,-1,3.7,0,;0
AddVertex   ,1,3.7,0,;1
AddVertex   ,1,3.7,-17.5,;2
AddVertex   ,-1,3.7,-17.5,;3
AddVertex   ,-1.4,3.6,0,;4
AddVertex   ,-1,3.7,0,;5
AddVertex   ,-1,3.7,-17.5,;6
AddVertex   ,-1.4,3.6,-17.5,;7
AddVertex   ,1.4,3.6,-17.5,;8
AddVertex   ,1,3.7,-17.5,;9
AddVertex   ,1,3.7,0,;10
AddVertex   ,1.4,3.6,0,;11
AddVertex   ,0,3.75,0,;12
AddVertex   ,0,3.75,-17.5,;13
AddFace,2,13,12,1
AddFace,4,5,6,7
AddFace,8,9,10,11
AddFace,13,3,0,12
SetColor,110,110,110,
GenerateNormals,,,,


;------屋根機器------,,,,
CreateMeshBuilder,,;//屋根上機器,,
AddVertex,0.75,3.7,-13.92,
AddVertex,0.65,3.95,-13.85,
AddVertex,0.65,3.95,-3.65,
AddVertex,0.75,3.7,-3.58,
AddVertex,-0.75,3.7,-13.92,
AddVertex,-0.65,3.95,-13.85,
AddVertex,-0.65,3.95,-3.65,
AddVertex,-0.75,3.7,-3.58,
AddFace,0,1,2,3
AddFace,4,7,6,5
GenerateNormals,,,,

LoadTexture,cooler.bmp,,,
SetTextureCoordinates,0,1,1,
SetTextureCoordinates,1,0.993,0,
SetTextureCoordinates,2,0.007,0,
SetTextureCoordinates,3,0,1,
SetTextureCoordinates,4,1,1,
SetTextureCoordinates,5,0.993,0,
SetTextureCoordinates,6,0.007,0,
SetTextureCoordinates,7,0,1,


CreateMeshBuilder,,;//屋根上機器,,
AddVertex,-0.65,3.95,-3.65,;0
AddVertex,-0.65,3.95,-13.85,;1
AddVertex,0.65,3.95,-13.85,;2,,
AddVertex,0.65,3.95,-3.65,;3,,
AddVertex,-0.25,4.03,-3.65,;4,,
AddVertex,-0.25,4.03,-13.85,;5,,
AddVertex,0.25,4.03,-13.85,;6,,
AddVertex,0.25,4.03,-3.65,;7,,
AddVertex,-0.75,3.7,-3.58,;8,,
AddVertex,-0.75,3.7,-13.92,;9,,
AddVertex,0.75,3.7,-3.58,;10,,
AddVertex,0.75,3.7,-13.92,;11,,
AddFace,3,2,6,7,,
AddFace,7,6,5,4,,
AddFace,4,5,1,0,,
AddFace,9,1,5,6,2,11
AddFace,8,10,3,7,4,0
SetColor,150,150,150,,,
GenerateNormals,,,,


;------連結器------,,,,
CreateMeshBuilder,,;//前面連結器,,
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,
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,
AddFace,0,1,5,4
AddFace,2,6,5,1
AddFace,3,0,4,7
AddFace,4,5,6,7
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,,,,
