Interface ISimulationView
Common interface for objects that draw a simulation view.
Namespace: Unity.MARS
Syntax
public interface ISimulationView
Properties
camera
The Camera that is rendering this simulation view.
Declaration
Camera camera { get; }
Property Value
| Type | Description |
|---|---|
| Camera |
isRotationLocked
Whether the view camera can be rotated.
Declaration
bool isRotationLocked { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
orthographic
Whether the view camera is set to orthographic mode.
Declaration
bool orthographic { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
pivot
The center point, or pivot, of the Scene view.
Declaration
Vector3 pivot { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
rotation
The direction of the camera to the pivot of the view.
Declaration
Quaternion rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| Quaternion |
SceneType
The type of scene being viewed in the simulation view.
Declaration
ViewSceneType SceneType { get; set; }
Property Value
| Type | Description |
|---|---|
| ViewSceneType |
size
The size of the view measured diagonally.
Declaration
float size { get; set; }
Property Value
| Type | Description |
|---|---|
| Single |
Methods
LookAt(Vector3, Quaternion, Single, Boolean, Boolean)
Look at a specific point from a given direction with a given zoom level, enabling and disabling perspective
Declaration
void LookAt(Vector3 point, Quaternion direction, float newSize, bool ortho, bool instant)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | point | The position in world space to frame. |
| Quaternion | direction | The direction that the Scene view should view the target point from. |
| Single | newSize | The amount of camera zoom. Sets |
| Boolean | ortho | Whether the camera focus is in orthographic mode (true) or perspective mode (false). |
| Boolean | instant | Apply the movement immediately (true) or animate the transition (false). |
Repaint()
Make the view repaint.
Declaration
void Repaint()
SetupViewAsSimUser(Boolean)
Setup the view as using the Simulation Scene.
Declaration
void SetupViewAsSimUser(bool forceFrame = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | forceFrame | Force using the framing of the simulated environment settings. |