- Messages
- 17
- Country
I'm trying to establish the best method for creating XML 2D knob visual movements (and 3D if it's the same). After looking at several 2D knob gauges I'm really confused because I see it being done in really simple ways (minimal code) and then also really complex (lots of code)..literally the same knobs and functions but in vastly different ways. I know what I want to do. I just don't know the best method to achieve it.
I'm working on autopilot knobs (Altitude select, Heading select, Course select, IAS speed select, Vertical speed selector wheel). In some cases of code I've reviewed as a starting point I've seen just the basic variable or values expressed and not much else save for maybe just one or two knob bitmaps, while in others I've seen a nonlinearity table, and in some gauges I see a lot of bitmaps which show the knob in many different positions. So again, same function in three vastly different ways.
In all 5 cases below of what I'm working on these are obviously endless rotary encoders so my intuition said I did not think you would use a nonlinearity table and XY coordinates as an endless rotating knob shouldn't have a start point or end-point right? I'm just really confused here.
While functional, most of the knobs I've reviewed appear to move really jerky so I want to avoid that within reason. I want the knobs to visually appear like they are rotating much more smoothly.
Is this something you would have to create a piece of art for every 10 degrees? (so like 36 bitmaps for 360 degrees?) -- Or, like with needle movement can a single graphic be used instead? And if so.. how?
If I want all of the knobs to appear like they have smooth endless movement in either direction what are the various methods to accomplish this (as there looks like there is at least two ways if not three) and what is considered to be the best way for this?
Does each one of the 5 knobs below have to use a different style or can they all use the same basic code formula with the same amount of visual animations / bitmaps?
Lastly, how do you tell it (the knob graphic) how much to visually twist or turn per mouse click? Is this done in the variables section or the mouse click section... or both?
1 - I would think for an Altitude knob you would want 50ft per click or 100 feet per click or can this also be set-up somehow based on the speed of clicks? So the faster you click it moves in larger increments such as 100s or 200s, 500s etc, and when clicking slowly it decreases the value to like 50ft, or 10ft, etc. (or by holding the mouse button down it engages larger increments)
2 - Same with Heading knob, faster clicks (or holding the button) spins the heading bug in larger heading increments and slower clicks result in fine-tuning.
3 - Same as above with Course knob.. what's best here?
4 - Same as above with Indicated Air Speed knob.. what's best here?
5 - With the Vertical Speed Wheel, I assume the same rules apply as above but just uses vertical rectangle graphics instead.
Thanks in advance for the help!
I'm working on autopilot knobs (Altitude select, Heading select, Course select, IAS speed select, Vertical speed selector wheel). In some cases of code I've reviewed as a starting point I've seen just the basic variable or values expressed and not much else save for maybe just one or two knob bitmaps, while in others I've seen a nonlinearity table, and in some gauges I see a lot of bitmaps which show the knob in many different positions. So again, same function in three vastly different ways.
In all 5 cases below of what I'm working on these are obviously endless rotary encoders so my intuition said I did not think you would use a nonlinearity table and XY coordinates as an endless rotating knob shouldn't have a start point or end-point right? I'm just really confused here.
While functional, most of the knobs I've reviewed appear to move really jerky so I want to avoid that within reason. I want the knobs to visually appear like they are rotating much more smoothly.
Is this something you would have to create a piece of art for every 10 degrees? (so like 36 bitmaps for 360 degrees?) -- Or, like with needle movement can a single graphic be used instead? And if so.. how?
If I want all of the knobs to appear like they have smooth endless movement in either direction what are the various methods to accomplish this (as there looks like there is at least two ways if not three) and what is considered to be the best way for this?
Does each one of the 5 knobs below have to use a different style or can they all use the same basic code formula with the same amount of visual animations / bitmaps?
Lastly, how do you tell it (the knob graphic) how much to visually twist or turn per mouse click? Is this done in the variables section or the mouse click section... or both?
1 - I would think for an Altitude knob you would want 50ft per click or 100 feet per click or can this also be set-up somehow based on the speed of clicks? So the faster you click it moves in larger increments such as 100s or 200s, 500s etc, and when clicking slowly it decreases the value to like 50ft, or 10ft, etc. (or by holding the mouse button down it engages larger increments)
2 - Same with Heading knob, faster clicks (or holding the button) spins the heading bug in larger heading increments and slower clicks result in fine-tuning.
3 - Same as above with Course knob.. what's best here?
4 - Same as above with Indicated Air Speed knob.. what's best here?
5 - With the Vertical Speed Wheel, I assume the same rules apply as above but just uses vertical rectangle graphics instead.
Thanks in advance for the help!
Last edited: