CameraObject3D
| Kind of class: | public class |
|---|---|
| Package: | org.papervision3d.core.proto |
| Inherits from: | DisplayObject3D < DisplayObjectContainer3D < EventDispatcher |
| Known subclasses: | |
| Classpath: | org.papervision3d.core.proto.CameraObject3D |
| File last modified: | Sunday, 02 March 2008, 15:23:35 |
The CameraObject3D class is the base class for all the cameras that can be placed in a scene.A camera defines the view from which a scene will be rendered. Different camera settings would present a scene from different points of view.3D cameras simulate still-image, motion picture, or video cameras of the real world. When rendering, the scene is drawn as if you were looking through the camera lens.
Summary
Constructor
- CameraObject3D (zoom:Number = 3, focus:Number = 500, initObject:Object = null)
- The CameraObject3D constructor lets you create cameras for setting up the view from which a scene will be rendered.
Namespaces
Class properties
- DEFAULT_POS : Number3D
- The default position for new cameras.
Class properties inherited from DisplayObject3D
Instance properties
- zoom : Number
- This value specifies the scale at which the 3D objects are rendered.
- focus : Number
- This value is a positive number representing the distance of the observer from the front clipping plane, which is the closest any object can be to the camera.
- sort : Boolean
- A Boolean value that determines whether the 3D objects are z-depth sorted between themselves when rendering.
- eye : Matrix3D
- viewport : Rectangle
Instance properties inherited from DisplayObject3D
_containerBlendMode _containerSortMode _filters _material _rotationDirty _rotationX _rotationY _rotationZ _scaleDirty _scaleX _scaleY _scaleZ _scene _sorted _transformDirty _useOwnContainer _userData containerBlendMode containerSortMode culled extra faces filters geometry id material materials meshSort name parent rotationX rotationY rotationZ scale scaleX scaleY scaleZ scene sceneX sceneY sceneZ screen screenZ transform useOwnContainer userData view visible world x y z
Instance properties inherited from DisplayObjectContainer3D
Instance methods
- transformView (transform:Matrix3D = null) : void
- [internal-use] Transforms world coordinates into camera space.
- tilt (angle:Number) : void
- Rotate the camera in its vertical plane.
- pan (angle:Number) : void
- Rotate the camera in its horizontal plane.
Instance methods inherited from DisplayObject3D
Instance methods inherited from DisplayObjectContainer3D
Constructor
CameraObject3D
public function CameraObject3D (
zoom:Number = 3,
focus:Number = 500,
initObject:Object = null)
The CameraObject3D constructor lets you create cameras for setting up the view from which a scene will be rendered.
Its initial position can be specified in the initObject.
Its initial position can be specified in the initObject.
Parameters:
zoom :
This value specifies the scale at which the 3D objects are rendered. Higher values magnify the scene, compressing distance. Use it in conjunction with focus.
focus :
This value is a positive number representing the distance of the observer from the front clipping plane, which is the closest any object can be to the camera. Use it in conjunction with zoom.
initObject:
An optional object that contains user defined properties with which to populate the newly created DisplayObject3D.It includes x, y, z, rotationX, rotationY, rotationZ, scaleX, scaleY scaleZ and a user defined extra object.If extra is not an object, it is ignored. All properties of the extra field are copied into the new instance. The properties specified with extra are publicly available.The following initObject property is also recognized by the constructor:
- sort: A Boolean value that determines whether the 3D objects are z-depth sorted between themselves when rendering. The default value is true.
Constants
TYPE
public static const TYPE:String = "ABSTRACT"
(read)
Class properties
DEFAULT_POS
The default position for new cameras.
Instance properties
eye
focus
public focus:Number
(read,write)
This value is a positive number representing the distance of the observer from the front clipping plane, which is the closest any object can be to the camera. Use it in conjunction with zoom.Higher focus values tend to magnify distance between objects while allowing greater depth of field, as if the camera had a wider lenses. One result of using a wide angle lens in proximity to the subject is an apparent perspective distortion: parallel lines may appear to converge and with a fisheye lens, straight edges will appear to bend.Different lenses generally require a different camera to subject distance to preserve the size of a subject. Changing the angle of view can indirectly distort perspective, modifying the apparent relative size of the subject and foreground.
sort
public sort:Boolean
(read,write)
A Boolean value that determines whether the 3D objects are z-depth sorted between themselves when rendering.
viewport
public viewport:Rectangle
(read,write)
zoom
public zoom:Number
(read,write)
This value specifies the scale at which the 3D objects are rendered. Higher values magnify the scene, compressing distance. Use it in conjunction with focus.
Instance methods
pan
public function pan (
angle:Number) : void
Rotate the camera in its horizontal plane.Panning the camera results in a motion similar to someone shaking their head "no".
Parameters:
angle:
Angle to pan the camera.
tilt
public function tilt (
angle:Number) : void
Rotate the camera in its vertical plane.Tilting the camera results in a motion similar to someone nodding their head "yes".
Parameters:
angle:
Angle to tilt the camera.
transformView
[internal-use] Transforms world coordinates into camera space.