Packageaway3d.core.render
Classpublic class HitTestRenderer
InheritanceHitTestRenderer Inheritance RendererBase

HitTestRenderer provides a renderer that can identify objects under a given screen position and can optionally calculate further geometrical information about the object at that point.

See also

away3d.core.managers.Mouse3DManager
Public Properties
 PropertyDefined by
 InheritedantiAlias : uint
The amount of anti-aliasing to use.
RendererBase
  _bitmapData : BitmapData
HitTestRenderer
  hitRenderable : IRenderable
[read-only] The IRenderable object directly under the hit-test position after a call to update.
HitTestRenderer
  hitUV : Point
[read-only] The UV coordinate at the hit position.
HitTestRenderer
  localHitPosition : Vector3D
[read-only] The coordinate in object space of the hit position.
HitTestRenderer
 InheritedswapBackBuffer : Boolean
Indicates whether or not the back buffer should be swapped when rendering is complete.
RendererBase
Protected Properties
 PropertyDefined by
 Inherited_backBufferInvalid : Boolean
RendererBase
 Inherited_backgroundB : Number = 0
RendererBase
 Inherited_backgroundG : Number = 0
RendererBase
 Inherited_backgroundR : Number = 0
RendererBase
 Inherited_context : Context3D
RendererBase
 Inherited_contextIndex : int = -1
RendererBase
 Inherited_renderableSorter : EntitySorterBase
RendererBase
 Inherited_stage3DProxy : Stage3DProxy
RendererBase
 Inherited_viewPortHeight : Number = 1
RendererBase
 Inherited_viewPortWidth : Number = 1
RendererBase
 Inherited_viewPortX : Number = 0
RendererBase
 Inherited_viewPortY : Number = 0
RendererBase
Public Methods
 MethodDefined by
  
HitTestRenderer
(renderMode:String = "auto")
Creates a new HitTestRenderer object.
HitTestRenderer
  
update(ratioX:Number, ratioY:Number, entityCollector:EntityCollector):void
Updates the object information at the given position for the given visible objects.
HitTestRenderer
Protected Methods
 MethodDefined by
  
draw(entityCollector:EntityCollector):void
Performs the actual drawing of geometry to the target.
HitTestRenderer
 Inherited
executeRender(entityCollector:EntityCollector, target:TextureBase = null, surfaceSelector:int = 0, additionalClearMask:int = 7):void
Renders the potentially visible geometry to the back buffer or texture.
RendererBase
 Inherited
Updates the viewport dimensions;
RendererBase
Property detail
_bitmapDataproperty
public var _bitmapData:BitmapData
hitRenderableproperty 
hitRenderable:IRenderable  [read-only]

The IRenderable object directly under the hit-test position after a call to update.

Implementation
    public function get hitRenderable():IRenderable
hitUVproperty 
hitUV:Point  [read-only]

The UV coordinate at the hit position.

Implementation
    public function get hitUV():Point
localHitPositionproperty 
localHitPosition:Vector3D  [read-only]

The coordinate in object space of the hit position.

Implementation
    public function get localHitPosition():Vector3D
Constructor detail
HitTestRenderer()constructor
public function HitTestRenderer(renderMode:String = "auto")Parameters
renderMode:String (default = "auto") — The render mode to use.
Init Parameters
Method detail
draw()method
protected override function draw(entityCollector:EntityCollector):void

Performs the actual drawing of geometry to the target.

Parameters
entityCollector:EntityCollector — The EntityCollector object containing the potentially visible geometry.
update()method 
public function update(ratioX:Number, ratioY:Number, entityCollector:EntityCollector):void

Updates the object information at the given position for the given visible objects.

Parameters
ratioX:Number — A ratio between 0 and 1 of the horizontal hit-test position relative to the viewport width.
 
ratioY:Number — A ratio between 0 and 1 of the vertical hit-test position relative to the viewport height.
 
entityCollector:EntityCollector — The EntityCollector object containing all potentially visible objects.
Wiki link
Click to go to the wiki page for 'away3d.core.render.HitTestRenderer'

Code examples

Comments