Class Qkmaxware::Rendering::BaseCamera

Class List > Qkmaxware > Rendering > BaseCamera

Base class for a camera that can render a scene

Inherits the following classes: Qkmaxware::Rendering::SceneNode

Inherited by the following classes: Qkmaxware::Rendering::PerspectiveCamera

Public Attributes inherited from Qkmaxware::Rendering::SceneNode

See Qkmaxware::Rendering::SceneNode

Type Name
Vec3 Backward = => -Forward
World aligned backwards vector
IEnumerable< SceneNode > Children = => children.AsReadOnly()
All direct children of this scene node
Vec3 Down = => -Up
World aligned down vector
Vec3 Forward = => LocalToWorldMatrix * Vec3.J
World aligned forward vector
Vec3 Left = => -Right
World aligned left vector
Transformation LocalToWorldMatrix = => (Parent != null) ? Parent.LocalToWorldMatrix * this.Transform : this.Transform
Matrix to convert from local to world space
Vec3 Position = => LocalToWorldMatrix * Vec3.Zero
World position of this node
Vec3 Right = => LocalToWorldMatrix * Vec3.I
World aligned right vector
Scene? Scene = => (Parent != null) ? Parent.Scene : this.root_scene
Scene in which this node belongs
Transformation Transform = = Transformation.Identity()
Local transformation matrix representing the coordinate frame for this node
Vec3 Up = => LocalToWorldMatrix * Vec3.K
World aligned up vector
Transformation WorldToLocalMatrix = => LocalToWorldMatrix.Inverse
Matrix to convert from world to local space

Public Functions

Type Name
BaseCamera (Size size)
Create a new camera with the given image size
void Render (Scene scene)
Render the given scene to the pixel buffer
virtual abstract Vec3 ScreenToWorldPoint (Vec2 screen) = 0
Convert from a screen position to a world position
void SetClippingDistance (double near, double far)
Set the near and far clipping planes
virtual abstract Vec3 WorldToScreenPoint (Vec3 world) = 0
Convert from a world position to a screen position

Public Functions inherited from Qkmaxware::Rendering::SceneNode

See Qkmaxware::Rendering::SceneNode

Type Name
void Add (SceneNode node)
Add a node to the scene graph under this node
void Detach ()
Remove this node from the scene graph
IEnumerator< SceneNode > GetEnumerator ()
void Move (Vec3 delta)
Move this node
void Remove (SceneNode node)
Remove a node from the scene graph
void Rotate (Vec3 axis, double angle)
Rotate this coordinate frame about an axis
void RotateAround (Vec3 point, Vec3 axis, double angle)
Rotate this node around a point in space

Protected Attributes

Type Name
double farClipDistance = = 1000
readonly double focallength = = 1
double nearClipDistance = = 0.1

Protected Functions

Type Name
virtual abstract void Dirty () = 0
Event when camera properties change

Public Functions Documentation

function BaseCamera

inline Qkmaxware::Rendering::BaseCamera::BaseCamera (
    Size size
) 

Parameters:

  • size rendered image size

function Render [1/2]

inline void Qkmaxware::Rendering::BaseCamera::Render (
    Scene scene
) 

Parameters:

  • scene scene to render

function ScreenToWorldPoint

virtual abstract Vec3 Qkmaxware::Rendering::BaseCamera::ScreenToWorldPoint (
    Vec2 screen
) = 0

Parameters:

  • screen screen position

Returns:

world position

function SetClippingDistance

inline void Qkmaxware::Rendering::BaseCamera::SetClippingDistance (
    double near,
    double far
) 

Parameters:

  • near near clip plane distance
  • far far clip plane distance

function WorldToScreenPoint

virtual abstract Vec3 Qkmaxware::Rendering::BaseCamera::WorldToScreenPoint (
    Vec3 world
) = 0

Parameters:

  • world world position

Returns:

screen position

Protected Attributes Documentation

variable farClipDistance

double Qkmaxware.Rendering.BaseCamera.farClipDistance;

variable focallength

readonly double Qkmaxware.Rendering.BaseCamera.focallength;

variable nearClipDistance

double Qkmaxware.Rendering.BaseCamera.nearClipDistance;

Protected Functions Documentation

function Dirty

virtual abstract void Qkmaxware::Rendering::BaseCamera::Dirty () = 0

The documentation for this class was generated from the following file Render/src/BaseCamera.cs