Class Segment3f

  • All Implemented Interfaces:
    java.io.Serializable

    public class Segment3f
    extends java.lang.Object
    implements java.io.Serializable
    The segment is represented as P+t*D, where P is the segment origin, D is a unit-length direction vector and |t| <= e. The value e is referred to as the extent of the segment. The end points of the segment are P-e*D and P+e*D. The user must ensure that the direction vector is unit-length. The representation for a segment is analogous to that for an oriented bounding box. P is the center, D is the axis direction, and e is the extent.
    See Also:
    Serialized Form
    • Field Detail

      • Center

        public Vector3f Center
        Segment origin, and unit-length direction.
      • Extent

        public float Extent
        Segment extent:
    • Constructor Detail

      • Segment3f

        public Segment3f()
        construction -- uninitialized
      • Segment3f

        public Segment3f​(Segment3f rkSegment)
        Copy constructor.
        Parameters:
        rkSegment - the segment to copy.
      • Segment3f

        public Segment3f​(Vector3f rkCenter,
                         Vector3f rkDirection,
                         float fExtent)
        construction
        Parameters:
        rkOrigin - segment origin
        rkDirection - segment direction, unit-length
        fExtent - segment extent
    • Method Detail

      • dispose

        public void dispose()
        delete memory
      • GetNegEnd

        public final void GetNegEnd​(Vector3f kResult)
        Returns the negative end point: P-e*D
        Parameters:
        kResult - P-e*D
      • GetPosEnd

        public final void GetPosEnd​(Vector3f kResult)
        Returns the positive end point: P+e*D
        Parameters:
        kResult - P+e*D