Class MeshTriangleBoundingBoxImpl
java.lang.Object
cz.fidentis.analyst.data.mesh.impl.MeshTriangleBoundingBoxImpl
- All Implemented Interfaces:
MeshTriangleBoundingBox
Calculations of a triangle's axis-aligned bounding-box.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.vecmath.Point3d
Gets center point of bounding box.javax.vecmath.Point3d
Gets the largest corner of the bounding box - maximum of x,y,z values of triangle.javax.vecmath.Point3d
Gets the smallest corner of the bounding box - minimum of x,y,z values of triangle.Gets underlying triangle.boolean
intersectAABB
(double splitPosition, int depth) Checks if splitting plane at a certain depth of a KdTree intersects triangles axis-aligned bounding box.
-
Constructor Details
-
MeshTriangleBoundingBoxImpl
Constructor.- Parameters:
triangle
-MeshTriangle
of which to calculate a bounding box
-
-
Method Details
-
getTriangle
Description copied from interface:MeshTriangleBoundingBox
Gets underlying triangle.- Specified by:
getTriangle
in interfaceMeshTriangleBoundingBox
- 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 interfaceMeshTriangleBoundingBox
- 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 interfaceMeshTriangleBoundingBox
- 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 interfaceMeshTriangleBoundingBox
- 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 interfaceMeshTriangleBoundingBox
- 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.
-