class MAGES::ComponentLibrary::SpatialLayoutSubModule¶
Overview¶
Handles layout for all SpatialElements. More…
class SpatialLayoutSubModule: public MAGES::SubModule { public: // structs struct LayoutResult; // classes class Group; class LayoutEngine; class LoadingLayoutEngine; // methods static float GetPreferredDistanceFromCamera( Camera camera, Bounds bounds, float multiplier ); static void GetPoseLookingAtCamera( SpatialElement element, Camera camera, out Pose pose, float distanceMultiplier = 1.0f ); override void Startup(); override void Shutdown(); };
Inherited Members¶
public:
// properties
int Version;
// methods
void Startup();
void Shutdown();
virtual void UpdateModule(UpdatePhase updatePhase);
Detailed Documentation¶
Handles layout for all SpatialElements.
Methods¶
static float GetPreferredDistanceFromCamera(
Camera camera,
Bounds bounds,
float multiplier
)
Gets the preferred distance from the camera.
Parameters:
camera |
The camera to get the distance from. |
bounds |
The bounds of the object to place. |
multiplier |
Applied to the resulting offset before clamping. |
Returns:
The distance (i.e. frustum slice) of the object so that it fits inside of the camera’s view frustum.
static void GetPoseLookingAtCamera(
SpatialElement element,
Camera camera,
out Pose pose,
float distanceMultiplier = 1.0f
)
Gets the pose looking at the camera.
Parameters:
element |
The element. |
camera |
The camera that the element should be looking at. |
pose |
The resulting pose of that element. |
distanceMultiplier |
Applied to the calculated offste. |