class SceneCamera

in global :: Sandbox

Represents a camera and holds render hooks. This camera can be used to draw tool windows and scene panels.


public SceneCamera.BloomAccessor Bloom { get; }

Access tonemapping properties of camera

public string Name { get; set; }

The name of this camera.. for debugging purposes.

public ITagSet ExcludeTags { get; }

Scene objects with any of these tags won't be rendered by this camera.

public ITagSet RenderTags { get; }

Only scene objects with one of these tags will be rendered by this camera.

public Action OnRenderOpaque { get; set; }

Called when rendering the transparent pass

public Action OnRenderPostProcess { get; set; }

Called when rendering the post process pass

public Action OnRenderTransparent { get; set; }

Called when rendering the transparent pass

public Action OnRenderOverlay { get; set; }

Called when rendering the camera's overlay

public Vector2 Size { get; set; }

The size of the screen. Allows us to work out aspect ratio. For now will get updated automatically on render.

public VolumetricFogParameters VolumetricFog { get; set; }

Control volumetric fog parameters, expect this to take 1-2ms of your GPU frame time.

public CubemapFogController CubemapFog { get; set; }

Control fog based on an image.

public SceneWorld World { get; set; }

The world we're going to render.

public HashSet<SceneWorld> Worlds { get; }

Your camera can render multiple worlds.

public Vector3 Position { get; set; }

The position of the scene's camera.

public Rotation Rotation { get; set; }

The rotation of the scene's camera.

public Angles Angles { get; set; }

The rotation of the scene's camera.

public float FieldOfView { get; set; }

The horizontal field of view of the Camera in degrees.

public float ZFar { get; set; }

The camera's zFar distance. This is the furthest distance this camera will be able to render. This value totally depends on the game you're making. Shorter the better, sensible ranges would be between about 1000 and 30000, but if you want it to be further out you can balance that out by making znear larger.

public float ZNear { get; set; }

The camera's zNear distance. This is the closest distance this camera will be able to render. A good value for this is about 5. Below 5 and particularly below 1 you're going to start to see a lot of artifacts like z-fighting.

public bool Ortho { get; set; }

Whether to use orthographic projection.

public float OrthoWidth { get; set; }

No longer used

public float OrthoHeight { get; set; }

Height of the ortho when is enabled.

public SceneCameraDebugMode DebugMode { get; set; }

Render this camera using a different render mode

public bool WireframeMode { get; set; }

Render this camera using a wireframe view.

public ClearFlags ClearFlags { get; set; }

What kind of clearing should we do before we begin?

public Rect Rect { get; set; }

The rect of the screen to render to. This is normalized, between 0 and 1.

public Color BackgroundColor { get; set; }

Color the scene camera clears the render target to.

public Color AmbientLightColor { get; set; }

The color of the ambient light. Set it to black for no ambient light, alpha is used for lerping between IBL and constant color.

public bool AntiAliasing { get; set; }

Enable or disable anti-aliasing for this render.

public bool EnablePostProcessing { get; set; }

Toggle all post processing effects for this camera. The default is on.

public StereoTargetEye TargetEye { get; set; }

The HMD eye that this camera is targeting. Use for the user's monitor (i.e. the companion window).

public bool WantsStereoSubmit { get; set; }

Set this to false if you don't want the stereo renderer to submit this camera's texture to the compositor. This option isn't considered if is .

public bool EnableDirectLighting { get; set; }

Enable or disable direct lighting

public bool EnableIndirectLighting { get; set; }

Enable or disable indirect lighting

public void SetViewModelCamera( float viewModelFieldOfView, float viewModelZNear = 1, float viewModelZFar = 500 )

Set attributes for rendering the viewmodel's camera.

public Frustum GetFrustum( Rect pixelRect )

Given a pixel rect return a frustum on the current camera.

public Frustum GetFrustum( Rect pixelRect, Vector3 screenSize )

Given a pixel rect return a frustum on the current camera. Pass in 1 to ScreenSize to use normalized screen coords.

public Ray GetRay( Vector3 cursorPosition )

Given a cursor position get a scene aiming ray.

public Ray GetRay( Vector3 cursorPosition, Vector3 screenSize )

Given a cursor position get a scene aiming ray.

public Vector2 ToScreen( Vector3 world )

Convert from world coords to screen coords. The results for x and y will be from 0 to .

public bool ToScreen( Vector3 world, ref Vector2 screen )

Convert from world coords to screen coords. The results for x and y will be from 0 to .

public Vector2 ToScreenNormal( Vector3 world )

Convert from world coords to normal screen corrds. The results will be between 0 and 1

public Vector3 ToWorld( Vector2 screen )

Convert from screen coords to world coords on the near frustum plane.

public Nullable<Matrix> CustomProjectionMatrix { get; set; }

Allows specifying a custom projection matrix for this camera

public SceneCamera.TonemapAccessor Tonemap { get; }

Access tonemapping properties of camera

public Type GetType( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public SceneCamera( string name = Unnamed )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public RenderAttributes Attributes { get; }

😔 No documentation found.

public Action OnRenderUI { get; set; }

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public void Dispose( )

😔 No documentation found.