46 virtual void CollidePoint(
Vec3Arg inPoint,
const SubShapeIDCreator &inSubShapeIDCreator,
CollidePointCollector &ioCollector,
const ShapeFilter &inShapeFilter = { })
const override;
49 virtual void CollectTransformedShapes(
const AABox &inBox,
Vec3Arg inPositionCOM,
QuatArg inRotation,
Vec3Arg inScale,
const SubShapeIDCreator &inSubShapeIDCreator,
TransformedShapeCollector &ioCollector,
const ShapeFilter &inShapeFilter)
const override;
52 virtual int GetIntersectingSubShapes(
const AABox &inBox,
uint *outSubShapeIndices,
int inMaxSubShapeIndices)
const override;
55 virtual int GetIntersectingSubShapes(
const OrientedBox &inBox,
uint *outSubShapeIndices,
int inMaxSubShapeIndices)
const override;
58 virtual void SaveBinaryState(StreamOut &inStream)
const override;
64 static void sRegister();
68 virtual void RestoreBinaryState(
StreamIn &inStream)
override;
72 template <
class BoxType>
73 struct GetIntersectingSubShapesVisitorSC :
public GetIntersectingSubShapesVisitor<BoxType>
75 using GetIntersectingSubShapesVisitor<BoxType>::GetIntersectingSubShapesVisitor;
77 JPH_INLINE
bool ShouldVisitNode(
int inStackTop)
const
85 UVec4 collides = GetIntersectingSubShapesVisitor<BoxType>::TestBounds(inBoundsMinX, inBoundsMinY, inBoundsMinZ, inBoundsMaxX, inBoundsMaxY, inBoundsMaxZ);
92 static void sPartition(
uint *ioBodyIdx, AABox *ioBounds,
int inNumber,
int &outMidPoint);
97 static void sPartition4(
uint *ioBodyIdx, AABox *ioBounds,
int inBegin,
int inEnd,
int *outSplit);
100 static void sCollideCompoundVsShape(
const Shape *inShape1,
const Shape *inShape2,
Vec3Arg inScale1,
Vec3Arg inScale2,
Mat44Arg inCenterOfMassTransform1,
Mat44Arg inCenterOfMassTransform2,
const SubShapeIDCreator &inSubShapeIDCreator1,
const SubShapeIDCreator &inSubShapeIDCreator2,
const CollideShapeSettings &inCollideShapeSettings,
CollideShapeCollector &ioCollector,
const ShapeFilter &inShapeFilter);
101 static void sCollideShapeVsCompound(
const Shape *inShape1,
const Shape *inShape2,
Vec3Arg inScale1,
Vec3Arg inScale2,
Mat44Arg inCenterOfMassTransform1,
Mat44Arg inCenterOfMassTransform2,
const SubShapeIDCreator &inSubShapeIDCreator1,
const SubShapeIDCreator &inSubShapeIDCreator2,
const CollideShapeSettings &inCollideShapeSettings,
CollideShapeCollector &ioCollector,
const ShapeFilter &inShapeFilter);
102 static void sCastShapeVsCompound(
const ShapeCast &inShapeCast,
const ShapeCastSettings &inShapeCastSettings,
const Shape *inShape,
Vec3Arg inScale,
const ShapeFilter &inShapeFilter,
Mat44Arg inCenterOfMassTransform2,
const SubShapeIDCreator &inSubShapeIDCreator1,
const SubShapeIDCreator &inSubShapeIDCreator2,
CastShapeCollector &ioCollector);
107 template <
class Visitor>
108 JPH_INLINE
void WalkTree(Visitor &ioVisitor)
const;
113 IS_SUBSHAPE = 0x80000000,
114 INVALID_NODE = 0x7fffffff,
120 void SetChildBounds(
uint inIndex,
const AABox &inBounds);
121 void SetChildInvalid(
uint inIndex);
129 uint32 mNodeProperties[4];
132 static_assert(
sizeof(Node) == 64,
"Node should be 64 bytes");
134 using Nodes = Array<Node>;
virtual Stats GetStats() const override
Get stats of this shape. Use for logging / data collection purposes only. Does not add values from ch...
Definition StaticCompoundShape.h:61