|
JPH_OVERRIDE_NEW_DELETE | MutableCompoundShape () |
| Constructor. More...
|
|
| MutableCompoundShape (const MutableCompoundShapeSettings &inSettings, ShapeResult &outResult) |
|
Ref< MutableCompoundShape > | Clone () const |
| Clone this shape. Can be used to avoid race conditions. See the documentation of this class for more information. More...
|
|
virtual bool | CastRay (const RayCast &inRay, const SubShapeIDCreator &inSubShapeIDCreator, RayCastResult &ioHit) const override |
|
virtual void | CastRay (const RayCast &inRay, const RayCastSettings &inRayCastSettings, const SubShapeIDCreator &inSubShapeIDCreator, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter={ }) const override |
|
virtual void | CollidePoint (Vec3Arg inPoint, const SubShapeIDCreator &inSubShapeIDCreator, CollidePointCollector &ioCollector, const ShapeFilter &inShapeFilter={ }) const override |
|
virtual void | CollectTransformedShapes (const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale, const SubShapeIDCreator &inSubShapeIDCreator, TransformedShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) const override |
|
virtual int | GetIntersectingSubShapes (const AABox &inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const override |
|
virtual int | GetIntersectingSubShapes (const OrientedBox &inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const override |
|
virtual void | SaveBinaryState (StreamOut &inStream) const override |
| Saves the contents of the shape in binary form to inStream. More...
|
|
virtual Stats | GetStats () const override |
| Get stats of this shape. Use for logging / data collection purposes only. Does not add values from child shapes, use GetStatsRecursive for this. More...
|
|
template<class Visitor > |
void | WalkSubShapes (Visitor &ioVisitor) const |
|
|
uint | AddShape (Vec3Arg inPosition, QuatArg inRotation, const Shape *inShape, uint32 inUserData=0) |
|
void | RemoveShape (uint inIndex) |
|
void | ModifyShape (uint inIndex, Vec3Arg inPosition, QuatArg inRotation) |
|
void | ModifyShape (uint inIndex, Vec3Arg inPosition, QuatArg inRotation, const Shape *inShape) |
|
void | ModifyShapes (uint inStartIndex, uint inNumber, const Vec3 *inPositions, const Quat *inRotations, uint inPositionStride=sizeof(Vec3), uint inRotationStride=sizeof(Quat)) |
| Batch set positions / orientations, this avoids duplicate work due to bounding box calculation. Beware this can create a race condition if you're running collision queries in parallel. See class documentation for more information. More...
|
|
void | AdjustCenterOfMass () |
|
JPH_OVERRIDE_NEW_DELETE | CompoundShape (EShapeSubType inSubType) |
| Constructor. More...
|
|
| CompoundShape (EShapeSubType inSubType, const ShapeSettings &inSettings, ShapeResult &outResult) |
|
virtual Vec3 | GetCenterOfMass () const override |
| All shapes are centered around their center of mass. This function returns the center of mass position that needs to be applied to transform the shape to where it was created. More...
|
|
virtual bool | MustBeStatic () const override |
| Check if this shape can only be used to create a static body or if it can also be dynamic/kinematic. More...
|
|
virtual AABox | GetLocalBounds () const override |
| Get local bounding box including convex radius, this box is centered around the center of mass rather than the world transform. More...
|
|
virtual uint | GetSubShapeIDBitsRecursive () const override |
| Get the max number of sub shape ID bits that are needed to be able to address any leaf shape in this shape. Used mainly for checking that it is smaller or equal than SubShapeID::MaxBits. More...
|
|
virtual AABox | GetWorldSpaceBounds (Mat44Arg inCenterOfMassTransform, Vec3Arg inScale) const override |
|
virtual float | GetInnerRadius () const override |
|
virtual MassProperties | GetMassProperties () const override |
| Calculate the mass and inertia of this shape. More...
|
|
virtual const PhysicsMaterial * | GetMaterial (const SubShapeID &inSubShapeID) const override |
| Get the material assigned to a particular sub shape ID. More...
|
|
virtual uint64 | GetSubShapeUserData (const SubShapeID &inSubShapeID) const override |
| Get the user data of a particular sub shape ID. More...
|
|
virtual TransformedShape | GetSubShapeTransformedShape (const SubShapeID &inSubShapeID, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale, SubShapeID &outRemainder) const override |
|
virtual Vec3 | GetSurfaceNormal (const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const override |
|
virtual void | GetSupportingFace (const SubShapeID &inSubShapeID, Vec3Arg inDirection, Vec3Arg inScale, Mat44Arg inCenterOfMassTransform, SupportingFace &outVertices) const override |
|
virtual void | GetSubmergedVolume (Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy JPH_IF_DEBUG_RENDERER(, RVec3Arg inBaseOffset)) const override |
|
virtual void | Draw (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const override |
| Draw the shape at a particular location with a particular color (debugging purposes) More...
|
|
virtual void | DrawGetSupportFunction (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inDrawSupportDirection) const override |
| Draw the results of the GetSupportFunction with the convex radius added back on to show any errors introduced by this process (only relevant for convex shapes) More...
|
|
virtual void | DrawGetSupportingFace (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const override |
| Draw the results of the GetSupportingFace function to show any errors introduced by this process (only relevant for convex shapes) More...
|
|
virtual void | CollideSoftBodyVertices (Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, SoftBodyVertex *ioVertices, uint inNumVertices, float inDeltaTime, Vec3Arg inDisplacementDueToGravity, int inCollidingShapeIndex) const override |
|
virtual void | TransformShape (Mat44Arg inCenterOfMassTransform, TransformedShapeCollector &ioCollector) const override |
|
virtual void | GetTrianglesStart (GetTrianglesContext &ioContext, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override |
|
virtual int | GetTrianglesNext (GetTrianglesContext &ioContext, int inMaxTrianglesRequested, Float3 *outTriangleVertices, const PhysicsMaterial **outMaterials=nullptr) const override |
|
virtual int | GetIntersectingSubShapes (const AABox &inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const =0 |
|
virtual int | GetIntersectingSubShapes (const OrientedBox &inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const =0 |
|
const SubShapes & | GetSubShapes () const |
| Access to the sub shapes of this compound. More...
|
|
uint | GetNumSubShapes () const |
| Get the total number of sub shapes. More...
|
|
const SubShape & | GetSubShape (uint inIdx) const |
| Access to a particular sub shape. More...
|
|
uint32 | GetCompoundUserData (uint inIdx) const |
| Get the user data associated with a shape in this compound. More...
|
|
void | SetCompoundUserData (uint inIdx, uint32 inUserData) |
| Set the user data associated with a shape in this compound. More...
|
|
bool | IsSubShapeIDValid (SubShapeID inSubShapeID) const |
|
uint32 | GetSubShapeIndexFromID (SubShapeID inSubShapeID, SubShapeID &outRemainder) const |
|
SubShapeIDCreator | GetSubShapeIDFromIndex (int inIdx, const SubShapeIDCreator &inParentSubShapeID) const |
| Convert a sub shape index to a sub shape ID. More...
|
|
virtual void | SaveBinaryState (StreamOut &inStream) const override |
| Saves the contents of the shape in binary form to inStream. More...
|
|
virtual void | SaveSubShapeState (ShapeList &outSubShapes) const override |
| Outputs the shape references that this shape has to outSubShapes. More...
|
|
virtual void | RestoreSubShapeState (const ShapeRefC *inSubShapes, uint inNumShapes) override |
| Restore the shape references after calling sRestoreFromBinaryState. Note that the exact same shapes need to be provided in the same order as returned by SaveSubShapeState. More...
|
|
virtual Stats | GetStatsRecursive (VisitedShapes &ioVisitedShapes) const override |
| Volume of this shape (m^3). Note that for compound shapes the volume may be incorrect since child shapes can overlap which is not accounted for. More...
|
|
virtual float | GetVolume () const override |
|
virtual bool | IsValidScale (Vec3Arg inScale) const override |
|
virtual Vec3 | MakeScaleValid (Vec3Arg inScale) const override |
|
virtual AABox | GetWorldSpaceBounds (Mat44Arg inCenterOfMassTransform, Vec3Arg inScale) const |
|
AABox | GetWorldSpaceBounds (DMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const |
| Get world space bounds including convex radius. More...
|
|
| Shape (EShapeType inType, EShapeSubType inSubType) |
| Constructor. More...
|
|
| Shape (EShapeType inType, EShapeSubType inSubType, const ShapeSettings &inSettings, ShapeResult &outResult) |
|
virtual | ~Shape ()=default |
| Destructor. More...
|
|
EShapeType | GetType () const |
| Get type. More...
|
|
EShapeSubType | GetSubType () const |
|
uint64 | GetUserData () const |
| User data (to be used freely by the application) More...
|
|
void | SetUserData (uint64 inUserData) |
|
virtual bool | MustBeStatic () const |
| Check if this shape can only be used to create a static body or if it can also be dynamic/kinematic. More...
|
|
virtual Vec3 | GetCenterOfMass () const |
| All shapes are centered around their center of mass. This function returns the center of mass position that needs to be applied to transform the shape to where it was created. More...
|
|
virtual AABox | GetLocalBounds () const =0 |
| Get local bounding box including convex radius, this box is centered around the center of mass rather than the world transform. More...
|
|
virtual uint | GetSubShapeIDBitsRecursive () const =0 |
| Get the max number of sub shape ID bits that are needed to be able to address any leaf shape in this shape. Used mainly for checking that it is smaller or equal than SubShapeID::MaxBits. More...
|
|
virtual AABox | GetWorldSpaceBounds (Mat44Arg inCenterOfMassTransform, Vec3Arg inScale) const |
|
AABox | GetWorldSpaceBounds (DMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const |
| Get world space bounds including convex radius. More...
|
|
virtual float | GetInnerRadius () const =0 |
|
virtual MassProperties | GetMassProperties () const =0 |
| Calculate the mass and inertia of this shape. More...
|
|
virtual const PhysicsMaterial * | GetMaterial (const SubShapeID &inSubShapeID) const =0 |
| Get the material assigned to a particular sub shape ID. More...
|
|
virtual Vec3 | GetSurfaceNormal (const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const =0 |
|
virtual void | GetSupportingFace (const SubShapeID &inSubShapeID, Vec3Arg inDirection, Vec3Arg inScale, Mat44Arg inCenterOfMassTransform, SupportingFace &outVertices) const |
|
virtual uint64 | GetSubShapeUserData (const SubShapeID &inSubShapeID) const |
| Get the user data of a particular sub shape ID. More...
|
|
virtual TransformedShape | GetSubShapeTransformedShape (const SubShapeID &inSubShapeID, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale, SubShapeID &outRemainder) const |
|
virtual void | GetSubmergedVolume (Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy, RVec3Arg inBaseOffset) const =0 |
|
virtual void | Draw (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const =0 |
| Draw the shape at a particular location with a particular color (debugging purposes) More...
|
|
virtual void | DrawGetSupportFunction (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inDrawSupportDirection) const |
| Draw the results of the GetSupportFunction with the convex radius added back on to show any errors introduced by this process (only relevant for convex shapes) More...
|
|
virtual void | DrawGetSupportingFace (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const |
| Draw the results of the GetSupportingFace function to show any errors introduced by this process (only relevant for convex shapes) More...
|
|
virtual bool | CastRay (const RayCast &inRay, const SubShapeIDCreator &inSubShapeIDCreator, RayCastResult &ioHit) const =0 |
|
virtual void | CastRay (const RayCast &inRay, const RayCastSettings &inRayCastSettings, const SubShapeIDCreator &inSubShapeIDCreator, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter={ }) const =0 |
|
virtual void | CollidePoint (Vec3Arg inPoint, const SubShapeIDCreator &inSubShapeIDCreator, CollidePointCollector &ioCollector, const ShapeFilter &inShapeFilter={ }) const =0 |
|
virtual void | CollideSoftBodyVertices (Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, SoftBodyVertex *ioVertices, uint inNumVertices, float inDeltaTime, Vec3Arg inDisplacementDueToGravity, int inCollidingShapeIndex) const =0 |
|
virtual void | CollectTransformedShapes (const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale, const SubShapeIDCreator &inSubShapeIDCreator, TransformedShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) const |
|
virtual void | TransformShape (Mat44Arg inCenterOfMassTransform, TransformedShapeCollector &ioCollector) const |
|
ShapeResult | ScaleShape (Vec3Arg inScale) const |
|
virtual void | GetTrianglesStart (GetTrianglesContext &ioContext, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const =0 |
|
virtual int | GetTrianglesNext (GetTrianglesContext &ioContext, int inMaxTrianglesRequested, Float3 *outTriangleVertices, const PhysicsMaterial **outMaterials=nullptr) const =0 |
|
virtual Stats | GetStats () const =0 |
| Get stats of this shape. Use for logging / data collection purposes only. Does not add values from child shapes, use GetStatsRecursive for this. More...
|
|
virtual Stats | GetStatsRecursive (VisitedShapes &ioVisitedShapes) const |
| Volume of this shape (m^3). Note that for compound shapes the volume may be incorrect since child shapes can overlap which is not accounted for. More...
|
|
virtual float | GetVolume () const =0 |
|
virtual bool | IsValidScale (Vec3Arg inScale) const |
|
virtual Vec3 | MakeScaleValid (Vec3Arg inScale) const |
|
virtual void | SaveMaterialState (PhysicsMaterialList &outMaterials) const |
| Outputs the material references that this shape has to outMaterials. More...
|
|
virtual void | RestoreMaterialState (const PhysicsMaterialRefC *inMaterials, uint inNumMaterials) |
| Restore the material references after calling sRestoreFromBinaryState. Note that the exact same materials need to be provided in the same order as returned by SaveMaterialState. More...
|
|
void | SaveWithChildren (StreamOut &inStream, ShapeToIDMap &ioShapeMap, MaterialToIDMap &ioMaterialMap) const |
| Save this shape, all its children and its materials. Pass in an empty map in ioShapeMap / ioMaterialMap or reuse the same map while saving multiple shapes to the same stream in order to avoid writing duplicates. More...
|
|
| RefTarget ()=default |
| Constructor. More...
|
|
| RefTarget (const RefTarget &) |
|
| ~RefTarget () |
| assert no one is referencing us More...
|
|
void | SetEmbedded () const |
|
RefTarget & | operator= (const RefTarget &) |
| Assignment operator. More...
|
|
uint32 | GetRefCount () const |
| Get current refcount of this object. More...
|
|
void | AddRef () const |
| Add or release a reference to this object. More...
|
|
void | Release () const |
|
| NonCopyable ()=default |
|
| NonCopyable (const NonCopyable &)=delete |
|
void | operator= (const NonCopyable &)=delete |
|