Interface IHomogeneousCompoundShape<TChildShape, TChildShapeWide>
- Namespace
 - BepuPhysics.Collidables
 
- Assembly
 - BepuPhysics.dll
 
Defines a compound shape type that has children of only one type.
public interface IHomogeneousCompoundShape<TChildShape, TChildShapeWide> : IDisposableShape, IShape, IBoundsQueryableCompound where TChildShape : unmanaged, IConvexShape where TChildShapeWide : unmanaged, IShapeWide<TChildShape>
  Type Parameters
TChildShapeType of the child shapes.
TChildShapeWideType of the child shapes, formatted in AOSOA layout.
- Inherited Members
 
Properties
ChildCount
Gets the number of children in the compound shape.
int ChildCount { get; }
  Property Value
Methods
ComputeBounds(Quaternion, out Vector3, out Vector3)
Computes the bounding box of a compound shape.
void ComputeBounds(Quaternion orientation, out Vector3 min, out Vector3 max)
  Parameters
orientationQuaternionOrientation of the compound.
minVector3Minimum of the compound's bounding box.
maxVector3Maximum of the compound's bounding box.
GetLocalChild(int, out TChildShape)
Gets a child shape as it appears in the compound's local space.
void GetLocalChild(int childIndex, out TChildShape childData)
  Parameters
childIndexintIndex of the child in the compound parent.
childDataTChildShapeData representing the child.
GetLocalChild(int, ref TChildShapeWide)
Gets a child shape as it appears in the compound's local space.
void GetLocalChild(int childIndex, ref TChildShapeWide childData)
  Parameters
childIndexintIndex of the child in the compound parent.
childDataTChildShapeWideReference to an AOSOA slot.
GetPosedLocalChild(int, out TChildShape, out RigidPose)
Gets a child shape from the compound and compounds a pose for it in the local space of the compound parent. Useful for processes which require a child shape (like a triangle in a mesh) to have their center of mass at zero in the child's own local space.
void GetPosedLocalChild(int childIndex, out TChildShape childData, out RigidPose childPose)
  Parameters
childIndexintIndex of the child.
childDataTChildShapeShape of the child.
childPoseRigidPosePose in the compound's local space that brings the child shape as described to the proper location in the parent compound's local space.
RayTest<TRayHitHandler>(in RigidPose, in RayData, ref float, ref TRayHitHandler)
Tests a ray against the shape.
void RayTest<TRayHitHandler>(in RigidPose pose, in RayData ray, ref float maximumT, ref TRayHitHandler hitHandler) where TRayHitHandler : struct, IShapeRayHitHandler
  Parameters
poseRigidPosePose of the shape during the ray test.
rayRayDataRay to test against the shape.
maximumTfloatMaximum distance along the ray, in units of the ray direction's length, that the ray will test.
hitHandlerTRayHitHandlerCallbacks called when the ray interacts with a test candidate.
Type Parameters
TRayHitHandler
RayTest<TRayHitHandler>(in RigidPose, ref RaySource, ref TRayHitHandler)
Tests multiple rays against the shape.
void RayTest<TRayHitHandler>(in RigidPose pose, ref RaySource rays, ref TRayHitHandler hitHandler) where TRayHitHandler : struct, IShapeRayHitHandler
  Parameters
poseRigidPosePose of the shape during the ray test.
raysRaySourceRays to test against the shape.
hitHandlerTRayHitHandlerCallbacks called when the ray interacts with a test candidate.
Type Parameters
TRayHitHandler