Class ConvexPolyhedron3D
java.lang.Object
org.episteme.core.mathematics.geometry.boundaries.ConvexPolyhedron3D
- All Implemented Interfaces:
Serializable, Boundary<Point3D>, Boundary3D
A convex polyhedron in 3D space.
Defined by a set of triangular faces with outward-facing normals.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a triangular face.Nested classes/interfaces inherited from interface Boundary3D
Boundary3D.Face -
Constructor Summary
ConstructorsConstructorDescriptionCreates a convex polyhedron from faces. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConvexPolyhedron3DCreates a box (rectangular parallelepiped).booleanChecks if a point is contained within this boundary.Computes the convex hull of this boundary.static ConvexPolyhedron3Dextrude(Boundary2D polygon, Real height) Extrudes a 2D polygon into a 3D prism.Returns the bounding box of this boundary.Returns the centroid of this boundary.getFaces()Returns all faces of this 3D boundary.Returns the surface area.Returns all vertices of this 3D boundary.Returns the volume of this 3D boundary.intersection(Boundary<Point3D> other) Computes the intersection of this boundary with another.booleanintersects(Boundary<Point3D> other) Checks if this boundary intersects with another.booleanisConvex()Checks if this is a convex polyhedron.booleanisEmpty()Checks if this boundary is empty.Projects this 3D boundary onto the XY plane.Projects this 3D boundary onto the XZ plane.Projects this 3D boundary onto the YZ plane.rotateAround(Vector3D axis, Real angleRadians) Rotates around an arbitrary axis.Rotates around the X axis.Rotates around the Y axis.Rotates around the Z axis.Creates a scaled copy of this boundary.Slices this boundary with a plane.static ConvexPolyhedron3Dtetrahedron(Point3D a, Point3D b, Point3D c, Point3D d) Creates a tetrahedron from 4 points.toString()Creates a copy of this boundary translated by a vector.Computes the union of this boundary with another.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Boundary3D
getBoundaryMeasure, getDimension, getMeasure
-
Constructor Details
-
ConvexPolyhedron3D
Creates a convex polyhedron from faces.- Parameters:
faces- the triangular faces
-
-
Method Details
-
tetrahedron
Creates a tetrahedron from 4 points. -
box
Creates a box (rectangular parallelepiped). -
extrude
Extrudes a 2D polygon into a 3D prism.- Parameters:
polygon- the base polygonheight- the extrusion height- Returns:
- the extruded polyhedron
-
getVertices
Description copied from interface:Boundary3DReturns all vertices of this 3D boundary.- Specified by:
getVerticesin interfaceBoundary3D- Returns:
- list of vertices
-
getFaces
Description copied from interface:Boundary3DReturns all faces of this 3D boundary.- Specified by:
getFacesin interfaceBoundary3D- Returns:
- list of faces
-
getVolume
Description copied from interface:Boundary3DReturns the volume of this 3D boundary.- Specified by:
getVolumein interfaceBoundary3D- Returns:
- the volume
-
getSurfaceArea
Description copied from interface:Boundary3DReturns the surface area.- Specified by:
getSurfaceAreain interfaceBoundary3D- Returns:
- the surface area
-
isConvex
public boolean isConvex()Description copied from interface:Boundary3DChecks if this is a convex polyhedron.- Specified by:
isConvexin interfaceBoundary3D- Returns:
- true if convex
-
isEmpty
-
getCentroid
Description copied from interface:BoundaryReturns the centroid of this boundary.- Specified by:
getCentroidin interfaceBoundary<Point3D>- Returns:
- the geometric center
-
getBoundingBox
Description copied from interface:BoundaryReturns the bounding box of this boundary.- Specified by:
getBoundingBoxin interfaceBoundary<Point3D>- Returns:
- an axis-aligned bounding box
-
contains
-
intersects
-
union
-
intersection
-
convexHull
-
translate
-
scale
-
rotateX
Description copied from interface:Boundary3DRotates around the X axis.- Specified by:
rotateXin interfaceBoundary3D- Parameters:
angleRadians- rotation angle- Returns:
- rotated boundary
-
rotateY
Description copied from interface:Boundary3DRotates around the Y axis.- Specified by:
rotateYin interfaceBoundary3D- Parameters:
angleRadians- rotation angle- Returns:
- rotated boundary
-
rotateZ
Description copied from interface:Boundary3DRotates around the Z axis.- Specified by:
rotateZin interfaceBoundary3D- Parameters:
angleRadians- rotation angle- Returns:
- rotated boundary
-
rotateAround
Description copied from interface:Boundary3DRotates around an arbitrary axis.- Specified by:
rotateAroundin interfaceBoundary3D- Parameters:
axis- the rotation axisangleRadians- rotation angle- Returns:
- rotated boundary
-
projectXY
Description copied from interface:Boundary3DProjects this 3D boundary onto the XY plane.- Specified by:
projectXYin interfaceBoundary3D- Returns:
- a 2D boundary
-
projectXZ
Description copied from interface:Boundary3DProjects this 3D boundary onto the XZ plane.- Specified by:
projectXZin interfaceBoundary3D- Returns:
- a 2D boundary
-
projectYZ
Description copied from interface:Boundary3DProjects this 3D boundary onto the YZ plane.- Specified by:
projectYZin interfaceBoundary3D- Returns:
- a 2D boundary
-
slice
Description copied from interface:Boundary3DSlices this boundary with a plane.- Specified by:
slicein interfaceBoundary3D- Parameters:
planeNormal- the plane normalpointOnPlane- a point on the plane- Returns:
- the 2D cross-section
-
toString
-