Package | org.papervision3d.cameras |
Class | public class DebugCamera3D |
Inheritance | DebugCamera3D ![]() ![]() ![]() ![]() ![]() |
DebugCamera3D serves as a tool to allow you control the camera with your mouse and keyboard while displaying information about the camera when testing your swf. Due to its nature, the Keyboard and Mouse Events may interfere with your custom Keyboard and Mouse Events. This camera is in no way intended for production use.
Click and drag for mouse movement. The keys are setup as follows:
w = forward
s = backward
a = left
d = right
q = rotationZ--
e = rotationZ++
r = fov++
f = fov--
t = near++
g = near--
y = far++
h = far--
Property | Defined by | ||
---|---|---|---|
![]() | alpha : Number = 1 | DisplayObject3D | |
![]() | autoCalcScreenCoords : Boolean | DisplayObject3D | |
![]() | blendMode : String = "normal" | DisplayObject3D | |
![]() | children : Object
Returns the children object.
| DisplayObjectContainer3D | |
![]() | container : ViewportLayer | DisplayObject3D | |
![]() | culled : Boolean
[internal use] Is this object culled by camera frustum?
| DisplayObject3D | |
![]() | culler : IObjectCuller
| CameraObject3D | |
![]() | cullTest : Number = 0 | DisplayObject3D | |
![]() | DEFAULT_POS : Number3D
[static]
The default position for new cameras.
| CameraObject3D | |
![]() | DEFAULT_UP : Number3D
[static]
The default UP vector for new cameras.
| CameraObject3D | |
![]() | DEFAULT_VIEWPORT : Rectangle [static]
The default viewport for new cameras.
| CameraObject3D | |
![]() | extra : Object
An object that contains user defined properties.
| DisplayObject3D | |
![]() | eye : Matrix3D
| CameraObject3D | |
![]() | faceLevelMode : Boolean [static]
This allows objects faces to have their own containers.
| DisplayObject3D | |
![]() | faces : Array
[internal-use]
| DisplayObject3D | |
![]() | far : Number
Sets the distance to the far plane.
| Camera3D | |
![]() | filters : Array | DisplayObject3D | |
![]() | flipLightDirection : Boolean = false | DisplayObject3D | |
![]() | 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.
| CameraObject3D | |
![]() | fov : Number
Gets the vertical Field Of View in degrees.
| CameraObject3D | |
![]() | frustumTestMethod : int = 0 | DisplayObject3D | |
![]() | geometry : GeometryObject3D
The GeometryObject3D object that contains the 3D definition of this instance.
| DisplayObject3D | |
![]() | id : int
[read-only] Unique id of this instance.
| DisplayObject3D | |
inertia : Number
The amount of resistance to the change in velocity when updating the camera rotation with the mouse
| DebugCamera3D | ||
![]() | localRotationX : Number | DisplayObject3D | |
![]() | localRotationY : Number | DisplayObject3D | |
![]() | localRotationZ : Number | DisplayObject3D | |
![]() | material : MaterialObject3D | DisplayObject3D | |
![]() | materials : MaterialsList
The list of materials for this instance.
| DisplayObject3D | |
![]() | meshSort : uint = 1
tells Mesh3D's render() method to compare the measurement choice of the user for a triangle's sorting
| DisplayObject3D | |
![]() | name : String
An optional object name.
| DisplayObject3D | |
![]() | near : Number
Sets the distance to the near plane (note that this is simply an alias for #focus).
| Camera3D | |
![]() | numChildren : int
Returns the number of children of this object.
| DisplayObjectContainer3D | |
![]() | ortho : Boolean
Whether the camera uses orthographic projection.
| CameraObject3D | |
![]() | orthoScale : Number
Sets the orthographic scale of the camera
| Camera3D | |
![]() | parent : DisplayObjectContainer3D
[read-only] Indicates the DisplayObjectContainer3D object that contains this display object.
| DisplayObject3D | |
![]() | parentContainer : DisplayObject3D | DisplayObject3D | |
![]() | position : Number3D
A Number3D containing the current x, y, and z of the DisplayObject3D
| DisplayObject3D | |
propsDisplay : Sprite
A Sprite that displays the current properties of your camera
| DebugCamera3D | ||
![]() | root : DisplayObjectContainer3D
[read-only] [read-only] The scene, which is the top-most displayObjectContainer3D in the tree structure.
| DisplayObjectContainer3D | |
![]() | rotationX : Number
Specifies the rotation around the X axis from its original orientation.
| DisplayObject3D | |
![]() | rotationY : Number
Specifies the rotation around the Y axis from its original orientation.
| DisplayObject3D | |
![]() | rotationZ : Number
Specifies the rotation around the Z axis from its original orientation.
| DisplayObject3D | |
![]() | scale : Number
Sets the 3D scale as applied from the registration point of the object.
| DisplayObject3D | |
![]() | scaleX : Number
Sets the scale along the local X axis as applied from the registration point of the object.
| DisplayObject3D | |
![]() | scaleY : Number
Sets the scale along the local Y axis as applied from the registration point of the object.
| DisplayObject3D | |
![]() | scaleZ : Number
Sets the scale along the local Z axis as applied from the registration point of the object.
| DisplayObject3D | |
![]() | scene : SceneObject3D | DisplayObject3D | |
![]() | sceneX : Number
The X coordinate of a object relative to the scene coordinate system.
| DisplayObject3D | |
![]() | sceneY : Number
The Y coordinate of a object relative to the scene coordinate system.
| DisplayObject3D | |
![]() | sceneZ : Number
The Z coordinate of a object relative to the scene coordinate system.
| DisplayObject3D | |
![]() | screen : Number3D
[read-only] The coordinate of the object on screen.
| DisplayObject3D | |
![]() | screenZ : Number
[internal-use] The average depth of the object faces center.
| DisplayObject3D | |
![]() | sort : Boolean
A Boolean value that determines whether the 3D objects are z-depth sorted between themselves when rendering.
| CameraObject3D | |
![]() | sortedArray : Array [static]
| DisplayObject3D | |
![]() | target : DisplayObject3D
Gets the target for this camera, if any.
| CameraObject3D | |
![]() | testQuad : Boolean = true | DisplayObject3D | |
![]() | transform : Matrix3D
A Matrix3D object containing values that affect the scaling, rotation, and translation of the display object.
| DisplayObject3D | |
![]() | useClipping : Boolean = true | DisplayObject3D | |
![]() | useCulling : Boolean
Whether this camera uses frustum culling.
| Camera3D | |
![]() | useOwnContainer : Boolean | DisplayObject3D | |
![]() | useProjectionMatrix : Boolean
Whether this camera uses a projection matrix.
| Camera3D | |
![]() | userData : UserData | DisplayObject3D | |
![]() | view : Matrix3D
[internal-use] A camera transformed Matrix3D object.
| DisplayObject3D | |
![]() | viewport : Rectangle | CameraObject3D | |
![]() | visible : Boolean
Whether or not the display object is visible.
| DisplayObject3D | |
![]() | world : Matrix3D
World transformation.
| DisplayObject3D | |
![]() | x : Number
An Number that sets the X coordinate of a object relative to the origin of its parent.
| DisplayObject3D | |
![]() | y : Number
An Number that sets the Y coordinate of a object relative to the origin of its parent.
| DisplayObject3D | |
![]() | yUP : Boolean | CameraObject3D | |
![]() | z : Number
An Number that sets the Z coordinate of a object relative to the origin of its parent.
| DisplayObject3D | |
![]() | ZERO : DisplayObject3D
[static]
Returns an empty DiplayObject3D object positioned in the center of the 3D coordinate system (0, 0 ,0).
| DisplayObject3D | |
![]() | zoom : Number
This value specifies the scale at which the 3D objects are rendered.
| CameraObject3D |
Method | Defined by | ||
---|---|---|---|
DebugCamera3D(viewport3D:Viewport3D, fovY:Number = 90, near:Number = 10, far:Number = 5000)
DebugCamera3D
| DebugCamera3D | ||
![]() |
Adds a child DisplayObject3D instance to this DisplayObjectContainer instance.
| DisplayObject3D | |
![]() |
Adds all the children of a DisplayObject3D instance to this DisplayObjectContainer instance.
| DisplayObjectContainer3D | |
![]() | DisplayObject3D | ||
![]() |
addGeometry(geometry:GeometryObject3D = null):void
Adds a geometry definition to the instance.
| DisplayObject3D | |
![]() |
calculateScreenCoords(camera:CameraObject3D):void
| DisplayObject3D | |
![]() |
childrenList():String
Returns a string value with the list of objects.
| DisplayObjectContainer3D | |
![]() |
Clones this object.
| DisplayObject3D | |
![]() |
copyPosition(reference:*):void
Copies the position information (x, y and z coordinates) from another object or Matrix3D.
| DisplayObject3D | |
![]() |
copyTransform(reference:*):void
Copies the transformation information (position, rotation and scale) from another object or Matrix3D.
| DisplayObject3D | |
![]() |
createOrthoMatrix(left:Number, right:Number, bottom:Number, top:Number, near:Number, far:Number):Matrix3D
[static]
Creates a transformation that produces a parallel projection.
| Camera3D | |
![]() |
createPerspectiveMatrix(fov:Number, aspect:Number, near:Number, far:Number):Matrix3D
[static]
Creates a transformation that produces a perspective projection.
| Camera3D | |
![]() | DisplayObject3D | ||
![]() |
distanceTo(obj:DisplayObject3D):Number
Gets the distance to the position of the given object.
| DisplayObject3D | |
![]() |
getChildByName(name:String, recursive:Boolean = false):DisplayObject3D
Returns the child display object that exists with the specified name.
| DisplayObjectContainer3D | |
![]() |
getMaterialByName(name:String):MaterialObject3D
Returns the material that exists with the specified name in the materials list.
| DisplayObject3D | |
![]() |
hitTestObject(obj:DisplayObject3D, multiplier:Number = 1):Boolean
Evaluates the display object to see if it overlaps or intersects with the obj display object.
| DisplayObject3D | |
![]() |
hitTestPoint(x:Number, y:Number, z:Number):Boolean
Evaluates the display object to see if it overlaps or intersects with the point specified by the x, y and z parameters.
| DisplayObject3D | |
![]() |
Lookat.
| CameraObject3D | |
![]() |
materialsList():String
Returns a string value with the list of material names of the materials list.
| DisplayObject3D | |
![]() |
moveBackward(distance:Number):void
Translate the display object in the opposite direction it is facing, i.e.
| DisplayObject3D | |
![]() |
moveDown(distance:Number):void
Translate the display object downwards, with respect to the direction it is facing, i.e.
| DisplayObject3D | |
![]() |
moveForward(distance:Number):void
Translate the display object in the direction it is facing, i.e.
| DisplayObject3D | |
![]() |
moveLeft(distance:Number):void
Translate the display object lateraly, to the left of the direction it is facing, i.e.
| DisplayObject3D | |
![]() |
moveRight(distance:Number):void
Translate the display object lateraly, to the right of the direction it is facing, i.e.
| DisplayObject3D | |
![]() |
moveUp(distance:Number):void
Translate the display object upwards, with respect to the direction it is facing, i.e.
| DisplayObject3D | |
![]() |
orbit(pitch:Number, yaw:Number, useDegrees:Boolean = true, target:DisplayObject3D = null):void
Orbits the camera around the specified target.
| Camera3D | |
![]() |
pan(angle:Number):void
Rotate the camera in its horizontal plane.
| CameraObject3D | |
![]() |
pitch(angle:Number):void
Rotate the display object around its lateral or transverse axis —an axis running from the pilot's left to right in piloted aircraft, and parallel to the wings of a winged aircraft; thus the nose pitches up and the tail down, or vice-versa.
| DisplayObject3D | |
![]() |
[internal-use] Projects three dimensional coordinates onto a two dimensional plane to simulate the relationship of the camera to subject.
| DisplayObject3D | |
![]() | Camera3D | ||
![]() |
Projects vertices.
| Camera3D | |
![]() |
Removes the specified child DisplayObject3D instance from the child list of the DisplayObjectContainer3D instance.
| DisplayObjectContainer3D | |
![]() |
removeChildByName(name:String):DisplayObject3D
Removes the child DisplayObject3D instance that exists with the specified name, from the child list of the DisplayObjectContainer3D instance.
| DisplayObjectContainer3D | |
![]() |
replaceMaterialByName(material:MaterialObject3D, name:String):void
Replaces a material by its name.
| DisplayObject3D | |
![]() |
roll(angle:Number):void
Rotate the display object around the longitudinal axis —an axis drawn through the body of the vehicle from tail to nose in the normal direction of flight, or the direction the object is facing.
| DisplayObject3D | |
![]() |
setChildMaterial(child:DisplayObject3D, material:MaterialObject3D, existingMaterial:MaterialObject3D = null):void
Sets the material for a child DisplayObject3D.
| DisplayObject3D | |
![]() |
setChildMaterialByName(childName:String, material:MaterialObject3D):void
Sets the material for a child DisplayObject3D by the child's name.
| DisplayObject3D | |
![]() |
tilt(angle:Number):void
Rotate the camera in its vertical plane.
| CameraObject3D | |
![]() |
toString():String
Returns a string value representing the three-dimensional position values of the display object instance.
| DisplayObject3D | |
![]() |
transformView(transform:Matrix3D = null):void
[INTERNAL-USE] Transforms world coordinates into camera space.
| Camera3D | |
![]() |
Move the object along a given direction.
| DisplayObject3D | |
![]() |
Unproject.
| CameraObject3D | |
![]() |
update(viewport:Rectangle):void
Updates the internal camera settings.
| Camera3D | |
![]() |
updateTransform():void
[internal-use] Updates the transform Matrix3D with the current rotation and scale values.
| DisplayObject3D | |
![]() |
yaw(angle:Number):void
Rotate the display object around about the vertical axis —an axis drawn from top to bottom.
| DisplayObject3D |
Method | Defined by | ||
---|---|---|---|
displayProperties():void
Builds the Sprite that displays the camera properties
| DebugCamera3D | ||
keyDownHandler(event:KeyboardEvent):void
Adjusts the camera based on the keyCode from the
KeyboardEvent.KEY_DOWN event. | DebugCamera3D | ||
keyUpHandler(event:KeyboardEvent):void
Checks which Key is released on the
KeyboardEvent.KEY_UP event
and toggles that key's movement off. | DebugCamera3D | ||
mouseDownHandler(event:MouseEvent):void
The default handler for the
MouseEvent.MOUSE_DOWN event. | DebugCamera3D | ||
mouseMoveHandler(event:MouseEvent):void
The default handler for the
MouseEvent.MOUSE_MOVE event. | DebugCamera3D | ||
mouseUpHandler(event:MouseEvent):void
Removes the mouseMoveHandler on the
MouseEvent.MOUSE_UP event. | DebugCamera3D | ||
onAddedToStageHandler(event:Event):void
Dispatched with the viewport container is added to the stage
| DebugCamera3D | ||
onEnterFrameHandler(event:Event):void
Checks which keys are down and adjusts the camera accorindingly on the
Event.ENTER_FRAME event. | DebugCamera3D | ||
![]() |
setParentContainer(parent:DisplayObject3D, assign:Boolean = true):void
| DisplayObject3D | |
setupEvents():void
Sets up the Mouse and Keyboard Events required for adjusting the camera properties
| DebugCamera3D |
inertia | property |
inertia:Number
[read-write]The amount of resistance to the change in velocity when updating the camera rotation with the mouse
Implementation public function get inertia():Number
public function set inertia(value:Number):void
propsDisplay | property |
propsDisplay:Sprite
[read-write]A Sprite that displays the current properties of your camera
Implementation public function get propsDisplay():Sprite
public function set propsDisplay(value:Sprite):void
DebugCamera3D | () | constructor |
public function DebugCamera3D(viewport3D:Viewport3D, fovY:Number = 90, near:Number = 10, far:Number = 5000)
DebugCamera3D
Parametersviewport3D:Viewport3D — Viewport to render to. |
|
fovY:Number (default = 90 ) — Field of view (vertical) in degrees.
|
|
near:Number (default = 10 ) — Distance to near plane.
|
|
far:Number (default = 5000 ) — Distance to far plane.
|
See also
displayProperties | () | method |
protected function displayProperties():void
Builds the Sprite that displays the camera properties
keyDownHandler | () | method |
protected function keyDownHandler(event:KeyboardEvent):void
Adjusts the camera based on the keyCode from the KeyboardEvent.KEY_DOWN
event.
event:KeyboardEvent — event object.
|
keyUpHandler | () | method |
protected function keyUpHandler(event:KeyboardEvent):void
Checks which Key is released on the KeyboardEvent.KEY_UP
event
and toggles that key's movement off.
event:KeyboardEvent — event object.
|
mouseDownHandler | () | method |
protected function mouseDownHandler(event:MouseEvent):void
The default handler for the MouseEvent.MOUSE_DOWN
event.
event:MouseEvent — event object.
|
mouseMoveHandler | () | method |
protected function mouseMoveHandler(event:MouseEvent):void
The default handler for the MouseEvent.MOUSE_MOVE
event.
event:MouseEvent — event object.
|
mouseUpHandler | () | method |
protected function mouseUpHandler(event:MouseEvent):void
Removes the mouseMoveHandler on the MouseEvent.MOUSE_UP
event.
event:MouseEvent — event object.
|
onAddedToStageHandler | () | method |
protected function onAddedToStageHandler(event:Event):void
Dispatched with the viewport container is added to the stage
Parametersevent:Event |
onEnterFrameHandler | () | method |
protected function onEnterFrameHandler(event:Event):void
Checks which keys are down and adjusts the camera accorindingly on the Event.ENTER_FRAME
event.
Also updates the display of properties.
event:Event — event object.
|
setupEvents | () | method |
protected function setupEvents():void
Sets up the Mouse and Keyboard Events required for adjusting the camera properties