Class: TerrainGeometry
Hierarchy
PlaneGeometry
↳
TerrainGeometry
Constructors
Properties
- instanceID
- name
- subGeometries
- morphTargetsRelative
- morphTargetDictionary
- skinNames
- bindPose
- blendShapeData
- vertexDim
- vertexCount
- width
- height
- segmentW
- segmentH
- up
Accessors
Methods
- setHeight
- addSubGeometry
- generate
- setIndices
- setAttribute
- getAttribute
- hasAttribute
- genWireframe
- compute
- computeNormals
- isPrimitive
- destroy
Constructors
constructor
• new TerrainGeometry(width
, height
, segmentW?
, segmentH?
): TerrainGeometry
Parameters
Name | Type | Default value |
---|---|---|
width | number | undefined |
height | number | undefined |
segmentW | number | 199 |
segmentH | number | 199 |
Returns
Overrides
PlaneGeometry.constructor
Defined in
packages/geometry/terrain/TerrainGeometry.ts:9
Properties
instanceID
• instanceID: string
Inherited from
PlaneGeometry.instanceID
Defined in
src/core/geometry/GeometryBase.ts:39
name
• name: string
Inherited from
PlaneGeometry.name
Defined in
src/core/geometry/GeometryBase.ts:40
subGeometries
• subGeometries: SubGeometry
[] = []
Inherited from
PlaneGeometry.subGeometries
Defined in
src/core/geometry/GeometryBase.ts:41
morphTargetsRelative
• morphTargetsRelative: boolean
Inherited from
PlaneGeometry.morphTargetsRelative
Defined in
src/core/geometry/GeometryBase.ts:42
morphTargetDictionary
• morphTargetDictionary: Object
Index signature
▪ [blenderName: string
]: number
Inherited from
PlaneGeometry.morphTargetDictionary
Defined in
src/core/geometry/GeometryBase.ts:43
skinNames
• skinNames: string
[]
Inherited from
PlaneGeometry.skinNames
Defined in
src/core/geometry/GeometryBase.ts:44
bindPose
• bindPose: Matrix4
[]
Inherited from
PlaneGeometry.bindPose
Defined in
src/core/geometry/GeometryBase.ts:45
blendShapeData
• blendShapeData: BlendShapeData
Inherited from
PlaneGeometry.blendShapeData
Defined in
src/core/geometry/GeometryBase.ts:46
vertexDim
• vertexDim: number
Inherited from
PlaneGeometry.vertexDim
Defined in
src/core/geometry/GeometryBase.ts:47
vertexCount
• vertexCount: number
= 0
Inherited from
PlaneGeometry.vertexCount
Defined in
src/core/geometry/GeometryBase.ts:48
width
• width: number
Width of the plane
Inherited from
PlaneGeometry.width
Defined in
height
• height: number
Height of the plane
Inherited from
PlaneGeometry.height
Defined in
segmentW
• segmentW: number
Number of width segments of a plane
Inherited from
PlaneGeometry.segmentW
Defined in
segmentH
• segmentH: number
Number of height segments of a plane
Inherited from
PlaneGeometry.segmentH
Defined in
up
• up: Vector3
Define the normal vector of a plane
Inherited from
PlaneGeometry.up
Defined in
Accessors
heightData
• get
heightData(): number
[][]
Returns
number
[][]
Defined in
packages/geometry/terrain/TerrainGeometry.ts:81
greenData
• get
greenData(): Vector3
[]
Returns
Vector3
[]
Defined in
packages/geometry/terrain/TerrainGeometry.ts:85
indicesBuffer
• get
indicesBuffer(): GeometryIndicesBuffer
Returns
GeometryIndicesBuffer
Inherited from
PlaneGeometry.indicesBuffer
Defined in
src/core/geometry/GeometryBase.ts:69
vertexBuffer
• get
vertexBuffer(): GeometryVertexBuffer
Returns
GeometryVertexBuffer
Inherited from
PlaneGeometry.vertexBuffer
Defined in
src/core/geometry/GeometryBase.ts:73
vertexAttributes
• get
vertexAttributes(): string
[]
Returns
string
[]
Inherited from
PlaneGeometry.vertexAttributes
Defined in
src/core/geometry/GeometryBase.ts:77
vertexAttributeMap
• get
vertexAttributeMap(): Map
<string
, VertexAttributeData
>
Returns
Map
<string
, VertexAttributeData
>
Inherited from
PlaneGeometry.vertexAttributeMap
Defined in
src/core/geometry/GeometryBase.ts:81
geometryType
• get
geometryType(): GeometryVertexType
Returns
GeometryVertexType
Inherited from
PlaneGeometry.geometryType
Defined in
src/core/geometry/GeometryBase.ts:85
• set
geometryType(value
): void
Parameters
Name | Type |
---|---|
value | GeometryVertexType |
Returns
void
Inherited from
PlaneGeometry.geometryType
Defined in
src/core/geometry/GeometryBase.ts:88
bounds
• get
bounds(): BoundingBox
Returns
BoundingBox
Inherited from
PlaneGeometry.bounds
Defined in
src/core/geometry/GeometryBase.ts:92
• set
bounds(value
): void
Parameters
Name | Type |
---|---|
value | BoundingBox |
Returns
void
Inherited from
PlaneGeometry.bounds
Defined in
src/core/geometry/GeometryBase.ts:135
Methods
setHeight
▸ setHeight(texture
, height
): void
Parameters
Name | Type |
---|---|
texture | BitmapTexture2D |
height | number |
Returns
void
Defined in
packages/geometry/terrain/TerrainGeometry.ts:13
addSubGeometry
▸ addSubGeometry(...lodLevels
): SubGeometry
add subGeometry from lod level
Parameters
Name | Type |
---|---|
...lodLevels | LODDescriptor [] |
Returns
SubGeometry
See
LODDescriptor
Inherited from
PlaneGeometry.addSubGeometry
Defined in
src/core/geometry/GeometryBase.ts:144
generate
▸ generate(shaderReflection
): void
create geometry by shaderReflection
Parameters
Name | Type | Description |
---|---|---|
shaderReflection | ShaderReflection | ShaderReflection |
Returns
void
Inherited from
PlaneGeometry.generate
Defined in
src/core/geometry/GeometryBase.ts:155
setIndices
▸ setIndices(data
): void
Parameters
Name | Type |
---|---|
data | ArrayBufferData |
Returns
void
Inherited from
PlaneGeometry.setIndices
Defined in
src/core/geometry/GeometryBase.ts:165
setAttribute
▸ setAttribute(attribute
, data
): void
Parameters
Name | Type |
---|---|
attribute | string |
data | ArrayBufferData |
Returns
void
Inherited from
PlaneGeometry.setAttribute
Defined in
src/core/geometry/GeometryBase.ts:177
getAttribute
▸ getAttribute(attribute
): VertexAttributeData
Parameters
Name | Type |
---|---|
attribute | string |
Returns
VertexAttributeData
Inherited from
PlaneGeometry.getAttribute
Defined in
src/core/geometry/GeometryBase.ts:190
hasAttribute
▸ hasAttribute(attribute
): boolean
Parameters
Name | Type |
---|---|
attribute | string |
Returns
boolean
Inherited from
PlaneGeometry.hasAttribute
Defined in
src/core/geometry/GeometryBase.ts:194
genWireframe
▸ genWireframe(): Vector3
[]
Returns
Vector3
[]
Inherited from
PlaneGeometry.genWireframe
Defined in
src/core/geometry/GeometryBase.ts:198
compute
▸ compute(): void
Returns
void
Inherited from
PlaneGeometry.compute
Defined in
src/core/geometry/GeometryBase.ts:251
computeNormals
▸ computeNormals(): this
Returns
this
Inherited from
PlaneGeometry.computeNormals
Defined in
src/core/geometry/GeometryBase.ts:270
isPrimitive
▸ isPrimitive(): boolean
Returns
boolean
Inherited from
PlaneGeometry.isPrimitive
Defined in
src/core/geometry/GeometryBase.ts:312
destroy
▸ destroy(force?
): void
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
PlaneGeometry.destroy