|
|
|
Abstract base class for controls that render 3D scenes. More...

Public Member Functions | |
| float | 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. | |
| Point2F | getWorldToScreenScale () |
| Get the ratio between world-space units and pixels. | |
| Point3F | project (Point3F worldPosition) |
| Transform world-space coordinates to screen-space (x, y, depth) coordinates. | |
| Point3F | unproject (Point3F screenPosition) |
| Transform 3D screen-space coordinates (x, y, depth) to world space. | |
Public Attributes | |
Camera | |
| float | cameraZRot |
| Z rotation angle of camera. | |
| float | forceFOV |
| The vertical field of view in degrees or zero to use the normal camera FOV. | |
Rendering | |
| float | reflectPriority |
| The share of the per-frame reflection update work this control's rendering should run. | |
Abstract base class for controls that render 3D scenes.
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.
| 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.
| radius | Radius in world-space units which should fit in the view. |
| Point2F GuiTSCtrl::getWorldToScreenScale | ( | ) |
Get the ratio between world-space units and pixels.
| Point3F GuiTSCtrl::project | ( | Point3F | worldPosition | ) |
Transform world-space coordinates to screen-space (x, y, depth) coordinates.
| worldPosition | The world-space position to transform to screen-space. |
| 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.
| screenPosition | The x/y position on the screen plus the depth from the screen-plane outwards. |
| 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.
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.