Class MeshTriangleBoundingBoxImpl

java.lang.Object
cz.fidentis.analyst.data.mesh.impl.MeshTriangleBoundingBoxImpl
All Implemented Interfaces:
MeshTriangleBoundingBox

public class MeshTriangleBoundingBoxImpl extends Object implements MeshTriangleBoundingBox
Calculations of a triangle's axis-aligned bounding-box.
  • Constructor Details

    • MeshTriangleBoundingBoxImpl

      public MeshTriangleBoundingBoxImpl(MeshTriangle triangle)
      Constructor.
      Parameters:
      triangle - MeshTriangle of which to calculate a bounding box
  • Method Details

    • getTriangle

      public MeshTriangle getTriangle()
      Description copied from interface: MeshTriangleBoundingBox
      Gets underlying triangle.
      Specified by:
      getTriangle in interface MeshTriangleBoundingBox
      Returns:
      MeshTriangle in its bounding box
    • getMaxAABB

      public javax.vecmath.Point3d getMaxAABB()
      Description copied from interface: MeshTriangleBoundingBox
      Gets the largest corner of the bounding box - maximum of x,y,z values of triangle.
      Specified by:
      getMaxAABB in interface MeshTriangleBoundingBox
      Returns:
      Largest corner of bounding box.
    • getMinAABB

      public javax.vecmath.Point3d getMinAABB()
      Description copied from interface: MeshTriangleBoundingBox
      Gets the smallest corner of the bounding box - minimum of x,y,z values of triangle.
      Specified by:
      getMinAABB in interface MeshTriangleBoundingBox
      Returns:
      Smallest corner of bounding box.
    • getCentroid

      public javax.vecmath.Point3d getCentroid()
      Description copied from interface: MeshTriangleBoundingBox
      Gets center point of bounding box.
      Specified by:
      getCentroid in interface MeshTriangleBoundingBox
      Returns:
      Center point of bounding box.
    • intersectAABB

      public boolean intersectAABB(double splitPosition, int depth)
      Description copied from interface: MeshTriangleBoundingBox
      Checks if splitting plane at a certain depth of a KdTree intersects triangles axis-aligned bounding box.
      Specified by:
      intersectAABB in interface MeshTriangleBoundingBox
      Parameters:
      splitPosition - Coordinate of splitting plane, based on depth either x/y/z axis.
      depth - Depth of splitting plane in KdTree.
      Returns:
      true if the splitting plane intersects AABB. false otherwise.