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
Page 1 of 1
Rotation of digital instrument in .cvf files
#2
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.
See a zoom in here
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
I have created a Trello box for this https://trello.com/c...abview-controls .
See a zoom in here
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
Posted 24 May 2020 - 10:47 AM
Csantucci, 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
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.
This is now available in OR NewYear MG rev.63 and as PR in the official OR Git repository.
#5
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.
#7
Posted 06 October 2020 - 08:38 AM
Csantucci, 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.
Rotation.jpg
See a zoom in here
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
I have created a Trello box for this https://trello.com/c...abview-controls .
Rotation.jpg
See a zoom in here
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 )
)
Page 1 of 1