Custom Gauge Cylinder - HeliosVirtualCockpit/Helios GitHub Wiki

Abstract

The Custom Gauge Cylinder control is a 3D object which was primarily introduced to provide a more realistic component for gauges such as the compass and certain types of Attitude Indicator gauge. This control can be found in the Customer Controls section of the Profile Editor Toolbox.

Sizing

In addition to the bounding rectangle common to all controls, the Custom Gauge Cylinder has the ability to set the proportions of the cylinder, namely the radius of the cylinder and the height. It is important to ensure that for all rotations, the cylinder can be contained within the control rectagle otherwise clipping of the image can occur. You can also use the "Field of View" slider to change the visual size of the cylinder.

The Texture

The texture is the rectangular image which gets wrapped around the outside of a hollow cylindrical mesh.

  • The top side of the rectangular image will become the top edge of the cylinder.
  • The bottom side of the rectangular image will become the bottom edge of the cylinder.
  • The left and right edges of the rectangular image are joined at the rear of the cylinder.

The Camera

This is the viewing position for the sphere, and is aligned at the front of the cylinder along the Z-Axis. The camera cannot be moved.

Lighting

The cylinder can be lit from a single point, with one color of light.

Axes Orientation

The cylinder can be rotated in three axes in the same way as the Custom Ball gauge. Without any initial rotations applied to the sphere, (from the perspective of the camera) the Axes are as follows:

  • The X-Axis runs from the center of the top end-circle through to the center of the bottom end-circle.
  • The Y-Axis runs through the circumference of the cylinder from top to bottom and at a point half the cylinder's height.
  • The Z-Axis runs from the camera position straight through the centre of the cylinder.

Hopefully this is what you would expect.

[!Note] Once "initial rotations" are made to get the sphere to appear in the correct position when there are no "normal" rotations, it is very likely that one or more of the axes will have also been rotated. This can be a little confusing [^1]. In certain circumstances[^2] Helios will swap the X and Y axis in an attempt to make the rotations a little more intuitive.

[!Tip] If your initial rotations are not in multiples of 90°, then it is likely that your texture image is "wonky" and you should correct the texture image in preference to correcting the problem with initial rotations.

Rotations

All values used to rotate the Custom Gauge Cylinder are degrees.

Calibrations

"Two point" Calibrations can be applied to the values arriving from an interface for each of the axes.

[!Note] Calibrations are not applied to the "Set All Rotations" input binding because setting calibrations are already available on the DCS.Common.DCSBallRotation interface function.

Field of View

This value can be set for the Custom Gauge Cylinder control, and effectively sets the size at which the cylinder is rendered.

Performance

The 3D Cylinder is a relatively expensive in performance terms, and therefore a new binding has been introduced in order to reduce the number of times the Custom Gauge Cylinder needs to be rendered. Using individual X, Y & Z bindings will result in 3 renders per value change, however using the "Set All Rotations" input binding will result in a single render per value change.

Additional Information

The built-in texture images used by Helios for 3D Cylinders are vector images which improves clarity when scaling. Unfortunately, Helios does not currently support user vector images.


[^1]: An overview of the 3D characteristics can be found on Learn Microsoft

[^2]: When the Z-Axis has an initial rotation of 90° or 270°, the X and Y axes are reversed