SphereGeometry
Defined in: radiance/src/geometries/SphereGeometry.ts:12
A sphere about the origin, with three.js’s vertex order and uv layout (three.js’s
SphereGeometry over the whole sphere). The poles are rows of widthSegments + 1 vertices that
share one position. Its normals point outward. widthSegments is at least 3 and
heightSegments at least 2, as in three.js, and both are rounded down.
The path tracer draws its triangles, shaded with the vertices’ normals, so more segments give a rounder outline.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SphereGeometry(
radius?,widthSegments?,heightSegments?):SphereGeometry
Defined in: radiance/src/geometries/SphereGeometry.ts:17
Parameters
Section titled “Parameters”radius?
Section titled “radius?”number = 1
widthSegments?
Section titled “widthSegments?”number = 32
heightSegments?
Section titled “heightSegments?”number = 16
Returns
Section titled “Returns”SphereGeometry
Overrides
Section titled “Overrides”Properties
Section titled “Properties”heightSegments
Section titled “heightSegments”
readonlyheightSegments:number
Defined in: radiance/src/geometries/SphereGeometry.ts:15
radius
Section titled “radius”
readonlyradius:number=1
Defined in: radiance/src/geometries/SphereGeometry.ts:18
readonlytype:string='SphereGeometry'
Defined in: radiance/src/geometries/SphereGeometry.ts:13
Overrides
Section titled “Overrides”version
Section titled “version”version:
number=0
Defined in: radiance/src/geometries/BufferGeometry.ts:18
Incremented by the setter of every attribute, and by the author after an in-place edit.
Inherited from
Section titled “Inherited from”widthSegments
Section titled “widthSegments”
readonlywidthSegments:number
Defined in: radiance/src/geometries/SphereGeometry.ts:14
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get index():
Uint32Array
Defined in: radiance/src/geometries/BufferGeometry.ts:56
Three vertex indices per triangle, counter-clockwise seen from the front. Required.
Returns
Section titled “Returns”Uint32Array
Set Signature
Section titled “Set Signature”set index(
value):void
Defined in: radiance/src/geometries/BufferGeometry.ts:59
Parameters
Section titled “Parameters”Uint32Array
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”normal
Section titled “normal”Get Signature
Section titled “Get Signature”get normal():
Float32Array|undefined
Defined in: radiance/src/geometries/BufferGeometry.ts:35
xyz per vertex, unit length. Computed by computeVertexNormals() when absent.
Returns
Section titled “Returns”Float32Array | undefined
Set Signature
Section titled “Set Signature”set normal(
value):void
Defined in: radiance/src/geometries/BufferGeometry.ts:38
Parameters
Section titled “Parameters”Float32Array | undefined
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”position
Section titled “position”Get Signature
Section titled “Get Signature”get position():
Float32Array
Defined in: radiance/src/geometries/BufferGeometry.ts:26
xyz per vertex. Required.
Returns
Section titled “Returns”Float32Array
Set Signature
Section titled “Set Signature”set position(
value):void
Defined in: radiance/src/geometries/BufferGeometry.ts:29
Parameters
Section titled “Parameters”Float32Array
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Get Signature
Section titled “Get Signature”get uv():
Float32Array|undefined
Defined in: radiance/src/geometries/BufferGeometry.ts:47
uv per vertex, three.js’s layout: v = 1 at the top of a plane and at a sphere’s north pole (design record 0001, Amendment 1). Absent: every uv is 0.
Returns
Section titled “Returns”Float32Array | undefined
Set Signature
Section titled “Set Signature”set uv(
value):void
Defined in: radiance/src/geometries/BufferGeometry.ts:50
Parameters
Section titled “Parameters”Float32Array | undefined
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”computeBoundingBox()
Section titled “computeBoundingBox()”computeBoundingBox():
Box3
Defined in: radiance/src/geometries/BufferGeometry.ts:103
The box around position. A geometry with no vertex gives an empty box: min above max.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”BufferGeometry.computeBoundingBox
computeVertexNormals()
Section titled “computeVertexNormals()”computeVertexNormals():
this
Defined in: radiance/src/geometries/BufferGeometry.ts:68
Sets normal to the area-weighted mean of the normals of the triangles that share each vertex,
as three.js does. A vertex that no triangle uses gets (0, 0, 0). Adds 1 to version.
Returns
Section titled “Returns”this