|
@@ -17,24 +17,16 @@
|
|
|
|
|
|
<h3>[name]([page:Vector3 normal], [page:Float constant])</h3>
|
|
|
<div>
|
|
|
- normal -- the normal vector defining the plane <br />
|
|
|
- constant -- the distance from the origin to the plane along the normal vector
|
|
|
+ normal -- ([Page:Vector3]) normal vector defining the plane pointing towards the origin <br />
|
|
|
+ constant -- ([Page:Float]) the negative distance from the origin to the plane along the normal vector
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<h2>Properties</h2>
|
|
|
|
|
|
<h3>.[page:Vector3 normal]</h3>
|
|
|
- <div>
|
|
|
- [Page:Vector3] representing the normal vector that definesthe plane
|
|
|
- </div>
|
|
|
-
|
|
|
|
|
|
<h3>.[page:Float constant]</h3>
|
|
|
- <div>
|
|
|
- [Page:Float] describing the distance from the origin to the plane along the normal vector
|
|
|
- </div>
|
|
|
-
|
|
|
|
|
|
<h2>Methods</h2>
|
|
|
|
|
@@ -48,7 +40,7 @@
|
|
|
<h3>.set([page:Vector3 normal], [page:Float constant]) [page:Plane this]</h3>
|
|
|
<div>
|
|
|
normal -- [Page:Vector3] <br />
|
|
|
- constant -- [Page: Float]
|
|
|
+ constant -- [Page:Float]
|
|
|
</div>
|
|
|
<div>
|
|
|
Sets the plane's values.
|
|
@@ -68,126 +60,126 @@
|
|
|
optionalNormalMatrix -- (optional) normal [Page:Matrix3] of the Matrix4 to apply
|
|
|
</div>
|
|
|
<div>
|
|
|
- Apply a Matrix4 to the plane. The second parameter is is optional, but if not provided a new Matrix3 will be created each time this method is called.
|
|
|
+ Apply a Matrix4 to the plane. The second parameter is optional, but if not provided a new Matrix3 will be created each time this method is called.
|
|
|
|
|
|
<code>
|
|
|
var optionalNormalMatrix = new THREE.Matrix3().getNormalMatrix( matrix )
|
|
|
</code>
|
|
|
</div>
|
|
|
|
|
|
- <h3>.orthoPoint([page:todo point], [page:todo optionalTarget]) [page:todo]</h3>
|
|
|
+ <h3>.orthoPoint([page:Vector3 point], [page:Vector3 optionalTarget]) [page:Vector3]</h3>
|
|
|
<div>
|
|
|
- point -- todo <br />
|
|
|
- optionalTarget -- todo
|
|
|
+ point -- [page:Vector3] <br />
|
|
|
+ optionalTarget -- [page:Vector3]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Returns a vector in the same direction as the Plane's normal, but the magnitude is passed point's original distance to the plane.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.isIntersectionLine([page:todo line]) [page:todo]</h3>
|
|
|
+ <h3>.isIntersectionLine([page:Line3 line]) [page:Boolean]</h3>
|
|
|
<div>
|
|
|
- line -- todo
|
|
|
+ line -- [page:Line3]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Tests whether a line segment intersects with the plane. (Do not mistake this for a collinear check.)
|
|
|
</div>
|
|
|
|
|
|
- <h3>.intersectLine([page:todo line], [page:todo optionalTarget]) [page:todo]</h3>
|
|
|
+ <h3>.intersectLine([page:Line3 line], [page:Vector3 optionalTarget]) [page:Vector3] or [page:undefined]</h3>
|
|
|
<div>
|
|
|
- line -- todo <br />
|
|
|
- optionalTarget -- todo
|
|
|
+ line -- [page:Line3] <br />
|
|
|
+ optionalTarget -- [page:Vector3]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Returns the intersection point of the passed line and the plane. Returns undefined if the line does not intersect. Returns the line's starting point if the line is coplanar with the plane.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setFromNormalAndCoplanarPoint([page:todo normal], [page:todo point]) [page:todo]</h3>
|
|
|
+ <h3>.setFromNormalAndCoplanarPoint([page:Vector3 normal], [page:Vector3 point]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
- normal -- todo <br />
|
|
|
- point -- todo
|
|
|
+ normal -- [page:Vector3] <br />
|
|
|
+ point -- [page:Vector3]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Sets the plane's values as defined by a normal and arbitrary coplanar point.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.clone() [page:todo]</h3>
|
|
|
+ <h3>.clone() [page:Plane]</h3>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Returns a new copy of this plane.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.distanceToPoint([page:todo point]) [page:todo]</h3>
|
|
|
+ <h3>.distanceToPoint([page:Vector3 point]) [page:Float]</h3>
|
|
|
<div>
|
|
|
- point -- todo
|
|
|
+ point -- [page:Vector3]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Returns the smallest distance from the point to the plane.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.equals([page:todo plane]) [page:todo]</h3>
|
|
|
+ <h3>.equals([page:Plane plane]) [page:Boolean]</h3>
|
|
|
<div>
|
|
|
- plane -- todo
|
|
|
+ plane -- [page:Planen]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Checks to see if two planes are equal (their normals and constants match)
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setComponents([page:todo x], [page:todo y], [page:todo z], [page:todo w]) [page:todo]</h3>
|
|
|
+ <h3>.setComponents([page:Float x], [page:Float y], [page:Float z], [page:Float w]) [page:Plane this]</h3>
|
|
|
<div>
|
|
|
- x -- todo <br />
|
|
|
- y -- todo <br />
|
|
|
- z -- todo <br />
|
|
|
- w -- todo
|
|
|
+ x -- [page:Float] x of the normal vector <br />
|
|
|
+ y -- [page:Float] y of the normal vector<br />
|
|
|
+ z -- [page:Float] z of the normal vector<br />
|
|
|
+ w -- [page:Float] distance of the plane from the origin along the normal vector
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Set the individual components that make up the plane.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.distanceToSphere([page:todo sphere]) [page:todo]</h3>
|
|
|
+ <h3>.distanceToSphere([page:Sphere sphere]) [page:Float]</h3>
|
|
|
<div>
|
|
|
- sphere -- todo
|
|
|
+ sphere -- [Page:Sphere]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Returns the smallest distance from an edge of the sphere to the plane.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setFromCoplanarPoints([page:todo a], [page:todo b], [page:todo c]) [page:todo]</h3>
|
|
|
+ <h3>.setFromCoplanarPoints([page:Vector3 a], [page:Vector3 b], [page:Vector3 c]) [page:Plane this]</h3>
|
|
|
<div>
|
|
|
- a -- todo <br />
|
|
|
- b -- todo <br />
|
|
|
- c -- todo
|
|
|
+ a -- [page:Vector3] <br />
|
|
|
+ b -- [page:Vector3] <br />
|
|
|
+ c -- [page:Vector3]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Defines the plane based on the 3 provided points. The winding order is counter clockwise, and determines which direction the normal will point.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.projectPoint([page:todo point], [page:todo optionalTarget]) [page:todo]</h3>
|
|
|
+ <h3>.projectPoint([page:Vector3 point], [page:Vector3 optionalTarget]) [page:Vector3]</h3>
|
|
|
<div>
|
|
|
- point -- todo <br />
|
|
|
- optionalTarget -- todo
|
|
|
+ point -- [page:Vector3] <br />
|
|
|
+ optionalTarget -- [page:Vector3]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Projects a point onto the plane. The projected point is the closest point on the plane to the passed point, so a line drawn from the projected point and the passed point would be orthogonal to the plane.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.negate() [page:todo]</h3>
|
|
|
+ <h3>.negate() [page:Plane this]</h3>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Negates both the normal vector and constant, effectively mirroring the plane across the origin.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.translate([page:todo offset]) [page:todo]</h3>
|
|
|
+ <h3>.translate([page:Vector3 offset]) [page:Plane this]</h3>
|
|
|
<div>
|
|
|
- offset -- todo
|
|
|
+ offset -- [page:Vector3]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Translates the plane the distance defined by the vector. Note that this only affects the constant (distance from origin) and will not affect the normal vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.coplanarPoint([page:todo optionalTarget]) [page:todo]</h3>
|
|
|
+ <h3>.coplanarPoint([page:Vector3 optionalTarget]) [page:Vector3]</h3>
|
|
|
<div>
|
|
|
- optionalTarget -- todo
|
|
|
+ optionalTarget -- [page:Vector3]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Returns a coplanar point. (The projection of the normal vector at the origin onto the plane.)
|
|
|
</div>
|
|
|
|
|
|
<h2>Source</h2>
|