Elvas Tower: Rotation of digital instrument in .cvf files - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Rotation of digital instrument in .cvf files Rate Topic: -----

#1 User is offline   Paolo 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 22
  • Joined: 26-February 18
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 24 May 2020 - 06:04 AM

Hello everyone!
I think a method to try to tilt a clock or any digital instrument by providing the degrees angle value in the .cvf and I came up with this idea, which I propose.
A digital instrument is enclosed in a rectangle which I know the coordinates of the upper left vertex, the value of the height and length of the sides.. so it's easy to calculate also that of the remaining vertices.
Now if I suppose to rotate the rectangle of a certain angle around the upper left vertex. I will find the rectangle with the same dimensions and it can also be inscribed in a rectangle. So with trigonometric formulas it is not very difficult to calculate the values of the coordinates of the new vertices.
This could be and interesting starting point to develop the rotation of digital instruments in .cvf.

Paolo

#2 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 24 May 2020 - 06:23 AM

In effect providing the possibility to rotate DIGITAL cab controls is a very good idea, because there are often parts of the cab that are shown diagonally, and showing a digital value horizontally does not give a good effect. I looked at the code, and found out that the possibility to rotate a "sprite" is already there. So with few modifications what Paolo has suggested can become reality: in the picture below (enlarge the picture) there is a "129" on the left monitor which has been rotated by 5 degrees to be coherent with the rotation of the whole monitor.
Attached Image: Rotation.jpg

See a zoom in here
Attached Image: Rotation_zoomed.jpg

I'm adding this to the Unstable version, and to next OR NewYear MG version.
If you want e.g. to rotate by 5 degrees counterclockwise you simply add this in the cabview control block
			ORTSAngle ( 5 )


I have created a Trello box for this https://trello.com/c...abview-controls .

#3 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,866
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 24 May 2020 - 10:47 AM

View PostCsantucci, on 24 May 2020 - 06:23 AM, said:

I have created a Trello box for this https://trello.com/c...abview-controls .

which I have promoted to the list for v1.4.

Neat idea, thanks Paolo and Carlo.

#4 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 24 May 2020 - 10:29 PM

Thanks Chris.
This is now available in OR NewYear MG rev.63 and as PR in the official OR Git repository.

#5 User is offline   Paolo 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 22
  • Joined: 26-February 18
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 07 June 2020 - 04:32 AM

I sent Carlo a small modification that allows to insert the rotation angle also for the digital clock.

#6 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 10 June 2020 - 12:39 PM

...which is now available in OR NewYear MG rev. 65.

#7 User is offline   IndraSkar 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 17
  • Joined: 09-April 18
  • Gender:Male
  • Simulator:Openrail
  • Country:

Posted 06 October 2020 - 08:38 AM

View PostCsantucci, on 24 May 2020 - 06:23 AM, said:

In effect providing the possibility to rotate DIGITAL cab controls is a very good idea, because there are often parts of the cab that are shown diagonally, and showing a digital value horizontally does not give a good effect. I looked at the code, and found out that the possibility to rotate a "sprite" is already there. So with few modifications what Paolo has suggested can become reality: in the picture below (enlarge the picture) there is a "129" on the left monitor which has been rotated by 5 degrees to be coherent with the rotation of the whole monitor.
Attachment Rotation.jpg

See a zoom in here
Attachment Rotation_zoomed.jpg

I'm adding this to the Unstable version, and to next OR NewYear MG version.
If you want e.g. to rotate by 5 degrees counterclockwise you simply add this in the cabview control block
			ORTSAngle ( 5 )


I have created a Trello box for this https://trello.com/c...abview-controls .


Thank you for inventing this option its surely maintain the realism when showing a digital value but sometimes inside a cabview, monitor screen there may be a gauge type display, like "LINE_VOLTAGE GAUGE" and the graphic should also be animate in angle to match with background but this option don`t making any effect on this cab-control. So I just requesting you if possible please make a new one parameter or modify this existing thus we can control the angle value for gauge type display.

Gauge (
Type ( LINE_VOLTAGE GAUGE )
Position ( 255 254 9 27 )
Area ( 253 252 7 1 )
Graphic ( "..//..//common.isabb//Cabs//656666716697114.ace" )
Style ( POINTER )
ScaleRange ( 0 27 )
ZeroPos ( 0 )
PositiveColour ( 1
ControlColour ( 0 0 0 )
)
NegativeColour ( 0 )
Orientation ( 1 )
DirIncrease ( 1 )
Units ( KILOVOLTS )
)

Attached thumbnail(s)

  • Attached Image: 2222 - v3@110-DL.jpg


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users