Nebula
Loading...
Searching...
No Matches
actorcontext.cc File Reference
#include "foundation/stdneb.h"
#include "PxConfig.h"
#include "physics/actorcontext.h"
#include "physics/physxstate.h"
#include "physics/utils.h"
#include "physics/geometry.h"
#include "physics/cooking.h"
#include "math/transform.h"

Namespaces

namespace  Physics
 Diverse functions for manipulating physics actors.

Macros

#define GET_ACTOR(i)
#define GET_DYNAMIC(i)
#define GET_RIGID(i)
#define GET_SHAPE(i)

Functions

static bool Physics::IsKinematic (PxRigidActor *actor)
 Kinematic is a rigid body flag, and the actors tracked here can be static, so the actor kind has to be checked before the flag is read.
static void Physics::HashMix (uint64_t &hash, uint64_t value)
 FNV-1a hash.
static uint64_t Physics::HashFloat (float value)
static uint64_t Physics::ColliderGeometryHash (const ColliderDescription &desc)
 Hash of the parts of a collider description that decide the cooked geometry.
static bool Physics::BuildGeometry (const ColliderDescription &desc, PxGeometryHolder &out)
static PxMaterial * Physics::ResolveShapeMaterial (IndexT materialId)
static float Physics::ResolveShapeDensity (IndexT materialId)
static void Physics::ApplyShapeFlags (PxShape *shape, bool isTrigger)
static void Physics::ApplyShapeFilterData (PxShape *shape, ActorId actor)
 word0 is the collision group and word1 the feedback, which is what the simulation filter reads
static void Physics::ApplyShapeState (Shape &shape, const ColliderDescription &desc)
 Apply the material, flags and filter data of a description onto an existing shape.
static void Physics::ApplyMass (ActorId actor)
 Recompute the mass and inertia of a body.

Macro Definition Documentation

◆ GET_ACTOR

#define GET_ACTOR ( i)
Value:
ActorContext::actors[Ids::Index(i.id)]

◆ GET_DYNAMIC

#define GET_DYNAMIC ( i)
Value:
static_cast<PxRigidDynamic*>(ActorContext::actors[Ids::Index(i.id)].actor)

◆ GET_RIGID

#define GET_RIGID ( i)
Value:
static_cast<PxRigidActor*>(ActorContext::actors[Ids::Index(i.id)].actor)

◆ GET_SHAPE

#define GET_SHAPE ( i)
Value:
ActorContext::shapes[Ids::Index(i.id)]