| Package | org.papervision3d.view |
| Class | public class Viewport3D |
| Inheritance | Viewport3D flash.display.Sprite |
| Implements | IViewport3D |
| Subclasses | BitmapViewport3D |
| Property | Defined by | ||
|---|---|---|---|
| autoClipping : Boolean
Whether clipping is enabled (not rendering bitmap data outside the rectangle of the viewport by making use of the
Sprite.scrollRect)
| Viewport3D | ||
| autoCulling : Boolean
Whether culling is enabled (not rendering triangles hidden behind other triangles)
| Viewport3D | ||
| autoScaleToStage : Boolean
The auto scale to stage boolean flag
| Viewport3D | ||
| containerSprite : ViewportLayer
[read-only]
The
Sprite holding the Viewport3D
| Viewport3D | ||
| cullingRectangle : Rectangle
cullingRectangle stores the width, height, x, y of the culling rectangle.
| Viewport3D | ||
| interactive : Boolean
The interactive boolean flag
| Viewport3D | ||
| interactiveSceneManager : InteractiveSceneManager
interactiveSceneManager manages the interaction between the user's mouse and the Papervision3D scene.
| Viewport3D | ||
| lastRenderList : Array
lastRenderList stores RenderableListItems (Triangles, Lines, Pixels, Particles, Fog) of everything that was rendered in the last pass.
| Viewport3D | ||
| lineCuller : ILineCuller
lineCuller uses the culling Rectangle to determine which particles will not be rendered in BasicRenderEngine
| Viewport3D | ||
| particleCuller : IParticleCuller
particleCuller uses the cullingRectangle to determine which particles will not be rendered in BasicRenderEngine
| Viewport3D | ||
| sizeRectangle : Rectangle
sizeRectangle stores the width and the height of the Viewport3D sprite
| Viewport3D | ||
| triangleCuller : ITriangleCuller
triangleCuller uses the cullingRectangle to determine which triangles will not be rendered in BasicRenderEngine
| Viewport3D | ||
| viewportHeight : Number
Height of the Viewport
| Viewport3D | ||
| viewportObjectFilter : ViewportObjectFilter
The
ViewportObjectFilter
| Viewport3D | ||
| viewportWidth : Number
Width of the
Viewport3D
| Viewport3D | ||
| Method | Defined by | ||
|---|---|---|---|
|
Viewport3D(viewportWidth:Number = 640, viewportHeight:Number = 480, autoScaleToStage:Boolean = false, interactive:Boolean = false, autoClipping:Boolean = true, autoCulling:Boolean = true)
| Viewport3D | ||
|
Gets the layer of the RenderListItem.
| Viewport3D | ||
|
destroy():void
Removes all references and sets the viewport's
InteractiveSceneManager to null for a future
garbage collection sweep
| Viewport3D | ||
|
Creates or receives a
ViewportLayer of the given DisplayObject3D
| Viewport3D | ||
|
Checks the Mouse x and y against the
RenderHitData
| Viewport3D | ||
|
hitTestPoint2D(point:Point):RenderHitData
Checks a
Point against the RenderHitData
of the viewport
| Viewport3D | ||
| Viewport3D | |||
|
updateAfterRender(renderSessionData:RenderSessionData):void
Updates a
ViewportLayer after the 3d data is rendered into the 2d scene
| Viewport3D | ||
|
updateBeforeRender(renderSessionData:RenderSessionData):void
Updates a
ViewportLayer prior to the 3d data being rendered into the 2d scene
| Viewport3D | ||
| Method | Defined by | ||
|---|---|---|---|
|
onAddedToStage(event:Event):void
Triggered when added to the stage to start listening to stage resizing
| Viewport3D | ||
|
onRemovedFromStage(event:Event):void
Triggered when removed from the stage to remove the stage resizing listener
| Viewport3D | ||
|
onStageResize(event:Event = null):void
Resizes the viewport when the stage is resized (if autoScaleToStage == true)
| Viewport3D | ||
|
setStageScaleMode():void
| Viewport3D | ||
| autoClipping | property |
autoClipping:Boolean [read-write]
Whether clipping is enabled (not rendering bitmap data outside the rectangle of the viewport by making use of the Sprite.scrollRect)
public function get autoClipping():Boolean
public function set autoClipping(value:Boolean):void
See also
| autoCulling | property |
autoCulling:Boolean [read-write]Whether culling is enabled (not rendering triangles hidden behind other triangles)
Implementation public function get autoCulling():Boolean
public function set autoCulling(value:Boolean):void
See also
| autoScaleToStage | property |
autoScaleToStage:Boolean [read-write]The auto scale to stage boolean flag
Implementation public function get autoScaleToStage():Boolean
public function set autoScaleToStage(value:Boolean):void
| containerSprite | property |
containerSprite:ViewportLayer [read-only]
The Sprite holding the Viewport3D
public function get containerSprite():ViewportLayer
| cullingRectangle | property |
public var cullingRectangle:RectanglecullingRectangle stores the width, height, x, y of the culling rectangle. It's used to determine the bounds in which the triangles are drawn.
See also
| interactive | property |
interactive:Boolean [read-write]The interactive boolean flag
Implementation public function get interactive():Boolean
public function set interactive(value:Boolean):void
| interactiveSceneManager | property |
public var interactiveSceneManager:InteractiveSceneManagerinteractiveSceneManager manages the interaction between the user's mouse and the Papervision3D scene. This is done by checking the mouse against renderHitData. renderHitData is generated from hitTestPoint2D and passed into the interactiveSceneManager to check agains the various mouse actions.
See also
| lastRenderList | property |
public var lastRenderList:ArraylastRenderList stores RenderableListItems (Triangles, Lines, Pixels, Particles, Fog) of everything that was rendered in the last pass. This list is used to determine hitTests in hitTestPoint2D.
See also
| lineCuller | property |
public var lineCuller:ILineCullerlineCuller uses the culling Rectangle to determine which particles will not be rendered in BasicRenderEngine
See also
| particleCuller | property |
public var particleCuller:IParticleCullerparticleCuller uses the cullingRectangle to determine which particles will not be rendered in BasicRenderEngine
See also
| sizeRectangle | property |
public var sizeRectangle:RectanglesizeRectangle stores the width and the height of the Viewport3D sprite
See also
| triangleCuller | property |
public var triangleCuller:ITriangleCullertriangleCuller uses the cullingRectangle to determine which triangles will not be rendered in BasicRenderEngine
See also
| viewportHeight | property |
viewportHeight:Number [read-write]Height of the Viewport
Implementation public function get viewportHeight():Number
public function set viewportHeight(value:Number):void
| viewportObjectFilter | property |
viewportObjectFilter:ViewportObjectFilter [read-write]
The ViewportObjectFilter
public function get viewportObjectFilter():ViewportObjectFilter
public function set viewportObjectFilter(value:ViewportObjectFilter):void
| viewportWidth | property |
viewportWidth:Number [read-write]
Width of the Viewport3D
public function get viewportWidth():Number
public function set viewportWidth(value:Number):void
| Viewport3D | () | constructor |
public function Viewport3D(viewportWidth:Number = 640, viewportHeight:Number = 480, autoScaleToStage:Boolean = false, interactive:Boolean = false, autoClipping:Boolean = true, autoCulling:Boolean = true)Parameters
viewportWidth:Number (default = 640) — Width of the viewport
|
|
viewportHeight:Number (default = 480) — Height of the viewport
|
|
autoScaleToStage:Boolean (default = false) — Determines whether the viewport should resize when the stage resizes
|
|
interactive:Boolean (default = false) — Determines whether the viewport should listen for Mouse events by creating an InteractiveSceneManager
|
|
autoClipping:Boolean (default = true) — Determines whether DisplayObject3Ds outside the rectangle of the viewport should be rendered
|
|
autoCulling:Boolean (default = true) — Detemines whether only the objects in front of the camera should be rendered. In other words, if a triangle is hidden by another triangle from the camera, it will not be rendered.
|
| accessLayerFor | () | method |
public function accessLayerFor(rc:RenderableListItem, setInstance:Boolean = false):ViewportLayerGets the layer of the RenderListItem. Most-likely internal use.
Parametersrc:RenderableListItem — A RenderableListItem to look for
|
|
setInstance:Boolean (default = false) — sets the container to the layer
|
ViewportLayer —
The found ViewportLayer
|
| destroy | () | method |
public function destroy():voidRemoves all references and sets the viewport's InteractiveSceneManager to null for a future garbage collection sweep
| getChildLayer | () | method |
public function getChildLayer(do3d:DisplayObject3D, createNew:Boolean = true, recurse:Boolean = true):ViewportLayer
Creates or receives a ViewportLayer of the given DisplayObject3D
do3d:DisplayObject3D — A DisplayObject3D used to either find the layer or create a new one
|
|
createNew:Boolean (default = true) — Forces the creation of a new layer
|
|
recurse:Boolean (default = true) — Adds the DisplayObject3D as well as all of its children to a new layer
|
ViewportLayer —
ViewportLayer of the given DisplayObject3D
|
| hitTestMouse | () | method |
public function hitTestMouse():RenderHitData
Checks the Mouse x and y against the RenderHitData
RenderHitData —
RenderHitData of the current mouse location
|
| hitTestPoint2D | () | method |
public function hitTestPoint2D(point:Point):RenderHitData
Checks a Point against the RenderHitData
of the viewport
point:Point — a 2d Point you want to analyze into 3d space
|
RenderHitData —
RenderHitData of the given Point
|
| hitTestPointObject | () | method |
public function hitTestPointObject(point:Point, object:DisplayObject3D):RenderHitDataParameters
point:Point |
|
object:DisplayObject3D |
RenderHitData |
| onAddedToStage | () | method |
protected function onAddedToStage(event:Event):voidTriggered when added to the stage to start listening to stage resizing
Parametersevent:Event |
| onRemovedFromStage | () | method |
protected function onRemovedFromStage(event:Event):voidTriggered when removed from the stage to remove the stage resizing listener
Parametersevent:Event |
| onStageResize | () | method |
protected function onStageResize(event:Event = null):voidResizes the viewport when the stage is resized (if autoScaleToStage == true)
Parametersevent:Event (default = null) |
| setStageScaleMode | () | method |
protected function setStageScaleMode():void
| updateAfterRender | () | method |
public function updateAfterRender(renderSessionData:RenderSessionData):void
Updates a ViewportLayer after the 3d data is rendered into the 2d scene
renderSessionData:RenderSessionData — All the information regarding the current renderSession packed into one class
|
| updateBeforeRender | () | method |
public function updateBeforeRender(renderSessionData:RenderSessionData):void
Updates a ViewportLayer prior to the 3d data being rendered into the 2d scene
renderSessionData:RenderSessionData — All the information regarding the current renderSession packed into one class
|