Skip to content

Class: TerrainGeometry

Hierarchy

  • PlaneGeometry

    TerrainGeometry

Constructors

Properties

Accessors

Methods

Constructors

constructor

new TerrainGeometry(width, height, segmentW?, segmentH?): TerrainGeometry

Parameters

NameTypeDefault value
widthnumberundefined
heightnumberundefined
segmentWnumber199
segmentHnumber199

Returns

TerrainGeometry

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

src/shape/PlaneGeometry.ts:14


height

height: number

Height of the plane

Inherited from

PlaneGeometry.height

Defined in

src/shape/PlaneGeometry.ts:18


segmentW

segmentW: number

Number of width segments of a plane

Inherited from

PlaneGeometry.segmentW

Defined in

src/shape/PlaneGeometry.ts:22


segmentH

segmentH: number

Number of height segments of a plane

Inherited from

PlaneGeometry.segmentH

Defined in

src/shape/PlaneGeometry.ts:26


up

up: Vector3

Define the normal vector of a plane

Inherited from

PlaneGeometry.up

Defined in

src/shape/PlaneGeometry.ts:30

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

NameType
valueGeometryVertexType

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

NameType
valueBoundingBox

Returns

void

Inherited from

PlaneGeometry.bounds

Defined in

src/core/geometry/GeometryBase.ts:135

Methods

setHeight

setHeight(texture, height): void

Parameters

NameType
textureBitmapTexture2D
heightnumber

Returns

void

Defined in

packages/geometry/terrain/TerrainGeometry.ts:13


addSubGeometry

addSubGeometry(...lodLevels): SubGeometry

add subGeometry from lod level

Parameters

NameType
...lodLevelsLODDescriptor[]

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

NameTypeDescription
shaderReflectionShaderReflectionShaderReflection

Returns

void

Inherited from

PlaneGeometry.generate

Defined in

src/core/geometry/GeometryBase.ts:155


setIndices

setIndices(data): void

Parameters

NameType
dataArrayBufferData

Returns

void

Inherited from

PlaneGeometry.setIndices

Defined in

src/core/geometry/GeometryBase.ts:165


setAttribute

setAttribute(attribute, data): void

Parameters

NameType
attributestring
dataArrayBufferData

Returns

void

Inherited from

PlaneGeometry.setAttribute

Defined in

src/core/geometry/GeometryBase.ts:177


getAttribute

getAttribute(attribute): VertexAttributeData

Parameters

NameType
attributestring

Returns

VertexAttributeData

Inherited from

PlaneGeometry.getAttribute

Defined in

src/core/geometry/GeometryBase.ts:190


hasAttribute

hasAttribute(attribute): boolean

Parameters

NameType
attributestring

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

NameType
force?boolean

Returns

void

Inherited from

PlaneGeometry.destroy

Defined in

src/core/geometry/GeometryBase.ts:316

Released under the MIT License