|
JPH_OVERRIDE_NEW_DELETE | HeightFieldShape () |
| Constructor.
|
|
| HeightFieldShape (const HeightFieldShapeSettings &inSettings, ShapeResult &outResult) |
|
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.
|
|
uint | GetSampleCount () const |
| Get the size of the height field. Note that this will always be rounded up to the nearest multiple of GetBlockSize().
|
|
uint | GetBlockSize () const |
| Get the size of a block.
|
|
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.
|
|
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.
|
|
virtual float | GetInnerRadius () const override |
|
virtual MassProperties | GetMassProperties () const override |
| Calculate the mass and inertia of this shape.
|
|
virtual const PhysicsMaterial * | GetMaterial (const SubShapeID &inSubShapeID) const override |
| Get the material assigned to a particular sub shape ID.
|
|
const PhysicsMaterial * | GetMaterial (uint inX, uint inY) const |
| Overload to get the material at a particular location.
|
|
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)
|
|
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 | CollideSoftBodyVertices (Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, SoftBodyVertex *ioVertices, uint inNumVertices, float inDeltaTime, Vec3Arg inDisplacementDueToGravity, int inCollidingShapeIndex) 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 |
|
Vec3 | GetPosition (uint inX, uint inY) const |
|
bool | IsNoCollision (uint inX, uint inY) const |
| Check if height field at sampled location (inX, inY) has collision (has a hole or not)
|
|
bool | ProjectOntoSurface (Vec3Arg inLocalPosition, Vec3 &outSurfacePosition, SubShapeID &outSubShapeID) const |
|
void | GetHeights (uint inX, uint inY, uint inSizeX, uint inSizeY, float *outHeights, uint inHeightsStride) const |
|
void | SetHeights (uint inX, uint inY, uint inSizeX, uint inSizeY, const float *inHeights, uint inHeightsStride, TempAllocator &inAllocator, float inActiveEdgeCosThresholdAngle=0.996195f) |
|
const PhysicsMaterialList & | GetMaterialList () const |
| Get the current list of materials, the indices returned by GetMaterials() will index into this list.
|
|
void | GetMaterials (uint inX, uint inY, uint inSizeX, uint inSizeY, uint8 *outMaterials, uint inMaterialsStride) const |
|
bool | SetMaterials (uint inX, uint inY, uint inSizeX, uint inSizeY, const uint8 *inMaterials, uint inMaterialsStride, const PhysicsMaterialList *inMaterialList, TempAllocator &inAllocator) |
|
virtual void | SaveBinaryState (StreamOut &inStream) const override |
| Saves the contents of the shape in binary form to inStream.
|
|
virtual void | SaveMaterialState (PhysicsMaterialList &outMaterials) const override |
|
virtual void | RestoreMaterialState (const PhysicsMaterialRefC *inMaterials, uint inNumMaterials) override |
| 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.
|
|
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.
|
|
virtual float | GetVolume () const override |
|
| Shape (EShapeType inType, EShapeSubType inSubType) |
| Constructor.
|
|
| Shape (EShapeType inType, EShapeSubType inSubType, const ShapeSettings &inSettings, ShapeResult &outResult) |
|
virtual | ~Shape ()=default |
| Destructor.
|
|
EShapeType | GetType () const |
| Get type.
|
|
EShapeSubType | GetSubType () const |
|
uint64 | GetUserData () const |
| User data (to be used freely by the application)
|
|
void | SetUserData (uint64 inUserData) |
|
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.
|
|
virtual AABox | GetWorldSpaceBounds (Mat44Arg inCenterOfMassTransform, Vec3Arg inScale) const |
|
AABox | GetWorldSpaceBounds (DMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const |
| Get world space bounds including convex radius.
|
|
virtual uint64 | GetSubShapeUserData (const SubShapeID &inSubShapeID) const |
| Get the user data of a particular sub shape ID.
|
|
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 | 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)
|
|
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)
|
|
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 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.
|
|
virtual bool | IsValidScale (Vec3Arg inScale) const |
|
virtual void | SaveMaterialState (PhysicsMaterialList &outMaterials) const |
| Outputs the material references that this shape has to outMaterials.
|
|
virtual void | SaveSubShapeState (ShapeList &outSubShapes) const |
| Outputs the shape references that this shape has to outSubShapes.
|
|
virtual void | RestoreSubShapeState (const ShapeRefC *inSubShapes, uint inNumShapes) |
| 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.
|
|
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.
|
|
| RefTarget ()=default |
| Constructor.
|
|
| RefTarget (const RefTarget &) |
|
| ~RefTarget () |
| assert no one is referencing us
|
|
void | SetEmbedded () const |
|
RefTarget & | operator= (const RefTarget &) |
| Assignment operator.
|
|
uint32 | GetRefCount () const |
| Get current refcount of this object.
|
|
void | AddRef () const |
| Add or release a reference to this object.
|
|
void | Release () const |
|
| NonCopyable ()=default |
|
| NonCopyable (const NonCopyable &)=delete |
|
void | operator= (const NonCopyable &)=delete |
|
A height field shape. Cannot be used as a dynamic object.