Class SbPlane

java.lang.Object
com.openinventor.inventor.SbBasic
com.openinventor.inventor.SbPlane

public class SbPlane extends SbBasic
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 Details

    • array

      public final float[] array
  • Constructor Details

    • SbPlane

      public SbPlane(float[] components)
    • SbPlane

      public SbPlane(SbPlane copyFrom)
    • SbPlane

      public SbPlane(SbVec3f normal, float distance)
      Constructor. normal is a normal vector and distance is distance from origin to plane along normal vector.
    • SbPlane

      public SbPlane(SbVec3f p0, SbVec3f p1, SbVec3f p2)
      Constructor. p0, p1, and p2 represent three points in the plane.
    • SbPlane

      public SbPlane(SbVec3f normal, SbVec3f point)
      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

      public SbPlane setValue(float[] components)
    • setValue

      public SbPlane setValue(float[] components, int startIndex)
    • getValue

      public float[] getValue()
    • setValue

      public void setValue(SbPlane copyFrom)
    • transform

      public void transform(SbMatrix matrix)
      Transforms the plane by the given matrix.
    • getDistance

      public float getDistance(SbVec3f point)
      Returns the distance from a point to plane. Positive distance means the point is in the plane's half space.
    • toArray

      public static SbPlane[] toArray(long nativeArray, long length)
    • offset

      public void offset(float d)
      Offset a plane by a given distance.
    • intersect

      public SbVec3f intersect(SbLine l)
      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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getNormal

      public SbVec3f getNormal()
      Returns normal vector to plane.
    • isInHalfSpace

      public boolean isInHalfSpace(SbVec3f point)
      Returns true if the given point is within the half-space defined by the plane.