Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
e713a499
T
three.js
项目概览
车家大少爷
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e713a499
编写于
11月 30, 2016
作者:
M
Mugen87
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cylindrical: Support for Cylindrical Coordinates
上级
4984e793
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
125 addition
and
0 deletion
+125
-0
docs/api/math/Cylindrical.html
docs/api/math/Cylindrical.html
+62
-0
docs/list.js
docs/list.js
+1
-0
src/Three.js
src/Three.js
+1
-0
src/math/Cylindrical.js
src/math/Cylindrical.js
+61
-0
未找到文件。
docs/api/math/Cylindrical.html
0 → 100644
浏览文件 @
e713a499
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
/>
<base
href=
"../../"
/>
<script
src=
"list.js"
></script>
<script
src=
"page.js"
></script>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"page.css"
/>
</head>
<body>
<h1>
[name]
</h1>
<div
class=
"desc"
>
A point's cylindrical coordinates.
</div>
<h2>
Constructor
</h2>
<h3>
[name]( [page:Float radius], [page:Float theta], [page:Float y] )
</h3>
<div>
radius -- [page:Float] distance from the origin to a point in the x-z plane
<br
/>
theta -- [page:Float] counterclockwise angle in the x-z plane measured in radians from the positive z-axis
<br
/>
y -- [page:Float] height above the x-z plane
</div>
<h2>
Properties
</h2>
<h3>
[property:Float radius]
</h3>
<h3>
[property:Float theta]
</h3>
<h3>
[property:Float y]
</h3>
<h2>
Methods
</h2>
<h3>
[method:Cylindrical set]( [page:Float radius], [page:Float theta], [page:Float y] ) [page:Cylindrical this]
</h3>
<div>
Sets values of this cylindrical's component coordinates.
</div>
<h3>
[method:Cylindrical copy]( [page:Cylindrical c] ) [page:Cylindrical this]
</h3>
<div>
Copies value of *c* to this cylindrical.
</div>
<h3>
[method:Cylindrical clone]() [page:Cylindrical this]
</h3>
<div>
Clones this cylindrical.
</div>
<h3>
[method:Cylindrical setFromVector3]( [page:Vector3 v] ) [page:Cylindrical this]
</h3>
<div>
Sets this object from the vector *v*.
</div>
<h2>
Source
</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
docs/list.js
浏览文件 @
e713a499
...
...
@@ -238,6 +238,7 @@ var list = {
[
"
Box2
"
,
"
api/math/Box2
"
],
[
"
Box3
"
,
"
api/math/Box3
"
],
[
"
Color
"
,
"
api/math/Color
"
],
[
"
Cylindrical
"
,
"
api/math/Cylindrical
"
],
[
"
Euler
"
,
"
api/math/Euler
"
],
[
"
Frustum
"
,
"
api/math/Frustum
"
],
[
"
Interpolant
"
,
"
api/math/Interpolant
"
],
...
...
src/Three.js
浏览文件 @
e713a499
...
...
@@ -102,6 +102,7 @@ export { Triangle } from './math/Triangle.js';
export
{
Spline
}
from
'
./math/Spline.js
'
;
export
{
_Math
as
Math
}
from
'
./math/Math.js
'
;
export
{
Spherical
}
from
'
./math/Spherical.js
'
;
export
{
Cylindrical
}
from
'
./math/Cylindrical.js
'
;
export
{
Plane
}
from
'
./math/Plane.js
'
;
export
{
Frustum
}
from
'
./math/Frustum.js
'
;
export
{
Sphere
}
from
'
./math/Sphere.js
'
;
...
...
src/math/Cylindrical.js
0 → 100644
浏览文件 @
e713a499
/**
* @author Mugen87 / https://github.com/Mugen87
*
* Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system
*
*/
function
Cylindrical
(
radius
,
theta
,
y
)
{
this
.
radius
=
(
radius
!==
undefined
)
?
radius
:
1.0
;
// distance from the origin to a point in the x-z plane
this
.
theta
=
(
theta
!==
undefined
)
?
theta
:
0
;
// counterclockwise angle in the x-z plane measured in radians from the positive z-axis
this
.
y
=
(
y
!==
undefined
)
?
y
:
0
;
// height above the x-z plane
return
this
;
}
Cylindrical
.
prototype
=
{
constructor
:
Cylindrical
,
set
:
function
(
radius
,
theta
,
y
)
{
this
.
radius
=
radius
;
this
.
theta
=
theta
;
this
.
y
=
y
;
return
this
;
},
clone
:
function
()
{
return
new
this
.
constructor
().
copy
(
this
);
},
copy
:
function
(
other
)
{
this
.
radius
=
other
.
radius
;
this
.
theta
=
other
.
theta
;
this
.
y
=
other
.
y
;
return
this
;
},
setFromVector3
:
function
(
vec3
)
{
this
.
radius
=
Math
.
sqrt
(
vec3
.
x
*
vec3
.
x
+
vec3
.
z
*
vec3
.
z
);
this
.
theta
=
Math
.
atan2
(
vec3
.
x
,
vec3
.
z
);
this
.
y
=
vec3
.
y
;
return
this
;
}
};
export
{
Cylindrical
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录