xr-frame / Exports / Spherical
# Class: Spherical
球面坐标系。
# 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
# copy
▸ copy(other): Spherical
# Parameters
| Name | Type |
|---|---|
other | Spherical |
# Returns
# makeSafe
▸ makeSafe(): Spherical
restrict phi to be between EPS and PI-EPS。
# Returns
# set
▸ set(radius, phi, theta): Spherical
# Parameters
| Name | Type |
|---|---|
radius | number |
phi | number |
theta | number |
# Returns
# setFromCartesianCoords
▸ setFromCartesianCoords(x, y, z): Spherical
从笛卡尔坐标系的x、y、z转换。
# Parameters
| Name | Type |
|---|---|
x | number |
y | number |
z | number |
# Returns
# setFromVector3
▸ setFromVector3(vector): Spherical
从笛卡尔坐标系的Vector3转换。
# Parameters
| Name | Type |
|---|---|
vector | Vector3 |
# Returns
# toVector3
▸ toVector3(vector?): Vector3
转换到笛卡尔坐标系的Vector3。
# Parameters
| Name | Type |
|---|---|
vector? | Vector3 |