; ----------
; EM A1 3D
; ----------

[Object]
States = a1.csv
Position = 0, 0, 0

[Object]
States = condotta.csv
Position = -0.45, 1.05, -8.20
;Position = -0.45, 1.05, -7.42;per raddrizzarla
;RotateXDirection=1,0,0
;RotateXFunction=1.5

[Object]
States = condotta.csv
Position = 0.45, 1.05, -8.20

; ---------
; amperometro
; ---------

[Object]
States = meter.csv
Position = -0.82,1.975,7.73;+0.06

[Object]; amperometro
States = needle_n.csv
Position = -0.862,1.95,7.72
RotateZDirection=0,0,-1
;RotateZFunction = if [ abs[speed] < pluginstate[200] * 30.125 , pluginstate[200] * 0.125 - abs[speed]/30 + 1.235 , pluginstate[200] * 0.125  + 1.23 ]; 50 km/h = 13,(8) m/s
;RotateZFunction = pluginstate[200] * 0.0625 + 0.425 * abs[accelerationMotor]- 1.6; max accelerazione circa 2
RotateZFunction = 0.001 + 0.8 * abs[accelerationMotor]- 1.6; max accelerazione circa 2
RotateZDamping = 2, 0.6

[Object]; voltmetro
States = needle_n.csv
Position = -0.695,1.95,7.72;0.47, 2.38, 7.82
RotateZDirection=0,0,-1
RotateZFunction = pluginstate[200] * 0.0999999 - 1.6
RotateZDamping = 2, 0.6

; -----
; wiper
; -----
[Object]
States = Wiper.csv
Position = -0.6, 1.75, 7.83
RotateZFunction = pluginstate[199]/155
[Object]
States = Wiper.csv
Position = 0.63, 1.75, -7.83
RotateZFunction = pluginstate[199]/155

; -----
; scatola wiper
; -----
[Object]
States = scatola_Wiper.csv
Position = -0.55, 1.95, 7.75

; -----
; comando wiper
; -----
[Object]
States = comando_Wiper.csv
Position = -0.55, 1.95, 7.70
RotateZDirection=0,0,-1
RotateZFunction = if[pluginstate[199]>0,1,0]
RotateZDamping = 12, 0.6

; --------
; drops pluginrange 201-230
; --------

[Object] 
Position =-0.5403,2.6641,7.83
States = drop0.csv,drop2.csv
StateFunction = PluginState[201]

[Object] 
Position =-0.7317,2.3507,7.83			
States = drop0.csv,drop4.csv
StateFunction = PluginState[202]

[Object] 
Position =-0.7678,1.8662,7.83			
States = drop0.csv,drop3.csv
StateFunction = PluginState[203]

[Object] 
Position =-0.8232,2.5006,7.83			
States = drop0.csv,drop1.csv
StateFunction = PluginState[204]

[Object] 
Position =-0.7256,2.4569,7.83			
States = drop0.csv,drop1.csv
StateFunction = PluginState[205]

[Object] 
Position =-0.5144,2.5683,7.83			
States = drop0.csv,drop1.csv
StateFunction = PluginState[206]

[Object] 
Position =-0.55,2.0855,7.83
States = drop0.csv,drop4.csv
StateFunction = PluginState[207]

[Object] 
Position =-0.4168,2.4131,7.83
States = drop0.csv,drop2.csv
StateFunction = PluginState[208]

[Object] 
Position =-0.4751,2.6982,7.83
States = drop0.csv,drop4.csv
StateFunction = PluginState[209]

[Object] 
Position =-0.8829,2.3924,7.83
States = drop0.csv,drop3.csv
StateFunction = PluginState[210]

[Object] 
Position =-0.334,1.9274,7.83
States = drop0.csv,drop1.csv
StateFunction = PluginState[211]

[Object] 
Position =-0.6406,2.3715,7.83
States = drop0.csv,drop3.csv
StateFunction = PluginState[212]

[Object] 
Position =-0.6072,2.2446,7.83
States = drop0.csv,drop4.csv
StateFunction = PluginState[213]

[Object] 
Position =-0.65,2.1317,7.83
States = drop0.csv,drop1.csv
StateFunction = PluginState[214]

[Object] 
Position =-0.402,2.3128,7.83
States = drop0.csv,drop2.csv
StateFunction = PluginState[215]

[Object] 
Position =-0.3092,1.7767,7.83
States = drop0.csv,drop2.csv
StateFunction = PluginState[216]

[Object] 
Position =-0.8772,2.3748,7.83
States = drop0.csv,drop3.csv
StateFunction = PluginState[217]

[Object] 
Position =-0.3168,2.0565,7.83
States = drop0.csv,drop2.csv
StateFunction = PluginState[218]

[Object] 
Position =-0.4934,2.1617,7.83
States = drop0.csv,drop4.csv
StateFunction = PluginState[219]

[Object] 
Position =-0.5175,2.0791,7.83
States = drop0.csv,drop4.csv
StateFunction = PluginState[220]

[Object] 
Position =-0.3821,2.4114,7.83
States = drop0.csv,drop1.csv
StateFunction = PluginState[221]

[Object] 
Position =-0.3799,1.7714,7.83
States = drop0.csv,drop3.csv
StateFunction = PluginState[222]

[Object] 
Position =-0.3305,1.7872,7.83
States = drop0.csv,drop2.csv
StateFunction = PluginState[223]

[Object] 
Position =-0.3226,1.7454,7.83
States = drop0.csv,drop2.csv
StateFunction = PluginState[224]

[Object] 
Position =-0.8933,2.1403,7.83
States = drop0.csv,drop3.csv
StateFunction = PluginState[225]

[Object] 
Position =-0.4145,2.0594,7.83
States = drop0.csv,drop3.csv
StateFunction = PluginState[226]

[Object] 
Position =-0.854,2.3813,7.83
States = drop0.csv,drop3.csv
StateFunction = PluginState[227]

[Object] 
Position =-0.3386,2.0984,7.83
States = drop0.csv,drop2.csv
StateFunction = PluginState[228]

[Object] 
Position =-0.8606,1.8227,7.83
States = drop0.csv,drop2.csv
StateFunction = PluginState[229]

[Object] 
Position =-0.3812,2.0921,7.83
States = drop0.csv,drop1.csv
StateFunction = PluginState[230]

; -----
; porte
; -----

[object];anteriore dx 
states = porta_ant_dx.csv
position = .93,0.9,6.02
rotateydirection = 0, 1, 0
rotateyfunction = (rightDoors) * 1.5; - 0.2
rotateydamping = 20, 0.8

[object];anteriore sx
states = porta_ant_sx.csv
position = -.93,0.9,6.02
rotateydirection = 0, -1, 0
rotateyfunction = (leftDoors) * 1.5; - 0.2
rotateydamping = 20, 0.8

[object];posteriore dx 
states = porta_post_dx.csv
position = .93,0.9,-6.02
rotateyfunction = (rightDoors) * 1.5; - 0.2
rotateydirection = 0, -1, 0
rotateydamping = 20, 0.8

[object];posteriore sx
states = porta_post_sx.csv
position = -.93,0.9,-6.02
rotateyfunction = (leftDoors) * 1.5; - 0.2
rotateydirection = 0, 1, 0
rotateydamping = 20, 0.8

;-------
; sedili
;-------

[object]
states = sedili_fronte.csv
position = 0,0,5.9

[object]
states = sedili.csv
position = 0,0,4.275

[object]
states = sedili.csv
position = 0,0,2.6

[object]
states = sedili.csv
position = 0,0,0.9

[object]
states = sedili.csv
position = 0,0,-.9

[object]
states = sedili.csv
position = 0,0,-2.6

[object]
states = sedili.csv
position = 0,0,-4.275

[object]
states = sedili_retro.csv
position = 0,0,-5.9

;-----
;ruote
;-----
[Object]
Position = 0, 0.465, 5.85
States = ruote_raggi.csv
RotateXDirection = 1, 0, 0
RotateXFunction = value + delta * speedometer / 0.465
RotateXDamping = 1, 1

[Object]
Position = 0, 0.465, 4.05
States = ruote_raggi.csv
RotateXDirection = 1, 0, 0
RotateXFunction = value + delta * speedometer / 0.465
RotateXDamping = 1, 1

[Object]
Position = 0,0.465, -4.05
States = ruote_raggi.csv
RotateXDirection = 1, 0, 0
RotateXFunction = value + delta * speedometer / 0.465
RotateXDamping = 1, 1

[Object]
Position = 0,0.465, -5.85
States = ruote_raggi.csv
RotateXDirection = 1, 0, 0
RotateXFunction = value + delta * speedometer / 0.465
RotateXDamping = 1, 1

;----------
; lampade
;----------

[object]; lampade
states = lampada.csv
position = 0,3.55,6
[object]
states = lampada.csv
position = 0,3.55,3
[object]
states = lampada.csv
position = 0,3.55,0
[object]
states = lampada.csv
position = 0,3.55,-3
[object]
states = lampada.csv
position = 0,3.55,-6



; --------------
; pantografo
; --------------

[Object];fisso 
Position = 0, 5.49, 4.70
States = pant_contatto.csv
TranslateYFunction = if[reverserNotch == 0, if[value > -0.94, value - 0.01325, -0.94], if[value < 0, value + 0.01325, 0]]

[Object]; anteriore superiore
Position = 0, 5.05, 5.35
States = pant_ant_sup.csv
TranslateYFunction = if[reverserNotch == 0, if[value > -0.75, value - 0.01, -0.75], if[value < 0, value + 0.01, 0]]
;TranslateYFunction = if[reverserNotch == 0, if[value > -0.45, value - 0.01, -0.45], if[value < 0, value + 0.01, 0]]
RotateXDirection = 1,0,0
RotateXFunction = if[reverserNotch == 0, if[value > -0.29, value - 0.0056, -0.29], if[value < 0, value + 0.0056, 0]]
TranslateZDirection = 0, 0, 1
TranslateZFunction = if[reverserNotch == 0, if[value < 0.12, value + 0.0017, 0.12], if[value > 0, value - 0.0017, 0]]; ^^^^^^ 0.06 per correggere estensione

[Object]; posteriore superiore
Position = 0, 5.05, 4.15
States = pant_post_sup.csv
TranslateYFunction = if[reverserNotch == 0, if[value > -0.75, value - 0.01, -0.75], if[value < 0, value + 0.01, 0]]
;TranslateYFunction = if[reverserNotch == 0, if[value > -0.45, value - 0.01, -0.45], if[value < 0, value + 0.01, 0]]
RotateXDirection = -1,0,0
RotateXFunction = if[reverserNotch == 0, if[value > -0.29, value - 0.0056, -0.29], if[value < 0, value + 0.0056, 0]]
TranslateZDirection = 0, 0, -1
TranslateZFunction = if[reverserNotch == 0, if[value < 0.12, value + 0.0017, 0.12], if[value > 0, value - 0.0017, 0]]; ^^^^^^ 0.06 per correggere estensione

[Object]; anteriore inferiore
Position = 0, 4.15, 5.55
States = pant_ant_inf.csv
TranslateYFunction = if[reverserNotch == 0, if[value > -0.30, value - 0.00365, -0.30], if[value < 0, value + 0.00365, 0]]
RotateXDirection = 1,0,0
RotateXFunction = if[reverserNotch == 0, if[value < 0.45, value + 0.006, 0.45], if[value > 0, value - 0.006, 0]]
TranslateZDirection = 0,0,1
TranslateZFunction = if[reverserNotch == 0, if[value < 0.06, value + 0.0012, 0.06], if[value > 0, value - 0.0012, 0]]


[Object]; posteriore inferiore 
Position = 0, 4.15, 3.95
States = pant_post_inf.csv
TranslateYFunction = if[reverserNotch == 0, if[value > -0.30, value - 0.00365, -0.30], if[value < 0, value + 0.00365, 0]]
RotateXDirection = -1,0,0
RotateXFunction = if[reverserNotch == 0, if[value < 0.45, value + 0.006, 0.45], if[value > 0, value - 0.006, 0]]
TranslateZDirection = 0,0,-1
TranslateZFunction = if[reverserNotch == 0, if[value < 0.06, value + 0.0012, 0.06], if[value > 0, value - 0.0012, 0]]

; --------------
; reverser lever
; --------------

[object]
states = reverser_lever.csv
position = -1.02, 1.75, 7.658
rotatexfunction = 0.3 * reverserNotch
rotatexdamping = 20, 0.75

[object]
states = reverser_lever_r.csv
position = 1.02, 1.75, -7.658
rotatexfunction = 0.3 * reverserNotch
rotatexdamping = 20, 0.75

; -----------
; power lever
; -----------

[object]
states = comando_potenza.csv
position = -.7, 1.75, 7.39
rotatexfunction = ((powerNotch / powerNotches) * 2 - 1) * 3
rotatexdirection = 0, 0, -1
rotatexdamping = 20, 0.8

[object]
states = indicatore_potenza.csv
position = -0.63, 1.9, 7.655
rotateyfunction = ((powerNotch / powerNotches) * 2 - 1) * 2.55-6.9
rotateydirection = 0, 1, 0
rotateydamping = 20, 0.8

[object]
states = comando_potenza.csv
position = .7, 1.75, -7.39
rotatexfunction = ((powerNotch / powerNotches) * 2 - 1) * 3
rotatexdirection = 0, 0, 1
rotatexdamping = 20, 0.8

[object]
states = indicatore_potenza.csv
position = 0.63, 1.9, -7.655
rotateyfunction = ((powerNotch / powerNotches) * 2 - 1) * 2.55+2.6
rotateydirection = 0, 1, 0
rotateydamping = 20, 0.8

; -----------
; brake lever
; -----------

[object]
states = brake_mount.csv
position = -0.435, 1.915, 7.61

[object]
states = brake_lever.csv
position = -0.435, 1.915, 7.61
rotateyfunction = (brakeNotchLinear / brakeNotchesLinear) * 2 - 0.1
rotateydirection = 0, -1, 0
rotateydamping = 20, 0.8

[object]
states = brake_mount.csv
position = 0.435, 1.915, -7.61

[object]
states = brake_lever_r.csv
position = 0.435, 1.915, -7.61
rotateyfunction = (brakeNotchLinear / brakeNotchesLinear) * 2 - 0.1
rotateydirection = 0, -1, 0
rotateydamping = 20, 0.8

;---------------
; freno manuale
;--------------- 

[object]
states = freno_manuale.csv
position = 0.700, 1.765, 7.70

