Skip to content

Class: SphereGeometry

Sphere Geometry

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

constructor

new SphereGeometry(radius, widthSegments, heightSegments, phiStart?, phiLength?, thetaStart?, thetaLength?)

Parameters

NameTypeDescription
radiusanyradius of sphere
widthSegmentsanyDefine the number of horizontal segments
heightSegmentsanyDefine the number of vertical segments
phiStart?anyThe starting point radian of the equatorial line of a sphere
phiLength?anyThe arc length of the equatorial line of a sphere
thetaStart?anyThe radian of the starting point of the sphere's meridian
thetaLength?anyArc length of sphere meridian

Overrides

GeometryBase.constructor

Defined in

src/shape/SphereGeometry.ts:53

Properties

instanceID

instanceID: string

Inherited from

GeometryBase.instanceID

Defined in

src/core/geometry/GeometryBase.ts:34


name

name: string

Inherited from

GeometryBase.name

Defined in

src/core/geometry/GeometryBase.ts:35


subGeometries

subGeometries: SubGeometry[] = []

Inherited from

GeometryBase.subGeometries

Defined in

src/core/geometry/GeometryBase.ts:36


morphTargetsRelative

morphTargetsRelative: boolean

Inherited from

GeometryBase.morphTargetsRelative

Defined in

src/core/geometry/GeometryBase.ts:37


morphTargetDictionary

morphTargetDictionary: Object

Type declaration

NameType
valuestring
keynumber

Inherited from

GeometryBase.morphTargetDictionary

Defined in

src/core/geometry/GeometryBase.ts:38


shape_vertices

shape_vertices: any[] = []

Defined in

src/shape/SphereGeometry.ts:10


shape_indices

shape_indices: any[] = []

Defined in

src/shape/SphereGeometry.ts:11


radius

radius: number

radius of sphere

Defined in

src/shape/SphereGeometry.ts:16


widthSegments

widthSegments: number

Define the number of horizontal segments

Defined in

src/shape/SphereGeometry.ts:20


heightSegments

heightSegments: number

Define the number of vertical segments

Defined in

src/shape/SphereGeometry.ts:24


phiStart

phiStart: number

The starting point radian of the equatorial line of a sphere

Defined in

src/shape/SphereGeometry.ts:28


phiLength

phiLength: number

The arc length of the equatorial line of a sphere

Defined in

src/shape/SphereGeometry.ts:32


thetaStart

thetaStart: number

The radian of the starting point of the sphere's meridian

Defined in

src/shape/SphereGeometry.ts:36


thetaLength

thetaLength: number

Arc length of sphere meridian

Defined in

src/shape/SphereGeometry.ts:40

Accessors

indicesBuffer

get indicesBuffer(): GeometryIndicesBuffer

Returns

GeometryIndicesBuffer

Inherited from

GeometryBase.indicesBuffer

Defined in

src/core/geometry/GeometryBase.ts:58


vertexBuffer

get vertexBuffer(): GeometryVertexBuffer

Returns

GeometryVertexBuffer

Inherited from

GeometryBase.vertexBuffer

Defined in

src/core/geometry/GeometryBase.ts:62


vertexAttributes

get vertexAttributes(): string[]

Returns

string[]

Inherited from

GeometryBase.vertexAttributes

Defined in

src/core/geometry/GeometryBase.ts:66


vertexAttributeMap

get vertexAttributeMap(): Map<string, VertexAttributeData>

Returns

Map<string, VertexAttributeData>

Inherited from

GeometryBase.vertexAttributeMap

Defined in

src/core/geometry/GeometryBase.ts:70


geometryType

get geometryType(): GeometryVertexType

Returns

GeometryVertexType

Inherited from

GeometryBase.geometryType

Defined in

src/core/geometry/GeometryBase.ts:74

set geometryType(value): void

Parameters

NameType
valueGeometryVertexType

Returns

void

Inherited from

GeometryBase.geometryType

Defined in

src/core/geometry/GeometryBase.ts:77


bounds

get bounds(): BoundingBox

Returns

BoundingBox

Inherited from

GeometryBase.bounds

Defined in

src/core/geometry/GeometryBase.ts:81

set bounds(value): void

Parameters

NameType
valueBoundingBox

Returns

void

Inherited from

GeometryBase.bounds

Defined in

src/core/geometry/GeometryBase.ts:124

Methods

addSubGeometry

addSubGeometry(...lodLevels): void

add subGeometry from lod level

See

LodLevel

Parameters

NameType
...lodLevelsLodLevel[]

Returns

void

Inherited from

GeometryBase.addSubGeometry

Defined in

src/core/geometry/GeometryBase.ts:132


generate

generate(shaderReflection): void

create geometry by shaderReflection

Parameters

NameTypeDescription
shaderReflectionShaderReflectionShaderReflection

Returns

void

Inherited from

GeometryBase.generate

Defined in

src/core/geometry/GeometryBase.ts:142


setIndices

setIndices(data): void

Parameters

NameType
dataArrayBufferData

Returns

void

Inherited from

GeometryBase.setIndices

Defined in

src/core/geometry/GeometryBase.ts:151


setAttribute

setAttribute(attribute, data): void

Parameters

NameType
attributestring
dataArrayBufferData

Returns

void

Inherited from

GeometryBase.setAttribute

Defined in

src/core/geometry/GeometryBase.ts:163


getAttribute

getAttribute(attribute): VertexAttributeData

Parameters

NameType
attributestring

Returns

VertexAttributeData

Inherited from

GeometryBase.getAttribute

Defined in

src/core/geometry/GeometryBase.ts:176


hasAttribute

hasAttribute(attribute): boolean

Parameters

NameType
attributestring

Returns

boolean

Inherited from

GeometryBase.hasAttribute

Defined in

src/core/geometry/GeometryBase.ts:180


genWireframe

genWireframe(): Vector3[]

Returns

Vector3[]

Inherited from

GeometryBase.genWireframe

Defined in

src/core/geometry/GeometryBase.ts:184


compute

compute(): void

Returns

void

Inherited from

GeometryBase.compute

Defined in

src/core/geometry/GeometryBase.ts:208


computeNormals

computeNormals(): SphereGeometry

Returns

SphereGeometry

Inherited from

GeometryBase.computeNormals

Defined in

src/core/geometry/GeometryBase.ts:227


isPrimitive

isPrimitive(): boolean

Returns

boolean

Inherited from

GeometryBase.isPrimitive

Defined in

src/core/geometry/GeometryBase.ts:269


destroy

destroy(force?): void

Parameters

NameType
force?boolean

Returns

void

Inherited from

GeometryBase.destroy

Defined in

src/core/geometry/GeometryBase.ts:273