29#ifndef PX_RIGID_BODY_EXT_H
30#define PX_RIGID_BODY_EXT_H
35#include "PxPhysXConfig.h"
36#include "PxRigidBody.h"
37#include "PxQueryReport.h"
38#include "PxQueryFiltering.h"
39#include "extensions/PxMassProperties.h"
345 const PxReal invInertiaScale,
PxVec3& deltaLinearVelocity,
PxVec3& deltaAngularVelocity);
362 const PxReal invInertiaScale,
PxVec3& linearImpulse,
PxVec3& angularImpulse);
394 PxHitFlags outputFlags,
399 const PxReal inflation=0.0f);
435 PxHitFlags outputFlags,
436 PxSweepHit* touchHitBuffer, PxU32* touchHitShapeIndices, PxU32 touchHitBufferSize,
437 PxSweepHit& block, PxI32& blockingShapeIndex,
bool& overflow,
440 const PxQueryCache* cache = NULL,
const PxReal inflation = 0.0f);
Utility class to compute and manipulate mass and inertia tensor properties.
Definition PxMassProperties.h:65
Scene query filtering callbacks.
Definition PxQueryFiltering.h:175
utility functions for use with PxRigidBody and subclasses
Definition PxRigidBodyExt.h:57
static PxVec3 getLocalVelocityAtLocalPos(const PxRigidBody &body, const PxVec3 &pos)
Computes the velocity of a point given in local coordinates if it were attached to the specified body...
Definition ExtRigidBodyExt.cpp:462
static PxMassProperties computeMassPropertiesFromShapes(const PxShape *const *shapes, PxU32 shapeCount)
Compute the mass, inertia tensor and center of mass from a list of shapes.
Definition ExtRigidBodyExt.cpp:381
static bool setMassAndUpdateInertia(PxRigidBody &body, const PxReal *shapeMasses, PxU32 shapeMassCount, const PxVec3 *massLocalPose=NULL, bool includeNonSimShapes=false)
Computation of mass properties for a rigid body actor.
Definition ExtRigidBodyExt.cpp:371
static PxVec3 getVelocityAtOffset(const PxRigidBody &body, const PxVec3 &pos)
Computes the velocity of a point (offset from the origin of the body) given in world coordinates if i...
Definition ExtRigidBodyExt.cpp:471
static void addLocalForceAtLocalPos(PxRigidBody &body, const PxVec3 &force, const PxVec3 &pos, PxForceMode::Enum mode=PxForceMode::eFORCE, bool wakeup=true)
Applies a force (or impulse) defined in the actor local coordinate frame, acting at a particular poin...
Definition ExtRigidBodyExt.cpp:436
static bool updateMassAndInertia(PxRigidBody &body, const PxReal *shapeDensities, PxU32 shapeDensityCount, const PxVec3 *massLocalPose=NULL, bool includeNonSimShapes=false)
Computation of mass properties for a rigid body actor.
Definition ExtRigidBodyExt.cpp:311
static void addForceAtLocalPos(PxRigidBody &body, const PxVec3 &force, const PxVec3 &pos, PxForceMode::Enum mode=PxForceMode::eFORCE, bool wakeup=true)
Applies a force (or impulse) defined in the global coordinate frame, acting at a particular point in ...
Definition ExtRigidBodyExt.cpp:421
static void addLocalForceAtPos(PxRigidBody &body, const PxVec3 &force, const PxVec3 &pos, PxForceMode::Enum mode=PxForceMode::eFORCE, bool wakeup=true)
Applies a force (or impulse) defined in the actor local coordinate frame, acting at a particular poin...
Definition ExtRigidBodyExt.cpp:429
static void computeLinearAngularImpulse(const PxRigidBody &body, const PxTransform &globalPose, const PxVec3 &point, const PxVec3 &impulse, const PxReal invMassScale, const PxReal invInertiaScale, PxVec3 &linearImpulse, PxVec3 &angularImpulse)
Computes the linear and angular impulse vectors for a given impulse at a world space position taking ...
Definition ExtRigidBodyExt.cpp:494
static PxU32 linearSweepMultiple(PxRigidBody &body, PxScene &scene, const PxVec3 &unitDir, const PxReal distance, PxHitFlags outputFlags, PxSweepHit *touchHitBuffer, PxU32 *touchHitShapeIndices, PxU32 touchHitBufferSize, PxSweepHit &block, PxI32 &blockingShapeIndex, bool &overflow, const PxQueryFilterData &filterData=PxQueryFilterData(), PxQueryFilterCallback *filterCall=NULL, const PxQueryCache *cache=NULL, const PxReal inflation=0.0f)
Performs a linear sweep through space with the body's geometry objects, returning all overlaps.
Definition ExtRigidBodyExt.cpp:570
static void computeVelocityDeltaFromImpulse(const PxRigidBody &body, const PxVec3 &impulsiveForce, const PxVec3 &impulsiveTorque, PxVec3 &deltaLinearVelocity, PxVec3 &deltaAngularVelocity)
Compute the change to linear and angular velocity that would occur if an impulsive force and torque w...
Definition ExtRigidBodyExt.cpp:502
static void addForceAtPos(PxRigidBody &body, const PxVec3 &force, const PxVec3 &pos, PxForceMode::Enum mode=PxForceMode::eFORCE, bool wakeup=true)
Applies a force (or impulse) defined in the global coordinate frame, acting at a particular point in ...
Definition ExtRigidBodyExt.cpp:416
static PxVec3 getVelocityAtPos(const PxRigidBody &body, const PxVec3 &pos)
Computes the velocity of a point given in world coordinates if it were attached to the specified body...
Definition ExtRigidBodyExt.cpp:453
static bool linearSweepSingle(PxRigidBody &body, PxScene &scene, const PxVec3 &unitDir, const PxReal distance, PxHitFlags outputFlags, PxSweepHit &closestHit, PxU32 &shapeIndex, const PxQueryFilterData &filterData=PxQueryFilterData(), PxQueryFilterCallback *filterCall=NULL, const PxQueryCache *cache=NULL, const PxReal inflation=0.0f)
Performs a linear sweep through space with the body's geometry objects.
Definition ExtRigidBodyExt.cpp:534
PxRigidBody is a base class shared between dynamic rigid body objects.
Definition PxRigidBody.h:199
A scene is a collection of bodies and constraints which can interact.
Definition PxScene.h:178
Abstract class for collision shapes.
Definition PxShape.h:146
3 Element vector class.
Definition PxVec3.h:50
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Enum
Definition PxForceMode.h:51
@ eFORCE
parameter has unit of mass * length / time^2, i.e., a force
Definition PxForceMode.h:52
single hit cache for scene queries.
Definition PxQueryReport.h:264
Scene query filtering data.
Definition PxQueryFiltering.h:138
Definition PxQueryReport.h:68