Package | laya.d3.terrain |
Class | public class TerrainFilter |
Inheritance | TerrainFilter GeometryFilter EventDispatcher Object |
Implements | IRenderable |
TerrainFilter
类用于创建TerrainFilter过滤器。
Property | Defined By | ||
---|---|---|---|
_boundingBoxCorners : Array | TerrainFilter | ||
destroyed : 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 |
Property | Defined 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 |
Method | Defined 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 | |||
_getVertexBuffer(index:int = 0):VertexBuffer3D | 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 | |||
event(type:String, data:* = null):Boolean
派发事件。
| EventDispatcher | ||
hasListener(type:String):Boolean
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。
| EventDispatcher | ||
isMouseEvent(type:String):Boolean
检测指定事件类型是否是鼠标事件。
| EventDispatcher | ||
off(type:String, caller:*, listener:Function, onceOnly:Boolean = false):EventDispatcher
从 EventDispatcher 对象中删除侦听器。
| EventDispatcher | ||
offAll(type:String = null):EventDispatcher
从 EventDispatcher 对象中删除指定事件类型的所有侦听器。
| EventDispatcher | ||
on(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher
使用 EventDispatcher 对象注册指定类型的事件侦听器对象,以使侦听器能够接收事件通知。
| EventDispatcher | ||
once(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher
使用 EventDispatcher 对象注册指定类型的事件侦听器对象,以使侦听器能够接收事件通知,此侦听事件响应一次后自动移除。
| EventDispatcher |
Method | Defined By | ||
---|---|---|---|
TerrainFilter | |||
assembleIndexInit():void | TerrainFilter | ||
TerrainFilter | |||
recreateResource():void | TerrainFilter |
_boundingBox | property |
protected var _boundingBox:BoundBox
_boundingBoxCorners | property |
public var _boundingBoxCorners:Array
_boundingSphere | property |
protected var _boundingSphere:BoundSphere
_currentNumberIndices | property |
protected var _currentNumberIndices:int
_gridSize | property |
public var _gridSize:Number
_indexArrayBuffer | property |
protected var _indexArrayBuffer:Uint16Array
_indexBuffer | property |
protected var _indexBuffer:IndexBuffer3D
_maxNumberIndices | property |
protected var _maxNumberIndices:int
_numberTriangle | property |
protected var _numberTriangle:int
_numberVertices | property |
protected var _numberVertices:int
_originalBoundingBox | property |
_originalBoundingBox:BoundBox
[read-only] [override]
public function get _originalBoundingBox():BoundBox
_originalBoundingSphere | property |
_originalBoundingSphere:BoundSphere
[read-only] [override]
public function get _originalBoundingSphere():BoundSphere
_owner | property |
public var _owner:TerrainChunk
_vertexBuffer | property |
protected var _vertexBuffer:VertexBuffer3D
_vertexBufferCount | property |
_vertexBufferCount:int
[read-only] public function get _vertexBufferCount():int
memorySize | property |
public var memorySize:int
triangleCount | property |
triangleCount:int
[read-only] public function get triangleCount():int
TerrainFilter | () | Constructor |
public function TerrainFilter(owner:TerrainChunk, chunkOffsetX:int, chunkOffsetZ:int, gridSize:Number, terrainHeightData:Float32Array, heightDataWidth:int, heightDataHeight:int, cameraCoordinateInverse:Boolean)
创建一个新的 MeshFilter
实例。
owner:TerrainChunk — 所属网格精灵。
| |
chunkOffsetX:int | |
chunkOffsetZ:int | |
gridSize:Number | |
terrainHeightData:Float32Array | |
heightDataWidth:int | |
heightDataHeight:int | |
cameraCoordinateInverse:Boolean |
_beforeRender | () | method |
_destroy | () | method |
override public function _destroy():void
_getIndexBuffer | () | method |
_getVertexBuffer | () | method |
public function _getVertexBuffer(index:int = 0):VertexBuffer3D
Parameters
index:int (default = 0 )
|
VertexBuffer3D |
_render | () | method |
_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 |
Boolean |
assembleIndexInit | () | method |
protected function assembleIndexInit():void
calcLeafBoudingBox | () | method |
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 |
int |
recreateResource | () | method |
protected function recreateResource():void