Packageorg.flintparticles.threeD.renderers
Classpublic class Camera

The camera class is used by Flint's internal 3D renderers to manage the view on the 3D world that is displayed by the renderer. Each renderer has a camera property, which is its camera object.



Public Properties
 PropertyDefined by
  direction : Vector3D
The direction the camera is pointing.
Camera
  farPlaneDistance : Number
The distance to the camera's far plane - particles farther away than this are not rendered.
Camera
  nearPlaneDistance : Number
The distance to the camera's near plane - particles closer than this are not rendered.
Camera
  position : Vector3D
The location of the camera.
Camera
  projectionDistance : Number
The distance to the camera's projection distance.
Camera
  spaceTransform : Matrix3D
[read-only] The transform matrix that converts positions in world space to positions in camera space.
Camera
  target : Vector3D
The point that the camera looks at.
Camera
  transform : Matrix3D
[read-only] The transform matrix that converts positions in world space to positions in camera space.
Camera
  up : Vector3D
The up direction for the camera.
Camera
Public Methods
 MethodDefined by
  
The constructor creates a Camera object.
Camera
  
dolly(distance:Number):void
Dolly or Track the camera in/out in the direction it's facing.
Camera
  
lift(distance:Number):void
Raise or lower the camera.
Camera
  
orbit(angle:Number):void
Orbit the camera around the target.
Camera
  
pan(angle:Number):void
Pan the camera left or right.
Camera
  
roll(angle:Number):void
Roll the camera clockwise or counter-clockwise.
Camera
  
tilt(angle:Number):void
Tilt the camera up or down.
Camera
  
track(distance:Number):void
Dolly or Track the camera left/right.
Camera
Property detail
directionproperty
direction:Vector3D  [read-write]

The direction the camera is pointing. Setting this will invalidate any setting for the target, sincethe camera now points in this direction rather than pointing towards the target.

Implementation
    public function get direction():Vector3D
    public function set direction(value:Vector3D):void

See also

farPlaneDistanceproperty 
farPlaneDistance:Number  [read-write]

The distance to the camera's far plane - particles farther away than this are not rendered. The default value is 2000.

Implementation
    public function get farPlaneDistance():Number
    public function set farPlaneDistance(value:Number):void
nearPlaneDistanceproperty 
nearPlaneDistance:Number  [read-write]

The distance to the camera's near plane - particles closer than this are not rendered. The default value is 10.

Implementation
    public function get nearPlaneDistance():Number
    public function set nearPlaneDistance(value:Number):void
positionproperty 
position:Vector3D  [read-write]

The location of the camera.

Implementation
    public function get position():Vector3D
    public function set position(value:Vector3D):void
projectionDistanceproperty 
projectionDistance:Number  [read-write]

The distance to the camera's projection distance. Particles this distance from the camera are rendered at their normal size. Perspective will cause closer particles to appear larger than normal and more distant particles to appear smaller than normal. The default value is 400.

Implementation
    public function get projectionDistance():Number
    public function set projectionDistance(value:Number):void
spaceTransformproperty 
spaceTransform:Matrix3D  [read-only]

The transform matrix that converts positions in world space to positions in camera space. The projection transform is not part of this transform.

Implementation
    public function get spaceTransform():Matrix3D

See also

targetproperty 
target:Vector3D  [read-write]

The point that the camera looks at. Setting this will invalidate any setting for the camera direction - the direction will be recalculated based on the position and the target.

Implementation
    public function get target():Vector3D
    public function set target(value:Vector3D):void

See also

transformproperty 
transform:Matrix3D  [read-only]

The transform matrix that converts positions in world space to positions in camera space. The projection transform is part of this transform - so vectors need only to have their project method called to get their position in 2D camera space.

Implementation
    public function get transform():Matrix3D

See also

upproperty 
up:Vector3D  [read-write]

The up direction for the camera. Is this is not perpendicular to the direction, the camera is tilted down or up from this up direction to point in the direction or at the target.

Implementation
    public function get up():Vector3D
    public function set up(value:Vector3D):void
Constructor detail
Camera()constructor
public function Camera()

The constructor creates a Camera object. Usually, users don't need to create camera objects, but will use the camera objects that are properties of Flint's renderers.

Method detail
dolly()method
public function dolly(distance:Number):void

Dolly or Track the camera in/out in the direction it's facing.

Parameters
distance:Number — The distance to move the camera. Positive values track in and negative values track out.
lift()method 
public function lift(distance:Number):void

Raise or lower the camera.

Parameters
distance:Number — The distance to lift the camera. Positive values raise the camera and negative values lower the camera.
orbit()method 
public function orbit(angle:Number):void

Orbit the camera around the target.

Parameters
angle:Number — angle (in radians) to orbit the camera. Positive values orbit to the right, negative values orbit to the left.
pan()method 
public function pan(angle:Number):void

Pan the camera left or right.

Parameters
angle:Number — angle (in radians) to pan the camera. Positive values pan right, negative values pan left.
roll()method 
public function roll(angle:Number):void

Roll the camera clockwise or counter-clockwise.

Parameters
angle:Number — angle (in radians) to roll the camera. Positive values roll clockwise, negative values roll counter-clockwise.
tilt()method 
public function tilt(angle:Number):void

Tilt the camera up or down.

Parameters
angle:Number — angle (in radians) to tilt the camera. Positive values tilt up, negative values tilt down.
track()method 
public function track(distance:Number):void

Dolly or Track the camera left/right.

Parameters
distance:Number — The distance to move the camera. Positive values move the camera to the right, negative values move it to the left.