微信小程序
Spherical
xr-frame / Exports / Spherical
# Class: Spherical
球面坐标系。
# Table of contents
# Constructors
- constructor
# Properties
- center
- isSpherical
- phi
- radius
- theta
- EPS
# Methods
- clone
- copy
- makeSafe
- set
- setFromCartesianCoords
- setFromVector3
- toVector3
# Constructors
# constructor
• new Spherical(radius?
, phi?
, theta?
)
# Parameters
# 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
# Returns
Spherical
# makeSafe
▸ makeSafe(): Spherical
restrict phi to be between EPS and PI-EPS。
# Returns
Spherical
# set
▸ set(radius
, phi
, theta
): Spherical
# Parameters
# Returns
Spherical
# setFromCartesianCoords
▸ setFromCartesianCoords(x
, y
, z
): Spherical
从笛卡尔坐标系的x、y、z转换。
# Parameters
# Returns
Spherical
# setFromVector3
▸ setFromVector3(vector
): Spherical
从笛卡尔坐标系的Vector3转换。
# Parameters
# Returns
Spherical
# toVector3
▸ toVector3(vector?
): Vector3
转换到笛卡尔坐标系的Vector3。
# Parameters
# Returns
Vector3