SceneCamera
Sandbox.Engine
Derives from object

Summary

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

Constructors

SceneCamera( string name = Unnammed, )

Properties

Color AmbientLightColor { get; set; }

The color of the ambient light. Set it to black for no ambient light.

Angles Angles { set; }

The rotation of the scene's camera.

bool AntiAliasing { get; set; }

Enable or disable anti-aliasing for this render.

Color BackgroundColor { get; set; }

Color the scene camera clears the render target to.

bool EnablePostProcessing { get; set; }

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

float FieldOfView { get; set; }

The camera's fields of view.

bool IsMainCamera { get; }

Returns true if this is the main game camera, on which game UI is drawn

string Name { get; set; }

The name of this camera.. for debugging purposes.

bool Ortho { get; set; }

Whether to use orthographic projection.

float OrthoHeight { get; set; }

Height of the ortho when SceneCamera.Ortho is enabled.

float OrthoWidth { get; set; }

Width of the ortho when SceneCamera.Ortho is enabled.

Vector3 Position { get; set; }

The position of the scene's camera.

IEnumerable<RenderHook> RenderHooks { get; }

List of active render hooks on this scene camera.

Rotation Rotation { get; set; }

The rotation of the scene's camera.

SceneWorld World { get; set; }

The world we're going to render.

float ZFar { get; set; }

The camera's zFar distance. This is the furthest distance this camera will be able to render. It's a good idea to keep this within sensible limits because your scene will lose accuracy if it's too far.

float ZNear { get; set; }

The camera's zNear distance. This is the closest distance this camera will be able to render. You might think it's a good idea to set this to 0, but it ain't, so don't.

Methods

void AddHook( RenderHook value, )

Add a specific render hook to this camera.

T FindHook<T,>( )

Find a hook that matches the type, or null

RenderHook FindHook( Type t, )

Find a hook that matches the type, or null

T FindOrCreateHook<T,>( )

Find a hook that matches T, if not found then create and return

int RemoveAllHooks<T,>( )

Remove all hooks of type, return the amount of hooks removed

Remove all hooks, return the amount removed

void RemoveHook( RenderHook value, )

Remove a specific render hook from this camera.

override string ToString( )
Overrides Object.ToString

Extensions

bool RenderToPixmap( Pixmap targetPixmap, )

Render this camera to the target widget. Once you do this the target widget becomes "externally painted", so you won't be able to paint on it anymore with Qt's Paint stuff.

void RenderToWidget( Widget targetWidget, )

Render this camera to the target widget. Once you do this the target widget becomes "externally painted", so you won't be able to paint on it anymore with Qt's Paint stuff.

Nested Types