
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 worldspace units and pixels.  
Point3F  project (Point3F worldPosition) 
Transform worldspace coordinates to screenspace (x, y, depth) coordinates.  
Point3F  unproject (Point3F screenPosition) 
Transform 3D screenspace 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 perframe 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 worldspace units which should fit in the view. 
Point2F GuiTSCtrl::getWorldToScreenScale  (  ) 
Get the ratio between worldspace units and pixels.
Point3F GuiTSCtrl::project  (  Point3F  worldPosition  ) 
Transform worldspace coordinates to screenspace (x, y, depth) coordinates.
worldPosition  The worldspace position to transform to screenspace. 
Point3F GuiTSCtrl::unproject  (  Point3F  screenPosition  ) 
Transform 3D screenspace coordinates (x, y, depth) to world space.
This method can be, for example, used to find the worldspace position relating to the current mouse cursor position.
screenPosition  The x/y position on the screen plus the depth from the screenplane 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 perframe 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 perframe reflection update time according to its percentage of the total priority value.