class MAGES::MeshDeformations::UtilitiesHelper::Hexahedron¶
Overview¶
A hexahedron defined by 6 planes. More…
class Hexahedron
{
public:
// properties
Plane[] Faces;
int[][] NeighboringFaces;
Plane LeftFace;
Plane RightFace;
Plane BottomFace;
Plane TopFace;
Plane FrontFace;
Plane BackFace;
Plane MiddlePlane;
Vector3[] Vertices;
Vector3 Center;
Bounds Bounds;
// methods
Hexahedron();
Hexahedron(
in Plane leftFace,
in Plane rightFace,
in Plane bottomFace,
in Plane topFace,
in Plane frontFace,
in Plane backFace
);
Hexahedron(
in Plane leftFace,
in Plane rightFace,
in Plane bottomFace,
in Plane topFace,
in Plane frontFace,
in Plane backFace,
Plane middlePlane
);
Hexahedron(Vector3 pointA, Vector3 pointB, Vector3 heightVector, float width);
Hexahedron(in Hexahedron hexahedron);
void ToWorld(Transform localTransform);
void ToLocal(Transform localTransform);
void Transform(Matrix4x4 TRSMatrix);
bool IntersectsLineSegment(Vector3 pointA, Vector3 pointB);
bool MiddlePlaneIntersectsLineSegment(Vector3 pointA, Vector3 pointB);
};
Detailed Documentation¶
A hexahedron defined by 6 planes.
Methods¶
Hexahedron()
Creates a 1x1 cube in (0,0,0) position.
Hexahedron(
in Plane leftFace,
in Plane rightFace,
in Plane bottomFace,
in Plane topFace,
in Plane frontFace,
in Plane backFace
)
Creates a Hexahedron from the given faces.
Parameters:
leftFace |
|
rightFace |
|
bottomFace |
|
topFace |
|
frontFace |
|
backFace |
bool IntersectsLineSegment(Vector3 pointA, Vector3 pointB)
Intersects with Line Segment?
Parameters:
pointA |
Line segment pointA |
pointB |
Line segment pointB |
Returns:
True if intersects, false otherwise
bool MiddlePlaneIntersectsLineSegment(Vector3 pointA, Vector3 pointB)
Does the bounded middle plane of the hexahedron intersect the line segment.
Parameters:
pointA |
Line segment pointA |
pointB |
Line segment pointB |
Returns:
True if intersects, false otherwise