The PerspectiveCamera generates rays for a perspective projection. It is defined by its center, viewing direction, up vector, vertical opening angle of the image and resolution.

Inheritance
  • Object
  • Camera
  • PerspectiveCamera

Constructors

PerspectiveCamera(Point3 center, Vector3 forward, Vector3 up, num vertOpeningAngle, Vector2 _res)

Creates a new PerspectiveCamera. Uses a forward vector.

PerspectiveCamera.lookAt(Point3 center, Point3 lookAt, Vector3 up, num vertOpeningAngle, Vector2 _res)

Creates a new PerspectiveCamera. Calculates forward vector based on given look-at point.

Properties

center → Point3

read / write, inherited
forward → Vector3

read / write
hashCode → int

Get a hash code for this object.

read-only, inherited
res → Vector2

read-only

read / write
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited
stepX → Vector3

read / write
stepY → Vector3

read / write
topLeft → Vector3

read / write
up → Vector3

read / write

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

getPrimaryRays(int x, int y) → List<Ray>

Returns a collection of primary rays generated for the given pixel by this camera.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
rotate(num horAngle, num verAngle) → void

Rotates this camera around the given horizontal and vertical angles.

toString() → String

Returns a string representation of this object.

inherited
zoom(num distance) → void

Zooms in or out depending if the distance is positive or negativ.