Packagelaya.d3.terrain
Classpublic class TerrainLeaf
InheritanceTerrainLeaf Inheritance Object

TerrainLeaf Terrain的叶子节点



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Property Detail
__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

_boundingBoxproperty 
public var _boundingBox:BoundBox

_boundingSphereproperty 
public var _boundingSphere:BoundSphere

_currentLODLevelproperty 
public var _currentLODLevel:int

_sizeOfYproperty 
public var _sizeOfY:Vector2

CHUNK_GRID_NUMproperty 
public static var CHUNK_GRID_NUM:int = 64

LEAF_GRID_NUMproperty 
public static var LEAF_GRID_NUM:int = 32

LEAF_MAX_INDEX_COUNTproperty 
public static var LEAF_MAX_INDEX_COUNT:int

LEAF_PLANE_MAX_INDEX_COUNTproperty 
public static var LEAF_PLANE_MAX_INDEX_COUNT:int

LEAF_PLANE_VERTEXT_COUNTproperty 
public static var LEAF_PLANE_VERTEXT_COUNT:int

LEAF_SKIRT_MAX_INDEX_COUNTproperty 
public static var LEAF_SKIRT_MAX_INDEX_COUNT:int

LEAF_SKIRT_VERTEXT_COUNTproperty 
public static var LEAF_SKIRT_VERTEXT_COUNT:int

LEAF_VERTEXT_COUNTproperty 
public static var LEAF_VERTEXT_COUNT:int

Constructor Detail
TerrainLeaf()Constructor
public function TerrainLeaf()

创建一个新的 TerrainLeaf 实例。

Method Detail
__init__()method
public static function __init__():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

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

Returns
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

Returns
Number
getPlaneLODIndex()method 
public static function getPlaneLODIndex(leafIndex:int, LODLevel:int):Uint16Array

Parameters

leafIndex:int
 
LODLevel:int

Returns
Uint16Array
getSkirtLODIndex()method 
public static function getSkirtLODIndex(leafIndex:int, LODLevel:int):Uint16Array

Parameters

leafIndex:int
 
LODLevel:int

Returns
Uint16Array