72 template <
class BoxType>
73 struct GetIntersectingSubShapesVisitorSC :
public GetIntersectingSubShapesVisitor<BoxType>
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);
105 static constexpr int cStackSize = 128;
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");
uint32_t uint32
Definition Core.h:312
unsigned int uint
Definition Core.h:309
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
uint16 HalfFloat
Definition HalfFloat.h:11
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:29
std::vector< T, STLAllocator< T > > Array
Definition STLAllocator.h:81
#define JPH_DECLARE_SERIALIZABLE_VIRTUAL(class_name)
Definition SerializableObject.h:100
EShapeSubType
This enumerates all shape types, each shape can return its type through Shape::GetSubType.
Definition Shape.h:71
JPH_INLINE int CountAndSortTrues(UVec4Arg inValue, UVec4 &ioIdentifiers)
Definition SortReverseAndStore.h:38
Axis aligned box.
Definition AABox.h:16
Settings to be passed with a collision query.
Definition CollideShape.h:94
Virtual interface that allows collecting multiple collision results.
Definition CollisionCollector.h:45
Base class for a compound shape.
Definition CompoundShape.h:49
SubShapes mSubShapes
Definition CompoundShape.h:333
Base class settings to construct a compound shape.
Definition CompoundShape.h:18
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
Oriented box.
Definition OrientedBox.h:18
Specialization of cast result against a shape.
Definition CastResult.h:27
Settings to be passed with a ray cast.
Definition RayCast.h:64
Settings to be passed with a shape cast.
Definition ShapeCast.h:92
Filter class.
Definition ShapeFilter.h:17
Base class for all shapes (collision volume of a body). Defines a virtual interface for collision det...
Definition Shape.h:170
ShapeSettings::ShapeResult ShapeResult
Definition Shape.h:174
Definition StaticCompoundShape.h:33
JPH_OVERRIDE_NEW_DELETE StaticCompoundShape()
Constructor.
Definition StaticCompoundShape.h:38
virtual void CollectTransformedShapes(const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale, const SubShapeIDCreator &inSubShapeIDCreator, TransformedShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) const override
Definition StaticCompoundShape.cpp:529
virtual int GetIntersectingSubShapes(const AABox &inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const override
Definition StaticCompoundShape.cpp:558
virtual bool CastRay(const RayCast &inRay, const SubShapeIDCreator &inSubShapeIDCreator, RayCastResult &ioHit) const override
Definition StaticCompoundShape.cpp:409
virtual void RestoreBinaryState(StreamIn &inStream) override
This function should not be called directly, it is used by sRestoreFromBinaryState.
Definition StaticCompoundShape.cpp:639
virtual void CollidePoint(Vec3Arg inPoint, const SubShapeIDCreator &inSubShapeIDCreator, CollidePointCollector &ioCollector, const ShapeFilter &inShapeFilter={ }) const override
Definition StaticCompoundShape.cpp:472
static void sRegister()
Definition StaticCompoundShape.cpp:646
virtual void SaveBinaryState(StreamOut &inStream) const override
Saves the contents of the shape in binary form to inStream.
Definition StaticCompoundShape.cpp:632
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
Class that constructs a StaticCompoundShape. Note that if you only want a compound of 1 shape,...
Definition StaticCompoundShape.h:18
virtual ShapeResult Create() const override
Create a shape according to the settings specified by this object.
Definition StaticCompoundShape.cpp:52
Simple binary input stream.
Definition StreamIn.h:11
Simple binary output stream.
Definition StreamOut.h:11
Definition SubShapeID.h:108
Definition TempAllocator.h:16
JPH_INLINE GetIntersectingSubShapesVisitor(const BoxType &inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices)
Definition CompoundShapeVisitors.h:419
Definition CompoundShape.h:132
Class that holds information about the shape that can be used for logging / data collection purposes.
Definition Shape.h:377
Definition ShapeCast.h:69