Class: Spherical

查看 llm.txt

最后一次编辑于 2026-10-22

球面坐标系。

Table of contents

Constructors

Properties

Methods

Constructors

constructor

• new Spherical(radius?, phi?, theta?)

Parameters

Name Type
radius? number
phi? number
theta? number

Properties

center

• center: Vector3

球面球心。


isSpherical

• isSpherical: boolean = true


phi

• phi: number

点在球面上的横向旋转角度。


radius

• radius: number

球面半径。


theta

• theta: number

点在球面上的纵向旋转角度。


EPS

▪ Static EPS: number = 0.000001

Methods

clone

▸ clone(): Spherical

Returns

Spherical


copy

▸ copy(other): Spherical

Parameters

Name Type
other Spherical

Returns

Spherical


makeSafe

▸ makeSafe(): Spherical

restrict phi to be between EPS and PI-EPS。

Returns

Spherical


set

▸ set(radius, phi, theta): Spherical

Parameters

Name Type
radius number
phi number
theta number

Returns

Spherical


setFromCartesianCoords

▸ setFromCartesianCoords(x, y, z): Spherical

从笛卡尔坐标系的x、y、z转换。

Parameters

Name Type
x number
y number
z number

Returns

Spherical


setFromVector3

▸ setFromVector3(vector): Spherical

从笛卡尔坐标系的Vector3转换。

Parameters

Name Type
vector Vector3

Returns

Spherical


toVector3

▸ toVector3(vector?): Vector3

转换到笛卡尔坐标系的Vector3。

Parameters

Name Type
vector? Vector3

Returns

Vector3