提交 bc3a2688 编写于 作者: W Walker Flynn

Updates and additions to vector3 docs

上级 edc6647f
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
<h3>.normalize() [page:Vector3]</h3> <h3>.normalize() [page:Vector3]</h3>
<div> <div>
Normalizes this vector. Normalizes this vector. Transforms this Vector into a Unit vector by dividing the vector by it's length.
</div> </div>
<h3>.distanceTo( [page:Vector3 v] ) [page:Float]</h3> <h3>.distanceTo( [page:Vector3 v] ) [page:Float]</h3>
...@@ -194,39 +194,39 @@ ...@@ -194,39 +194,39 @@
m -- [page:Matrix3] m -- [page:Matrix3]
</div> </div>
<div> <div>
todo Multiplies this vector times a 3 x 3 matrix.
</div> </div>
<h3>.applyMatrix4([page:todo m]) [page:todo]</h3> <h3>.applyMatrix4([page:todo m]) [page:todo this]</h3>
<div> <div>
m -- todo m -- [page:todo Matrix4]
</div> </div>
<div> <div>
todo Multiplies this vector by 4 x 3 subset of a Matrix4.
</div> </div>
<h3>.projectOnPlane([page:todo planeNormal]) [page:todo]</h3> <h3>.projectOnPlane([page:todo planeNormal]) [page:todo this]</h3>
<div> <div>
planeNormal -- todo planeNormal -- [page:todo Plane.normal]
</div> </div>
<div> <div>
todo Projects this vector onto a plane by subtracting this vector projected onto the plane's normal from this vector.
</div> </div>
<h3>.projectOnVector([page:todo vector]) [page:todo]</h3> <h3>.projectOnVector([page:todo vector]) [page:todo this]</h3>
<div> <div>
vector -- todo vector -- [page:todo Vector3]
</div> </div>
<div> <div>
todo Projects this vector onto another vector.
</div> </div>
<h3>.addScalar([page:todo s]) [page:todo]</h3> <h3>.addScalar([page:todo s]) [page:todo this]</h3>
<div> <div>
s -- todo s -- [page:todo Float]
</div> </div>
<div> <div>
todo Adds a s to this vector.
</div> </div>
<h3>.divide([page:todo v]) [page:todo]</h3> <h3>.divide([page:todo v]) [page:todo]</h3>
...@@ -239,103 +239,109 @@ ...@@ -239,103 +239,109 @@
<h3>.min([page:todo v]) [page:todo]</h3> <h3>.min([page:todo v]) [page:todo]</h3>
<div> <div>
v -- todo v -- [page:todo Vector3]
</div> </div>
<div> <div>
todo Divides this vector by vector v.
</div> </div>
<h3>.setComponent([page:todo index], [page:todo value]) [page:todo]</h3> <h3>.setComponent([page:todo index], [page:todo value]) [page:todo this]</h3>
<div> <div>
index -- todo <br /> index -- 0, 1, or 2 <br />
value -- todo value -- [page:todo Float]
</div> </div>
<div> <div>
todo If index equals 0 the method sets this vector's x value to value <br />
If index equals 1 the method sets this vector's y value to value <br />
If index equals 2 the method sets this vector's z value to value
</div> </div>
<h3>.transformDirection([page:todo m]) [page:todo]</h3> <h3>.transformDirection([page:todo m]) [page:todo this]</h3>
<div> <div>
m -- todo m -- [page:todo Matrix4]
</div> </div>
<div> <div>
todo Multiplies this vector by a 3 x 3 subset of a Matrix4 and then normalizes the results.
</div> </div>
<h3>.multiplyVectors([page:todo a], [page:todo b]) [page:todo]</h3> <h3>.multiplyVectors([page:todo a], [page:todo b]) [page:todo this]</h3>
<div> <div>
a -- todo <br /> a -- [page:todo Vector3] <br />
b -- todo b -- [page:todo Vector3]
</div> </div>
<div> <div>
todo Sets this vector equal the result of multiplying vector a by vector b.
</div> </div>
<h3>.getComponent([page:todo index]) [page:todo]</h3> <h3>.getComponent([page:todo index]) [page:todo Float]</h3>
<div> <div>
index -- todo index -- 0, 1, or 2
</div> </div>
<div> <div>
todo If index equals 0 the method returns this vector's x value <br />
If index equals 1 the method returns this vector's y value <br />
If index equals 2 the method returns this vector's z value
</div> </div>
<h3>.applyAxisAngle([page:todo axis], [page:todo angle]) [page:todo]</h3> <h3>.applyAxisAngle([page:todo axis], [page:todo angle]) [page:todo this]</h3>
<div> <div>
axis -- todo <br /> axis -- a normalized [page:todo Vector3] <br />
angle -- todo angle -- an angle in radians
</div> </div>
<div> <div>
todo Applies a rotation specified by an axis and an angle to this vector.
</div> </div>
<h3>.lerp([page:todo v], [page:todo alpha]) [page:todo]</h3> <h3>.lerp([page:todo v], [page:todo alpha]) [page:todo this]</h3>
<div> <div>
v -- todo <br /> v -- [page:todo Vector3] <br />
alpha -- todo alpha -- [page:todo Float] between 0 and 1.
</div> </div>
<div> <div>
todo Linear Interpolation between this vector and vector v, where alpha is the percent along the line.
</div> </div>
<h3>.max([page:todo v]) [page:todo]</h3> <h3>.max([page:todo v]) [page:todo this]</h3>
<div> <div>
v -- todo v -- [page:todo Vector3]
</div> </div>
<div> <div>
todo If this vector's x, y, or z value exceeds vector v's x, y, or z value, that value is replaced by the corresponding vector v value.
</div> </div>
<h3>.angleTo([page:todo v]) [page:todo]</h3> <h3>.angleTo([page:todo v]) [page:todo Float]</h3>
<div> <div>
v -- todo v -- [page:todo Vector3]
</div> </div>
<div> <div>
todo Returns the angle between this vector and vector v in radians.
</div> </div>
<h3>.getColumnFromMatrix([page:todo index], [page:todo matrix]) [page:todo]</h3> <h3>.getColumnFromMatrix([page:todo index], [page:todo matrix]) [page:todo this]</h3>
<div> <div>
index -- todo <br /> index -- 0, 1, 2, or 3 <br />
matrix -- todo matrix -- [page:todo Matrix4]
</div> </div>
<div> <div>
todo Sets this vector's x, y, and z equal to the column of the matrix specified by the index.
</div> </div>
<h3>.reflect([page:todo vector]) [page:todo]</h3> <h3>.reflect([page:todo vector]) [page:todo this]</h3>
<div> <div>
vector -- todo vector -- [page:todo Vector3] the vector to reflect about
</div> </div>
<div> <div>
todo Reflects this vector about a vector.
</div> </div>
<h3>.fromArray([page:todo array]) [page:todo]</h3> <h3>.fromArray([page:todo array]) [page:todo this]</h3>
<div> <div>
array -- todo array -- [page:todo Array]
</div> </div>
<div> <div>
todo Assigns this vectors x value to array[0]. <br />
Assigns this vectors y value to array[1]. <br />
Assigns this vectors z value to array[2]. <br />
</div> </div>
<h3>.multiply([page:todo v], [page:todo w]) [page:todo]</h3> <h3>.multiply([page:todo v], [page:todo w]) [page:todo]</h3>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册