Class BoxBV

    • Constructor Detail

      • BoxBV

        public BoxBV()
      • BoxBV

        public BoxBV​(Box3f rkBox)
    • Method Detail

      • ComputeFromData

        public void ComputeFromData​(Vector3f[] pkVertices)
        Description copied from class: BoundingVolume
        Compute a bounding volume that contains all the points.
        Specified by:
        ComputeFromData in class BoundingVolume
        Parameters:
        pkVertices - array of points.
      • ComputeFromData

        public void ComputeFromData​(VertexBuffer pkVBuffer)
        Description copied from class: BoundingVolume
        Compute a bounding volume that contains all the points.
        Specified by:
        ComputeFromData in class BoundingVolume
        Parameters:
        pkVBuffer - VertexBuffer containing points.
      • Contains

        public boolean Contains​(Vector3f rkPoint)
        Description copied from class: BoundingVolume
        test for containment of a point
        Specified by:
        Contains in class BoundingVolume
        Parameters:
        rkPoint - point to test.
        Returns:
        true if contained in this volume..
      • CopyFrom

        public void CopyFrom​(BoundingVolume pkInput)
        Description copied from class: BoundingVolume
        Make a copy of the bounding volume.
        Specified by:
        CopyFrom in class BoundingVolume
        Parameters:
        pkInput - bounding volume to copy into this.
      • GetBox

        public Box3f GetBox()
      • GetCenter

        public Vector3f GetCenter()
        Description copied from class: BoundingVolume
        all bounding volumes must define a center and radius
        Specified by:
        GetCenter in class BoundingVolume
        Returns:
        center of bounding volume.
      • GetRadius

        public float GetRadius()
        Description copied from class: BoundingVolume
        all bounding volumes must define a center and radius
        Specified by:
        GetRadius in class BoundingVolume
        Returns:
        radius of bounding volume.
      • GrowToContain

        public void GrowToContain​(BoundingVolume pkInput)
        Description copied from class: BoundingVolume
        Change the current bounding volume so that it contains the input bounding volume as well as its old bounding volume.
        Specified by:
        GrowToContain in class BoundingVolume
        Parameters:
        pkInput - bounding volume to grow and contain with.
      • SetBox

        public void SetBox​(Box3f kBox)
      • SetCenter

        public void SetCenter​(Vector3f rkCenter)
        Description copied from class: BoundingVolume
        all bounding volumes must define a center and radius
        Specified by:
        SetCenter in class BoundingVolume
        Parameters:
        rkCenter - center of bounding volume.
      • SetRadius

        public void SetRadius​(float fRadius)
        Description copied from class: BoundingVolume
        all bounding volumes must define a center and radius
        Specified by:
        SetRadius in class BoundingVolume
        Parameters:
        fRadius - radius of bounding volume.
      • TestIntersection

        public boolean TestIntersection​(BoundingVolume pkInput)
        Description copied from class: BoundingVolume
        Test for intersection of the two bounds.
        Specified by:
        TestIntersection in class BoundingVolume
        Parameters:
        pkInput - BoundingVolume.
        Returns:
        true if intersects.
      • TestIntersection

        public boolean TestIntersection​(Vector3f rkOrigin,
                                        Vector3f rkDirection,
                                        float fTMin,
                                        float fTMax)
        Description copied from class: BoundingVolume
        Test for intersection of linear component and bound (points of intersection not computed). The linear component is parameterized by P + t*D, where P is a point on the component and D is a unit-length direction. The interval [tmin,tmax] is line: tmin = -Mathf::MAX_REAL, tmax = Mathf::MAX_REAL ray: tmin = 0.0f, tmax = Mathf::MAX_REAL segment: tmin = 0.0f, tmax > 0.0f
        Specified by:
        TestIntersection in class BoundingVolume
        Parameters:
        rkOrigin - origin of point.
        rkDirection - unit-length direction.
        fTMin - min value for parameter t.
        fTMax - miax value for parameter t.
        Returns:
        true if intersects.
      • WhichSide

        public int WhichSide​(Plane3f rkPlane)
        Description copied from class: BoundingVolume
        Determine if the bounding volume is one side of the plane, the other side, or straddles the plane. If it is on the positive side (the side to which the normal points), the return value is +1. If it is on the negative side, the return value is -1. If it straddles the plane, the return value is 0.
        Specified by:
        WhichSide in class BoundingVolume
        Parameters:
        rkPlane - plane to test against bounding volume.
        Returns:
        positive side: +1; negative side: -1; straddle: 0.