//-	Head
PluginHeader{
	RailSimVersion = 2.11;
	PluginType = Struct;
	PluginName = "[防護柵]ガードケーブル01";
	PluginAuthor = "NyahoTaro";
	IconTexture = "../../Struct/common_nya/nyaicon.png";
	Description = "";
}

StructInfo{
}

DefineSwitch "モデル"{
	Entry = "終端_2m_L";
	Entry = "終端_2m_R";
	Entry = "▼予備";
	Entry = "▼予備";
	Entry = "▼予備";
	Entry = "▼予備";
	Entry = "中間_6m";
	Entry = "中間_12m";
	Entry = "中間_18m";
	Entry = "中間_24m";
	Entry = "▼予備";
	Entry = "▼予備";
	Entry = "▼予備";
	Entry = "▼予備";
	Entry = "支柱のみ";
	Entry = "ゲーブルのみ(1m)";
	Entry = "ゲーブルのみ(2m)";
	Entry = "ゲーブルのみ(3m)";
	Entry = "ゲーブルのみ(4m)";
	Entry = "ゲーブルのみ(5m)";
}

DefineSwitch "カラーリング"{
	Entry = "白色";
	Entry = "茶色";
	Entry = "黄色";
	Entry = "橙色";
	Entry = "灰色";
	Entry = "黒色";
}

DefineSwitch "土台"{
	Entry = "ON";
	Entry = "OFF";
}

DefineSwitch "設置基準"{
	Entry = "順";
	Entry = "逆";
}

DefineSwitch "▼予備1"{
}

DefineSwitch "▼予備2"{
}

DefineSwitch "▼予備3"{
}



//////////////////////
//-	Base
//////////////////////
PrimaryAssembly{
	Object3D "Base"{
		ModelFileName = "";
		If "_CAMDIST">600{	ChangeModel = "", 1.0;	}
		If !"土台"{
			ApplySwitch "モデル"{
			Case 0:			ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Base_EndL.x", 100.0;
			Case 1:			ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Base_EndR.x", 100.0;
			Case 2:			//予備
			Case 3:			//予備
			Case 4:			//予備
			Case 5:			//予備
			Case 6:			ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Base_6m.x", 100.0;
			Case 7:			ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Base_12m.x", 100.0;
			Case 8:			ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Base_18m.x", 100.0;
			Case 9:			ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Base_24m.x", 100.0;
			Case 10:		//予備
			Case 11:		//予備
			Case 12:		//予備
			Case 13:		//予備
			Case 14:		ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Base_6m.x", 100.0;
			}
		}
		ApplySwitch "設置基準"{
			Case 0:
			ApplySwitch "モデル"{
				Case 6,7,8,9:
							StaticMove{		Displacement = (0.0, 0.0, 3.0);	}
			}
			Case 1:
			ApplySwitch "モデル"{
				Case 0:		StaticMove{		Displacement = (0.0, 0.0, -3.0);	}
				Case 1:		StaticMove{		Displacement = (0.0, 0.0, 3.0);		}
				Case 2:		//予備
				Case 3:		//予備
				Case 4:		//予備
				Case 5:		//予備
				Case 6:		StaticMove{		Displacement = (0.0, 0.0, -3.0);	}
				Case 7:		StaticMove{		Displacement = (0.0, 0.0, -9.0);	}
				Case 8:		StaticMove{		Displacement = (0.0, 0.0, -15.0);	}
				Case 9:		StaticMove{		Displacement = (0.0, 0.0, -21.0);	}
				Case 15:	StaticMove{		Displacement = (0.0, 0.0, -1.0);	}
				Case 16:	StaticMove{		Displacement = (0.0, 0.0, -2.0);	}
				Case 17:	StaticMove{		Displacement = (0.0, 0.0, -3.0);	}
				Case 18:	StaticMove{		Displacement = (0.0, 0.0, -4.0);	}
				Case 19:	StaticMove{		Displacement = (0.0, 0.0, -5.0);	}
			}
		}
		Joint3D "_LOCAL"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}

//////////////////////
//-	Main
//////////////////////
	Object3D "Main"{
		ModelFileName = "";	ModelScale = 100.0;
		ApplySwitch "モデル"{
		Case 0:		ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_EndL_3m.x", 100.0;
		Case 1:		ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_EndR_3m.x", 100.0;
		Case 2:		//予備
		Case 3:		//予備
		Case 4:		//予備
		Case 5:		//予備
		Case 6:		ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Main_6m.x", 100.0;
		Case 7:		ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Main_12m.x", 100.0;
		Case 8:		ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Main_18m.x", 100.0;
		Case 9:		ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Main_24m.x", 100.0;
		Case 10:	//予備
		Case 11:	//予備
		Case 12:	//予備
		Case 13:	//予備
		Case 14:	ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Pole.x", 100.0;
		Case 15:	ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Wire_1m.x", 100.0;
		Case 16:	ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Wire_2m.x", 100.0;
		Case 17:	ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Wire_3m.x", 100.0;
		Case 18:	ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Wire_4m.x", 100.0;
		Case 19:	ChangeModel = "../../Struct/nya_Road-Ver1_cm/GuardCable/GC_Wire_5m.x", 100.0;
		}
/*LOD仕様
		ApplySwitch "モデル"{
		Case 0:		If "_CAMDIST"<81{					ChangeModel = "hogehoge.x", 100.0;	}
					If "_CAMDIST">80 & "_CAMDIST"<601 {	ChangeModel = "piyopiyo.x", 100.0;	}
					If "_CAMDIST">600{					ChangeModel = "", 100.0;	}
		}
*/
		ApplySwitch "カラーリング"{
		Case 0://白色
			ChangeMaterial{
				MaterialID = 1,2;
				Diffuse = 1.00, 1.00, 1.00, 1.0;
				Ambient = 1.00, 1.00, 1.00;
			}
		Case 1://茶色
			ChangeMaterial{
				MaterialID = 1,2;
				Diffuse = 0.25, 0.21, 0.18, 1.0;
				Ambient = 0.25, 0.21, 0.18;
			}
		Case 2://黄色
			ChangeMaterial{
				MaterialID = 1,2;
				Diffuse = 0.75, 0.52, 0.06, 1.0;
				Ambient = 0.75, 0.52, 0.06;
			}
		Case 3://橙色
			ChangeMaterial{
				MaterialID = 1,2;
				Diffuse = 0.63, 0.23, 0.07, 1.0;
				Ambient = 0.63, 0.23, 0.07;
			}
		Case 4://灰色
			ChangeMaterial{
				MaterialID = 1,2;
				Diffuse = 0.50, 0.50, 0.50, 1.0;
				Ambient = 0.50, 0.50, 0.50;
			}
		Case 5://黒色
			ChangeMaterial{
				MaterialID = 1,2;
				Diffuse = 0.10, 0.10, 0.10, 1.0;
				Ambient = 0.10, 0.10, 0.10;
			}
		}
		Joint3D "Base"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
}


//=============================================================================
//-	【メモ】
//		・視点から80m以上600m以内の場合、LODモデルへ。
//		・視点から600m以上離れた場合非表示に。
//		・テクスチャは元ファイルから50%縮小した上でDDS(DXT1)で保存。
//		・"//-"はアウトライン用。
//
//=============================================================================
