Package com.openinventor.inventor
Class SbPlane
java.lang.Object
com.openinventor.inventor.SbBasic
com.openinventor.inventor.SbPlane
Oriented plane in 3D.
Represents an oriented plane in 3D. This is a lightweight class/datatype that is used for arguments to some Open Inventor objects.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
float
getDistance
(SbVec3f point) Returns the distance from a point to plane.float
Returns distance from origin to plane.Returns normal vector to plane.float[]
getValue()
Intersect line and plane, returning true if there is an intersection, false if line is parallel to plane.boolean
isInHalfSpace
(SbVec3f point) Returns true if the given point is within the half-space defined by the plane.void
offset
(float d) Offset a plane by a given distance.setValue
(float[] components) setValue
(float[] components, int startIndex) void
static SbPlane[]
toArray
(long nativeArray, long length) void
Transforms the plane by the given matrix.
-
Field Details
-
array
public final float[] array
-
-
Constructor Details
-
SbPlane
public SbPlane(float[] components) -
SbPlane
-
SbPlane
Constructor. normal is a normal vector and distance is distance from origin to plane along normal vector. -
SbPlane
Constructor. p0, p1, and p2 represent three points in the plane. -
SbPlane
Constructor. normal is a normal vector and point is a point in 3-space for the plane to pass through. -
SbPlane
public SbPlane()Default constructor. The plane is not initialized.
-
-
Method Details
-
setValue
-
setValue
-
getValue
public float[] getValue() -
setValue
-
transform
Transforms the plane by the given matrix. -
getDistance
Returns the distance from a point to plane. Positive distance means the point is in the plane's half space. -
toArray
-
offset
public void offset(float d) Offset a plane by a given distance. -
intersect
Intersect line and plane, returning true if there is an intersection, false if line is parallel to plane. -
getDistanceFromOrigin
public float getDistanceFromOrigin()Returns distance from origin to plane. -
equals
-
getNormal
Returns normal vector to plane. -
isInHalfSpace
Returns true if the given point is within the half-space defined by the plane.
-