GuiTSCtrl¶
Abstract base class for controls that render 3D scenes.
- Inherit:
- GuiContainer
Description¶
GuiTSCtrl is the base class for controls that render 3D camera views in Torque. The class itself does not implement a concrete scene rendering. Use GuiObjectView to display invidiual shapes in the Gui and GameTSCtrl to render full scenes.
Methods¶
-
float
GuiTSCtrl::
calculateViewDistance
(float radius)¶ Given the camera’s current FOV, get the distance from the camera’s viewpoint at which the given radius will fit in the render area.
Parameters: radius – Radius in world-space units which should fit in the view. Returns: The distance from the viewpoint at which the given radius would be fully visible.
-
Point2F
GuiTSCtrl::
getWorldToScreenScale
()¶ Get the ratio between world-space units and pixels.
Returns: The amount of world-space units covered by the extent of a single pixel.
-
Point3F
GuiTSCtrl::
project
(Point3F worldPosition)¶ Transform world-space coordinates to screen-space (x, y, depth) coordinates.
Parameters: worldPosition – The world-space position to transform to screen-space. Returns: The
-
Point3F
GuiTSCtrl::
unproject
(Point3F screenPosition)¶ Transform 3D screen-space coordinates (x, y, depth) to world space. This method can be, for example, used to find the world-space position relating to the current mouse cursor position.
Parameters: screenPosition – The x/y position on the screen plus the depth from the screen-plane outwards. Returns: The world-space position corresponding to the given screen-space coordinates.
Fields¶
-
float
GuiTSCtrl::
cameraZRot
¶ Z rotation angle of camera.
-
float
GuiTSCtrl::
forceFOV
¶ The vertical field of view in degrees or zero to use the normal camera FOV.
-
float
GuiTSCtrl::
reflectPriority
¶ The share of the per-frame reflection update work this control’s rendering should run. The reflect update priorities of all visible GuiTSCtrls are added together and each control is assigned a share of the per-frame reflection update time according to its percentage of the total priority value.
-
GuiTSRenderStyles
GuiTSCtrl::
renderStyle
¶ Indicates how this control should render its contents.