123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- <!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 two dimensional surface that extends infinitely in 3d space, defined by
- a [link:https://en.wikipedia.org/wiki/Normal_(geometry) normal vector], and a
- distance from the origin along the normal.
- </div>
- <h2>Constructor</h2>
- <h3>[name]( [page:Vector3 normal], [page:Float constant] )</h3>
- <div>
- [page:Vector3 normal] - (optional) a [page:Vector3] defining the direction of the
- plane. Default is *(1, 0, 0)*.<br />
- [page:Float constant] - (optional) the negative distance from the origin to the plane along
- the [page:Vector3 normal] vector. Default is *0*.
- </div>
- <h2>Properties</h2>
- <h3>[property:Vector3 normal]</h3>
- <h3>[property:Float constant]</h3>
- <h2>Methods</h2>
- <h3>[method:Plane applyMatrix4]( [page:Matrix4 matrix], [page:Matrix3 optionalNormalMatrix] )</h3>
- <div>
- [page:Matrix4 matrix] - the [Page:Matrix4] to apply.<br />
- [page:Matrix3 optionalNormalMatrix] - (optional) pre-computed normal [Page:Matrix3] of the Matrix4 being applied.<br /><br />
- Apply a Matrix4 to the plane. The matrix must be an affine, homogeneous transform.<br />
- If supplying an [page:Matrix3 optionalNormalMatrix], it can be created like so:
- <code>
- var optionalNormalMatrix = new THREE.Matrix3().getNormalMatrix( matrix );
- </code>
- </div>
- <h3>[method:Plane clone]()</h3>
- <div>Returns a new plane with the same [page:.normal normal] and [page:.constant constant] as this one.</div>
- <h3>[method:Vector3 coplanarPoint]( [page:Vector3 optionalTarget] )</h3>
- <div>
- [page:Vector3 optionalTarget] - (optional) if specified, the result will be copied into this [page:Vector3],
- otherwise a new [page:Vector3] will be created.<br /><br />
- Returns a [page:Vector3] coplanar to the plane, by calculating the projection of the
- normal vector at the origin onto the plane.
- </div>
- <h3>[method:Plane copy]( [page:Plane plane] )</h3>
- <div>
- Copies the values of the passed plane's [page:.normal normal] and [page:.constant constant]
- properties to this plane.
- </div>
- <h3>[method:Float distanceToPoint]( [page:Vector3 point] )</h3>
- <div>Returns the smallest distance from the [page:Vector3 point] to the plane.</div>
- <h3>[method:Float distanceToSphere]( [page:Sphere sphere] )</h3>
- <div>Returns the smallest distance from the [page:Sphere sphere] to the plane.</div>
- <h3>[method:Boolean equals]( [page:Plane plane] )</h3>
- <div>
- Checks to see if two planes are equal (their [page:.normal normal] and
- [page:.constant constant] properties match).
- </div>
- <h3>[method:Vector3 intersectLine]( [page:Line3 line], [page:Vector3 optionalTarget] ) or [page:undefined]</h3>
- <div>
- [page:Line3 line] - the [page:Line3] to check for intersection.<br />
- [page:Vector3 optionalTarget] - (optional) if specified, the result will be copied into this [page:Vector3],
- otherwise a new [page:Vector3] will be created.<br /><br />
- 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>[method:Boolean intersectsBox]( [page:Box3 box] )</h3>
- <div>
- [page:Box3 box] - the [page:Box3] to check for intersection.<br /><br />
- Determines whether or not this plane intersects [page:Box3 box].
- </div>
- <h3>[method:Boolean intersectsLine]( [page:Line3 line] )</h3>
- <div>
- [page:Line3 line] - the [page:Line3] to check for intersection.<br /><br />
- Tests whether a line segment intersects with (passes through) the plane.
- </div>
- <h3>[method:Boolean intersectsSphere]( [page:Sphere sphere] )</h3>
- <div>
- [page:Sphere sphere] - the [page:Sphere] to check for intersection.<br /><br />
- Determines whether or not this plane intersects [page:Sphere sphere].
- </div>
- <h3>[method:Plane negate]()</h3>
- <div>
- Negates both the normal vector and constant, effectively mirroring the plane across
- the origin.
- </div>
- <h3>[method:Plane normalize]()</h3>
- <div>
- Normalizes the [page:.normal normal] vector, and adjusts the [page:.constant constant]
- value accordingly.
- </div>
- <h3>[method:Vector3 orthoPoint]( [page:Vector3 point], [page:Vector3 optionalTarget] )</h3>
- <div>
- [page:Vector3 point] - [page:Vector3] <br />
- [page:Vector3 optionalTarget] - (optional) if specified, the result will be copied
- into this [page:Vector3], otherwise a new [page:Vector3] will be created.<br /><br />
- Returns a vector in the same direction as the Plane's normal, but with magnitude
- equal to the passed point's original distance to the plane.
- </div>
- <h3>[method:Vector3 projectPoint]( [page:Vector3 point], [page:Vector3 optionalTarget] )</h3>
- <div>
- [page:Vector3 point] - the [page:Vector3] to project onto the plane.<br />
- [page:Vector3 optionalTarget] - (optional) if specified, the result will be copied into this [page:Vector3],
- otherwise a new [page:Vector3] will be created.<br /><br />
- Projects a [page:Vector3 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>[method:Plane set]( [page:Vector3 normal], [page:Float constant] )</h3>
- <div>
- [page:Vector3 normal] - a [page:Vector3] defining the direction of the plane.<br />
- [page:Float constant] - (optional) the negative distance from the origin to the plane along
- the [page:Vector3 normal] vector. Default is *0*.<br /><br />
- Sets the plane's [page:.normal normal] and [page:.constant constant] properties.
- </div>
- <h3>[method:Plane setComponents]( [page:Float x], [page:Float y], [page:Float z], [page:Float w] )</h3>
- <div>
- [page:Float x] - x value of the normal vector.<br />
- [page:Float y] - y value of the normal vector.<br />
- [page:Float z] - z value of the normal vector.<br />
- [page:Float w] - the value of the plane's [page:.constant constant] property.<br /><br />
- Set the individual components that make up the plane.
- </div>
- <h3>[method:Plane setFromCoplanarPoints]( [page:Vector3 a], [page:Vector3 b], [page:Vector3 c] )</h3>
- <div>
- [page:Vector3 a] - first point on the plane.<br />
- [page:Vector3 a] - second point on the plane.<br />
- [page:Vector3 a] - third point on the plane.<br /><br />
- Defines the plane based on the 3 provided points. The winding order is counter
- clockwise, and determines which direction the [page:.normal normal] will point.
- </div>
- <h3>[method:Plane setFromNormalAndCoplanarPoint]( [page:Vector3 normal], [page:Vector3 point] ) [page:Vector3 this]</h3>
- <div>
- [page:Vector3 normal] - a [page:Vector3] defining the direction of the plane.<br />
- [page:Vector3 point] - [page:Vector3]<br /><br />
- Sets the plane's properties as defined by a [page:Vector3 normal] and an arbitrary coplanar [page:Vector3 point].
- </div>
- <h3>[method:Plane translate]( [page:Vector3 offset] )</h3>
- <div>
- [page:Vector3 offset] - the amount to move the plane by.<br /><br />
- Translates the plane the distance defined by the [page:Vector3 offset] vector.
- Note that this only affects the constant (distance from origin) and will not affect
- the normal vector.
- </div>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|