Skip to content
本页内容

Class: PlaneGeometry

一个用于生成平面几何体的类

Hierarchy

Properties

Methods

Accessors

Constructors

Properties

uuid

uuid: string = ''

唯一标识符

Inherited from

GeometryBase.uuid

Defined in

src/engine/core/geometry/GeometryBase.ts:37


name

name: string

名称

Inherited from

GeometryBase.name

Defined in

src/engine/core/geometry/GeometryBase.ts:41


onChange

onChange: boolean = true

是否正在变化

Inherited from

GeometryBase.onChange

Defined in

src/engine/core/geometry/GeometryBase.ts:45


subGeometries

subGeometries: SubGeometry[] = []

子几何体集合

Inherited from

GeometryBase.subGeometries

Defined in

src/engine/core/geometry/GeometryBase.ts:49


geometrySource

geometrySource: SerializeGeometrySource

Inherited from

GeometryBase.geometrySource

Defined in

src/engine/core/geometry/GeometryBase.ts:52


attributeArrays

attributeArrays: AttributeInfos

参数数组

Inherited from

GeometryBase.attributeArrays

Defined in

src/engine/core/geometry/GeometryBase.ts:57


morphTargetsRelative

morphTargetsRelative: boolean

morph动画类型

Inherited from

GeometryBase.morphTargetsRelative

Defined in

src/engine/core/geometry/GeometryBase.ts:62


morphTargetDictionary

morphTargetDictionary: Object

morph动画key列表

Type declaration

NameType
valuestring
keynumber

Inherited from

GeometryBase.morphTargetDictionary

Defined in

src/engine/core/geometry/GeometryBase.ts:66


bounds

bounds: BoundingBox

包围盒

Inherited from

GeometryBase.bounds

Defined in

src/engine/core/geometry/GeometryBase.ts:70


width

width: number

平面的宽度

Defined in

src/engine/shape/PlaneGeometry.ts:18


height

height: number

平面的高度

Defined in

src/engine/shape/PlaneGeometry.ts:22


segmentW

segmentW: number

平面的宽度分段数

Defined in

src/engine/shape/PlaneGeometry.ts:26


segmentH

segmentH: number

平面的高度分段数

Defined in

src/engine/shape/PlaneGeometry.ts:30


up

up: Vector3

定义平面的法线向量

Defined in

src/engine/shape/PlaneGeometry.ts:34

Methods

setGeometryBounds

setGeometryBounds(min, max): void

根据顶点坐标写入bounds

Parameters

NameType
minVector3
maxVector3

Returns

void

Inherited from

GeometryBase.setGeometryBounds

Defined in

src/engine/core/geometry/GeometryBase.ts:93


addSubGeometry

addSubGeometry(...subGeometry): void

添加子几何体

Parameters

NameType
...subGeometrySubGeometry[]

Returns

void

Inherited from

GeometryBase.addSubGeometry

Defined in

src/engine/core/geometry/GeometryBase.ts:133


setAttributes

setAttributes(modelName, attribArrays): void

添加参数

Parameters

NameTypeDescription
modelNamestring模型名称
attribArraysAttributeInfos参数数组

Returns

void

Inherited from

GeometryBase.setAttributes

Defined in

src/engine/core/geometry/GeometryBase.ts:144


hasAttribute

hasAttribute(name): boolean

是否存在某个参数

Parameters

NameTypeDescription
namestring参数名称

Returns

boolean

返回一个布尔值代表是否存在

Inherited from

GeometryBase.hasAttribute

Defined in

src/engine/core/geometry/GeometryBase.ts:154


getAttribute

getAttribute(name): AttributeInfo

获取指定参数

Parameters

NameTypeDescription
namestring参数名称

Returns

AttributeInfo

返回参数

Inherited from

GeometryBase.getAttribute

Defined in

src/engine/core/geometry/GeometryBase.ts:164


generate

generate(shaderReflection): void

几何体生成

Parameters

NameTypeDescription
shaderReflectionShaderReflectionShaderReflection

Returns

void

Inherited from

GeometryBase.generate

Defined in

src/engine/core/geometry/GeometryBase.ts:173


genWireframe

genWireframe(): Vector3[]

Returns

Vector3[]

Inherited from

GeometryBase.genWireframe

Defined in

src/engine/core/geometry/GeometryBase.ts:188


isPrimitive

isPrimitive(): boolean

Returns

boolean

Inherited from

GeometryBase.isPrimitive

Defined in

src/engine/core/geometry/GeometryBase.ts:216


serialization

serialization(): SerializeGeometryInstance

Returns

SerializeGeometryInstance

Overrides

GeometryBase.serialization

Defined in

src/engine/shape/PlaneGeometry.ts:185

Accessors

vertexBuffer

get vertexBuffer(): CompositeVertexGeometryBuffer

获取顶点缓存

Returns

CompositeVertexGeometryBuffer

Inherited from

GeometryBase.vertexBuffer

Defined in

src/engine/core/geometry/GeometryBase.ts:100

set vertexBuffer(value): void

设置顶点缓存

Parameters

NameType
valueCompositeVertexGeometryBuffer

Returns

void

Inherited from

GeometryBase.vertexBuffer

Defined in

src/engine/core/geometry/GeometryBase.ts:107


indexBuffer

get indexBuffer(): IndexGeometryBuffer

获取索引缓存

Returns

IndexGeometryBuffer

Inherited from

GeometryBase.indexBuffer

Defined in

src/engine/core/geometry/GeometryBase.ts:115

set indexBuffer(value): void

设置索引缓存

Parameters

NameType
valueIndexGeometryBuffer

Returns

void

Inherited from

GeometryBase.indexBuffer

Defined in

src/engine/core/geometry/GeometryBase.ts:122

Constructors

constructor

new PlaneGeometry(width, height, segmentW?, segmentH?, up?)

创建新的平面几何体对象。

Parameters

NameTypeDefault valueDescription
widthnumberundefined平面的宽度。
heightnumberundefined平面的高度。
segmentWnumber1平面的宽度分段数,默认值是1。
segmentHnumber1平面的高度分段数,默认值是1。
upVector3Vector3.Y_AXIS定义平面的法线向量,默认指向Y轴。

Overrides

GeometryBase.constructor

Defined in

src/engine/shape/PlaneGeometry.ts:46