Package | laya.d3.terrain |
Class | public class TerrainLeaf |
Inheritance | TerrainLeaf Object |
TerrainLeaf
Terrain的叶子节点
Property | Defined By | ||
---|---|---|---|
__ADAPT_MATRIX__ : Matrix4x4 [static] | TerrainLeaf | ||
__ADAPT_MATRIX_INV__ : Matrix4x4 [static] | TerrainLeaf | ||
_boundingBox : BoundBox | TerrainLeaf | ||
_boundingSphere : BoundSphere | TerrainLeaf | ||
CHUNK_GRID_NUM : int = 64 [static] | TerrainLeaf | ||
_currentLODLevel : int | TerrainLeaf | ||
LEAF_GRID_NUM : int = 32 [static] | TerrainLeaf | ||
LEAF_MAX_INDEX_COUNT : int [static] | TerrainLeaf | ||
LEAF_PLANE_MAX_INDEX_COUNT : int [static] | TerrainLeaf | ||
LEAF_PLANE_VERTEXT_COUNT : int [static] | TerrainLeaf | ||
LEAF_SKIRT_MAX_INDEX_COUNT : int [static] | TerrainLeaf | ||
LEAF_SKIRT_VERTEXT_COUNT : int [static] | TerrainLeaf | ||
LEAF_VERTEXT_COUNT : int [static] | TerrainLeaf | ||
_sizeOfY : Vector2 | TerrainLeaf | ||
__VECTOR3__ : Vector3 [static] | TerrainLeaf |
Method | Defined By | ||
---|---|---|---|
创建一个新的 TerrainLeaf 实例。
| TerrainLeaf | ||
__init__():void [static] | TerrainLeaf | ||
calcLeafBoudingBox(worldMatrix:Matrix4x4):void | TerrainLeaf | ||
calcLeafBoudingSphere(worldMatrix:Matrix4x4, maxScale:Number):void | TerrainLeaf | ||
calcLODErrors(terrainHeightData:Float32Array, heighDataWidth:int, heightDataHeight:int):void | TerrainLeaf | ||
TerrainLeaf | |||
calcSkirtVertextBuffer(offsetChunkX:int, offsetChunkZ:int, beginX:int, beginZ:int, girdSize:int, vertextBuffer:Float32Array, offset:int, strideSize:int, terrainHeightData:Float32Array, heighDataWidth:int, heightDataHeight:int):void | TerrainLeaf | ||
calcVertextBuffer(offsetChunkX:int, offsetChunkZ:int, beginX:int, beginZ:int, girdSize:Number, vertextBuffer:Float32Array, offset:int, strideSize:int, terrainHeightData:Float32Array, heighDataWidth:int, heightDataHeight:int, cameraCoordinateInverse:Boolean):void | TerrainLeaf | ||
calcVertextNorml(x:int, z:int, terrainHeightData:Float32Array, heighDataWidth:int, heightDataHeight:int, normal:Vector3):void | TerrainLeaf | ||
calcVertextNormlUV(x:int, z:int, terrainWidth:Number, terrainHeight:Number, normal:Vector3):void | TerrainLeaf | ||
determineLod(eyePos:Vector3, perspectiveFactor:Number, tolerance:Number, tolerAndPerspectiveChanged:Boolean):int | TerrainLeaf | ||
getHeightFromTerrainHeightData(x:int, z:int, terrainHeightData:Float32Array, heighDataWidth:int, heightDataHeight:int):Number [static] | TerrainLeaf | ||
getPlaneLODIndex(leafIndex:int, LODLevel:int):Uint16Array [static] | TerrainLeaf | ||
getSkirtLODIndex(leafIndex:int, LODLevel:int):Uint16Array [static] | TerrainLeaf |
__ADAPT_MATRIX__ | property |
public static var __ADAPT_MATRIX__:Matrix4x4
__ADAPT_MATRIX_INV__ | property |
public static var __ADAPT_MATRIX_INV__:Matrix4x4
__VECTOR3__ | property |
public static var __VECTOR3__:Vector3
_boundingBox | property |
public var _boundingBox:BoundBox
_boundingSphere | property |
public var _boundingSphere:BoundSphere
_currentLODLevel | property |
public var _currentLODLevel:int
_sizeOfY | property |
public var _sizeOfY:Vector2
CHUNK_GRID_NUM | property |
public static var CHUNK_GRID_NUM:int = 64
LEAF_GRID_NUM | property |
public static var LEAF_GRID_NUM:int = 32
LEAF_MAX_INDEX_COUNT | property |
public static var LEAF_MAX_INDEX_COUNT:int
LEAF_PLANE_MAX_INDEX_COUNT | property |
public static var LEAF_PLANE_MAX_INDEX_COUNT:int
LEAF_PLANE_VERTEXT_COUNT | property |
public static var LEAF_PLANE_VERTEXT_COUNT:int
LEAF_SKIRT_MAX_INDEX_COUNT | property |
public static var LEAF_SKIRT_MAX_INDEX_COUNT:int
LEAF_SKIRT_VERTEXT_COUNT | property |
public static var LEAF_SKIRT_VERTEXT_COUNT:int
LEAF_VERTEXT_COUNT | property |
public static var LEAF_VERTEXT_COUNT:int
TerrainLeaf | () | Constructor |
public function TerrainLeaf()
创建一个新的 TerrainLeaf
实例。
__init__ | () | method |
public static function __init__():void
calcLeafBoudingBox | () | method |
calcLeafBoudingSphere | () | method |
public function calcLeafBoudingSphere(worldMatrix:Matrix4x4, maxScale:Number):void
Parameters
worldMatrix:Matrix4x4 | |
maxScale:Number |
calcLODErrors | () | method |
public function calcLODErrors(terrainHeightData:Float32Array, heighDataWidth:int, heightDataHeight:int):void
Parameters
terrainHeightData:Float32Array | |
heighDataWidth:int | |
heightDataHeight:int |
calcOriginalBoudingBoxAndSphere | () | method |
public function calcOriginalBoudingBoxAndSphere():void
calcSkirtVertextBuffer | () | method |
public function calcSkirtVertextBuffer(offsetChunkX:int, offsetChunkZ:int, beginX:int, beginZ:int, girdSize:int, vertextBuffer:Float32Array, offset:int, strideSize:int, terrainHeightData:Float32Array, heighDataWidth:int, heightDataHeight:int):void
Parameters
offsetChunkX:int | |
offsetChunkZ:int | |
beginX:int | |
beginZ:int | |
girdSize:int | |
vertextBuffer:Float32Array | |
offset:int | |
strideSize:int | |
terrainHeightData:Float32Array | |
heighDataWidth:int | |
heightDataHeight:int |
calcVertextBuffer | () | method |
public function calcVertextBuffer(offsetChunkX:int, offsetChunkZ:int, beginX:int, beginZ:int, girdSize:Number, vertextBuffer:Float32Array, offset:int, strideSize:int, terrainHeightData:Float32Array, heighDataWidth:int, heightDataHeight:int, cameraCoordinateInverse:Boolean):void
Parameters
offsetChunkX:int | |
offsetChunkZ:int | |
beginX:int | |
beginZ:int | |
girdSize:Number | |
vertextBuffer:Float32Array | |
offset:int | |
strideSize:int | |
terrainHeightData:Float32Array | |
heighDataWidth:int | |
heightDataHeight:int | |
cameraCoordinateInverse:Boolean |
calcVertextNorml | () | method |
public function calcVertextNorml(x:int, z:int, terrainHeightData:Float32Array, heighDataWidth:int, heightDataHeight:int, normal:Vector3):void
Parameters
x:int | |
z:int | |
terrainHeightData:Float32Array | |
heighDataWidth:int | |
heightDataHeight:int | |
normal:Vector3 |
calcVertextNormlUV | () | method |
public function calcVertextNormlUV(x:int, z:int, terrainWidth:Number, terrainHeight:Number, normal:Vector3):void
Parameters
x:int | |
z:int | |
terrainWidth:Number | |
terrainHeight:Number | |
normal:Vector3 |
determineLod | () | method |
public function determineLod(eyePos:Vector3, perspectiveFactor:Number, tolerance:Number, tolerAndPerspectiveChanged:Boolean):int
Parameters
eyePos:Vector3 | |
perspectiveFactor:Number | |
tolerance:Number | |
tolerAndPerspectiveChanged:Boolean |
int |
getHeightFromTerrainHeightData | () | method |
public static function getHeightFromTerrainHeightData(x:int, z:int, terrainHeightData:Float32Array, heighDataWidth:int, heightDataHeight:int):Number
Parameters
x:int | |
z:int | |
terrainHeightData:Float32Array | |
heighDataWidth:int | |
heightDataHeight:int |
Number |
getPlaneLODIndex | () | method |
public static function getPlaneLODIndex(leafIndex:int, LODLevel:int):Uint16Array
Parameters
leafIndex:int | |
LODLevel:int |
Uint16Array |
getSkirtLODIndex | () | method |
public static function getSkirtLODIndex(leafIndex:int, LODLevel:int):Uint16Array
Parameters
leafIndex:int | |
LODLevel:int |
Uint16Array |