three.js Cylindrical

2023-02-16 17:46 更新

一個點的cylindrical coordinates(圓柱坐標)。

構造器(Constructor)

Cylindrical( radius : Float, theta : Float, y : Float )

radius - 從原點到x-z平面上一點的距離 默認值為 1.0.
theta - 在x-z平面內的逆時針角度,以z軸正方向的計算弧度。默認值為0。
y - x-z平面以上的高度 默認值為 0.

屬性(Properties)

.radius : Float

.theta : Float

.y : Float

方法

.clone () : Cylindrical

返回一個與當前擁有相同 radius, theta 和 y 屬性的圓柱坐標。

.copy ( other : Cylindrical ) : this

將傳入的圓柱坐標對象的 radius, theta 和 y 屬性賦給當前對象。

.set ( radius : Float, theta : Float, y : Float ) : this

設置該對象的 radius, theta 和 y 屬性。

.setFromVector3 ( vec3 : Vector3 ) : this

從 Vector3 中取x,y,z,并調用setFromCartesianCoords來設置圓柱坐標的 radius、theta 和 y 的屬性值。

.setFromCartesianCoords ( x : Float, y : Float, z : Float ) : this

使用笛卡爾坐標來設置該圓柱坐標中 radius, theta 以及 y 的屬性值。

源碼(Source)

src/math/Cylindrical.js


以上內容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號