Packagelaya.d3.terrain
Classpublic class TerrainFilter
InheritanceTerrainFilter Inheritance GeometryFilter Inheritance EventDispatcher Inheritance Object
Implements IRenderable

TerrainFilter 类用于创建TerrainFilter过滤器。



Public Properties
 PropertyDefined By
  _boundingBoxCorners : Array
TerrainFilter
 Inheriteddestroyed : Boolean
[read-only] 获取是否已销毁。
GeometryFilter
  _gridSize : Number
TerrainFilter
  memorySize : int
TerrainFilter
  _originalBoundingBox : BoundBox
[override] [read-only]
TerrainFilter
  _originalBoundingSphere : BoundSphere
[override] [read-only]
TerrainFilter
  _owner : TerrainChunk
TerrainFilter
  triangleCount : int
[read-only]
TerrainFilter
  _vertexBufferCount : int
[read-only]
TerrainFilter
Protected Properties
 PropertyDefined By
  _boundingBox : BoundBox
TerrainFilter
  _boundingSphere : BoundSphere
TerrainFilter
  _currentNumberIndices : int
TerrainFilter
  _indexArrayBuffer : Uint16Array
TerrainFilter
  _indexBuffer : IndexBuffer3D
TerrainFilter
  _maxNumberIndices : int
TerrainFilter
  _numberTriangle : int
TerrainFilter
  _numberVertices : int
TerrainFilter
  _vertexBuffer : VertexBuffer3D
TerrainFilter
Public Methods
 MethodDefined By
  
TerrainFilter(owner:TerrainChunk, chunkOffsetX:int, chunkOffsetZ:int, gridSize:Number, terrainHeightData:Float32Array, heightDataWidth:int, heightDataHeight:int, cameraCoordinateInverse:Boolean)
创建一个新的 MeshFilter 实例。
TerrainFilter
  
_beforeRender(state:RenderState):Boolean
TerrainFilter
  
_destroy():void
[override]
TerrainFilter
  
TerrainFilter
  
TerrainFilter
  
_render(state:RenderState):void
TerrainFilter
  
_renderRuntime(conchGraphics3D:*, renderElement:RenderElement, state:RenderState):void
TerrainFilter
  
calcLeafBoudingBox(worldMatrix:Matrix4x4):void
TerrainFilter
  
calcLeafBoudingSphere(worldMatrix:Matrix4x4, maxScale:Number):void
TerrainFilter
  
TerrainFilter
 Inherited
event(type:String, data:* = null):Boolean
派发事件。
EventDispatcher
 Inherited
hasListener(type:String):Boolean
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。
EventDispatcher
 Inherited
isMouseEvent(type:String):Boolean
检测指定事件类型是否是鼠标事件。
EventDispatcher
 Inherited
off(type:String, caller:*, listener:Function, onceOnly:Boolean = false):EventDispatcher
从 EventDispatcher 对象中删除侦听器。
EventDispatcher
 Inherited
offAll(type:String = null):EventDispatcher
从 EventDispatcher 对象中删除指定事件类型的所有侦听器。
EventDispatcher
 Inherited
on(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher
使用 EventDispatcher 对象注册指定类型的事件侦听器对象,以使侦听器能够接收事件通知。
EventDispatcher
 Inherited
once(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher
使用 EventDispatcher 对象注册指定类型的事件侦听器对象,以使侦听器能够接收事件通知,此侦听事件响应一次后自动移除。
EventDispatcher
Protected Methods
 MethodDefined By
  
assembleIndex(camera:Camera, cameraPostion:Vector3):Boolean
TerrainFilter
  
TerrainFilter
  
isNeedAssemble(camera:Camera, cameraPostion:Vector3):int
TerrainFilter
  
TerrainFilter
Property Detail
_boundingBoxproperty
protected var _boundingBox:BoundBox

_boundingBoxCornersproperty 
public var _boundingBoxCorners:Array

_boundingSphereproperty 
protected var _boundingSphere:BoundSphere

_currentNumberIndicesproperty 
protected var _currentNumberIndices:int

_gridSizeproperty 
public var _gridSize:Number

_indexArrayBufferproperty 
protected var _indexArrayBuffer:Uint16Array

_indexBufferproperty 
protected var _indexBuffer:IndexBuffer3D

_maxNumberIndicesproperty 
protected var _maxNumberIndices:int

_numberTriangleproperty 
protected var _numberTriangle:int

_numberVerticesproperty 
protected var _numberVertices:int

_originalBoundingBoxproperty 
_originalBoundingBox:BoundBox  [read-only] [override]


Implementation
    public function get _originalBoundingBox():BoundBox
_originalBoundingSphereproperty 
_originalBoundingSphere:BoundSphere  [read-only] [override]


Implementation
    public function get _originalBoundingSphere():BoundSphere
_ownerproperty 
public var _owner:TerrainChunk

_vertexBufferproperty 
protected var _vertexBuffer:VertexBuffer3D

_vertexBufferCountproperty 
_vertexBufferCount:int  [read-only]


Implementation
    public function get _vertexBufferCount():int
memorySizeproperty 
public var memorySize:int

triangleCountproperty 
triangleCount:int  [read-only]


Implementation
    public function get triangleCount():int
Constructor Detail
TerrainFilter()Constructor
public function TerrainFilter(owner:TerrainChunk, chunkOffsetX:int, chunkOffsetZ:int, gridSize:Number, terrainHeightData:Float32Array, heightDataWidth:int, heightDataHeight:int, cameraCoordinateInverse:Boolean)

创建一个新的 MeshFilter 实例。

Parameters
owner:TerrainChunk — 所属网格精灵。
 
chunkOffsetX:int
 
chunkOffsetZ:int
 
gridSize:Number
 
terrainHeightData:Float32Array
 
heightDataWidth:int
 
heightDataHeight:int
 
cameraCoordinateInverse:Boolean
Method Detail
_beforeRender()method
public function _beforeRender(state:RenderState):Boolean

Parameters

state:RenderState

Returns
Boolean
_destroy()method 
override public function _destroy():void

_getIndexBuffer()method 
public function _getIndexBuffer():IndexBuffer3D

Returns
IndexBuffer3D
_getVertexBuffer()method 
public function _getVertexBuffer(index:int = 0):VertexBuffer3D

Parameters

index:int (default = 0)

Returns
VertexBuffer3D
_render()method 
public function _render(state:RenderState):void

Parameters

state:RenderState

_renderRuntime()method 
public function _renderRuntime(conchGraphics3D:*, renderElement:RenderElement, state:RenderState):void

Parameters

conchGraphics3D:*
 
renderElement:RenderElement
 
state:RenderState

assembleIndex()method 
protected function assembleIndex(camera:Camera, cameraPostion:Vector3):Boolean

Parameters

camera:Camera
 
cameraPostion:Vector3

Returns
Boolean
assembleIndexInit()method 
protected function assembleIndexInit():void

calcLeafBoudingBox()method 
public function calcLeafBoudingBox(worldMatrix:Matrix4x4):void

Parameters

worldMatrix:Matrix4x4

calcLeafBoudingSphere()method 
public function calcLeafBoudingSphere(worldMatrix:Matrix4x4, maxScale:Number):void

Parameters

worldMatrix:Matrix4x4
 
maxScale:Number

calcOriginalBoudingBoxAndSphere()method 
public function calcOriginalBoudingBoxAndSphere():void

isNeedAssemble()method 
protected function isNeedAssemble(camera:Camera, cameraPostion:Vector3):int

Parameters

camera:Camera
 
cameraPostion:Vector3

Returns
int
recreateResource()method 
protected function recreateResource():void