提交 1fa508d0 编写于 作者: W WestLangley

Added .setFromMatrix3Column()

上级 0abe06ef
......@@ -358,8 +358,12 @@ var d = a.distanceTo( b );
<h3>[method:this setFromMatrixColumn]( [param:Matrix4 matrix], [param:Integer index] )</h3>
<p>
Sets this vector's [page:.x x], [page:.y y] and [page:.z z] equal to the column of
the [page:Matrix4 matrix] specified by the [page:Integer index].
Sets this vector's [page:.x x], [page:.y y] and [page:.z z] components from [page:Integer index] column of [page:Matrix4 matrix].
</p>
<h3>[method:this setFromMatrix3Column]( [param:Matrix3 matrix], [param:Integer index] )</h3>
<p>
Sets this vector's [page:.x x], [page:.y y] and [page:.z z] components from [page:Integer index] column of [page:Matrix3 matrix].
</p>
<h3>[method:this setFromMatrixPosition]( [param:Matrix4 m] )</h3>
......
......@@ -244,6 +244,7 @@ export class Vector3 implements Vector {
setFromMatrixPosition( m: Matrix4 ): this;
setFromMatrixScale( m: Matrix4 ): this;
setFromMatrixColumn( matrix: Matrix4, index: number ): this;
setFromMatrix3Column( matrix: Matrix3, index: number ): this;
/**
* Checks for strict equality of this vector and v.
......
......@@ -659,6 +659,12 @@ Object.assign( Vector3.prototype, {
},
setFromMatrix3Column: function ( m, index ) {
return this.fromArray( m.elements, index * 3 );
},
equals: function ( v ) {
return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册