21 ShapeResult
Create()
const override;
51#ifdef JPH_DEBUG_RENDERER
54 )
const override { outTotalVolume = 0.0f; outSubmergedVolume = 0.0f; outCenterOfBuoyancy =
Vec3::sZero(); }
55#ifdef JPH_DEBUG_RENDERER
56 virtual void Draw([[maybe_unused]]
DebugRenderer *inRenderer, [[maybe_unused]]
RMat44Arg inCenterOfMassTransform, [[maybe_unused]]
Vec3Arg inScale, [[maybe_unused]]
ColorArg inColor, [[maybe_unused]]
bool inUseMaterialColors, [[maybe_unused]]
bool inDrawWireframe)
const override;
69 static void sRegister();
#define JPH_EXPORT
Definition Core.h:236
unsigned int uint
Definition Core.h:453
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
#define JPH_DECLARE_SERIALIZABLE_VIRTUAL(linkage, class_name)
Definition SerializableObject.h:109
EShapeSubType
This enumerates all shape types, each shape can return its type through Shape::GetSubType.
Definition Shape.h:77
EShapeType
Shapes are categorized in groups, each shape can return which group it belongs to through its Shape::...
Definition Shape.h:57
@ Empty
Used by EmptyShape.
Axis aligned box.
Definition AABox.h:16
Definition CollideSoftBodyVertexIterator.h:15
Virtual interface that allows collecting multiple collision results.
Definition CollisionCollector.h:45
Class that holds an RGBA color with 8-bits per component.
Definition Color.h:16
Definition DebugRenderer.h:47
Definition EmptyShape.h:35
virtual void CollidePoint(Vec3Arg inPoint, const SubShapeIDCreator &inSubShapeIDCreator, CollidePointCollector &ioCollector, const ShapeFilter &inShapeFilter={ }) const override
Definition EmptyShape.h:60
virtual void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override
Definition EmptyShape.h:62
EmptyShape()
Definition EmptyShape.h:38
virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const override
Definition EmptyShape.h:49
virtual void CollideSoftBodyVertices(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const CollideSoftBodyVertexIterator &inVertices, uint inNumVertices, int inCollidingShapeIndex) const override
Definition EmptyShape.h:61
float GetVolume() const override
Definition EmptyShape.h:65
virtual void CastRay(const RayCast &inRay, const RayCastSettings &inRayCastSettings, const SubShapeIDCreator &inSubShapeIDCreator, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter={ }) const override
Definition EmptyShape.h:59
float GetInnerRadius() const override
Definition EmptyShape.h:46
EmptyShape(Vec3Arg inCenterOfMass)
Definition EmptyShape.h:39
AABox GetLocalBounds() const override
Get local bounding box including convex radius, this box is centered around the center of mass rather...
Definition EmptyShape.h:44
Stats GetStats() const override
Get stats of this shape. Use for logging / data collection purposes only. Does not add values from ch...
Definition EmptyShape.h:64
bool IsValidScale(Vec3Arg inScale) const override
Definition EmptyShape.h:66
virtual int GetTrianglesNext(GetTrianglesContext &ioContext, int inMaxTrianglesRequested, Float3 *outTriangleVertices, const PhysicsMaterial **outMaterials=nullptr) const override
Definition EmptyShape.h:63
EmptyShape(const EmptyShapeSettings &inSettings, ShapeResult &outResult)
Definition EmptyShape.h:40
virtual bool CastRay(const RayCast &inRay, const SubShapeIDCreator &inSubShapeIDCreator, RayCastResult &ioHit) const override
Definition EmptyShape.h:58
const PhysicsMaterial * GetMaterial(const SubShapeID &inSubShapeID) const override
Get the material assigned to a particular sub shape ID.
Definition EmptyShape.h:48
Vec3 GetCenterOfMass() const override
All shapes are centered around their center of mass. This function returns the center of mass positio...
Definition EmptyShape.h:43
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 ...
Definition EmptyShape.h:45
virtual void GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy, RVec3Arg inBaseOffset) const override
Definition EmptyShape.h:50
Class that constructs an EmptyShape.
Definition EmptyShape.h:14
EmptyShapeSettings()=default
EmptyShapeSettings(Vec3Arg inCenterOfMass)
Definition EmptyShape.h:19
Class that holds 3 floats. Used as a storage class. Convert to Vec3 for calculations.
Definition Float3.h:13
Describes the mass and inertia properties of a body. Used during body construction only.
Definition MassProperties.h:16
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
Definition PhysicsMaterial.h:23
static RefConst< PhysicsMaterial > sDefault
Default material that is used when a shape has no materials defined.
Definition PhysicsMaterial.h:31
An infinite plane described by the formula X . Normal + Constant = 0.
Definition Plane.h:11
Specialization of cast result against a shape.
Definition CastResult.h:30
Settings to be passed with a ray cast.
Definition RayCast.h:70
void Set(const Type &inResult)
Set the result value.
Definition Result.h:140
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:186
virtual ShapeResult Create() const =0
Create a shape according to the settings specified by this object.
Definition SubShapeID.h:108
A sub shape id contains a path to an element (usually a triangle or other primitive type) of a compou...
Definition SubShapeID.h:23
static JPH_INLINE Vec3 sZero()
Vector with all zeros.
Definition Vec3.inl:107
An opaque buffer that holds shape specific information during GetTrianglesStart/Next.
Definition Shape.h:348
Class that holds information about the shape that can be used for logging / data collection purposes.
Definition Shape.h:408