47 virtual void CollidePoint(
Vec3Arg inPoint,
const SubShapeIDCreator &inSubShapeIDCreator,
CollidePointCollector &ioCollector,
const ShapeFilter &inShapeFilter = { })
const override;
50 virtual void CollectTransformedShapes(
const AABox &inBox,
Vec3Arg inPositionCOM,
QuatArg inRotation,
Vec3Arg inScale,
const SubShapeIDCreator &inSubShapeIDCreator,
TransformedShapeCollector &ioCollector,
const ShapeFilter &inShapeFilter)
const override;
53 virtual int GetIntersectingSubShapes(
const AABox &inBox,
uint *outSubShapeIndices,
int inMaxSubShapeIndices)
const override;
56 virtual int GetIntersectingSubShapes(
const OrientedBox &inBox,
uint *outSubShapeIndices,
int inMaxSubShapeIndices)
const override;
59 virtual void SaveBinaryState(StreamOut &inStream)
const override;
65 static void sRegister();
69 virtual void RestoreBinaryState(
StreamIn &inStream)
override;
73 template <
class BoxType>
74 struct GetIntersectingSubShapesVisitorSC :
public GetIntersectingSubShapesVisitor<BoxType>
76 using GetIntersectingSubShapesVisitor<BoxType>::GetIntersectingSubShapesVisitor;
78 JPH_INLINE
bool ShouldVisitNode(
int inStackTop)
const
86 UVec4 collides = GetIntersectingSubShapesVisitor<BoxType>::TestBounds(inBoundsMinX, inBoundsMinY, inBoundsMinZ, inBoundsMaxX, inBoundsMaxY, inBoundsMaxZ);
93 static void sPartition(
uint *ioBodyIdx, AABox *ioBounds,
int inNumber,
int &outMidPoint);
98 static void sPartition4(
uint *ioBodyIdx, AABox *ioBounds,
int inBegin,
int inEnd,
int *outSplit);
101 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);
102 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);
103 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);
108 template <
class Visitor>
109 JPH_INLINE
void WalkTree(Visitor &ioVisitor)
const;
114 IS_SUBSHAPE = 0x80000000,
115 INVALID_NODE = 0x7fffffff,
121 void SetChildBounds(
uint inIndex,
const AABox &inBounds);
122 void SetChildInvalid(
uint inIndex);
130 uint32 mNodeProperties[4];
133 static_assert(
sizeof(Node) == 64,
"Node should be 64 bytes");
135 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:62