Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Physics Namespace Reference

Classes

struct  CollisionEvent
 Actor-level collision or overlap event generated by PhysicsEngine. More...
struct  CollisionHandle
 Runtime handle for a registered collision component. More...
struct  CollisionProfileHandle
 Registry handle for a collision profile name. More...
class  CollisionProfileRegistry
 Registers collision profile names, enum mappings, and pair responses. More...
struct  PhysicsBodyHandle
 Runtime handle for a registered physics body component. More...
struct  PhysicsQueryFilter
 Collision profile filter used by PhysicsEngine scene queries. More...
struct  RaycastHit
 Result data for physics raycasts and sweep tests. More...
struct  RigidBodyCreateInfo
 Parameters used by Engine::Core::PhysicsEngine::createRigidBody(). More...

Enumerations

enum class  CollisionResponse {
  Ignore ,
  Overlap ,
  Block
}
 Collision response selected for a pair of collision profiles. More...
enum class  CollisionProfile {
  BlockAll ,
  OverlapAll ,
  IgnoreAll ,
  WorldStatic ,
  WorldDynamic ,
  Pawn
}
 Built-in collision profile enum registered by CollisionProfileRegistry::registerEngineProfiles(). More...
enum class  CollisionEventType {
  Begin ,
  Stay ,
  End
}
 Lifetime state for a collision or overlap pair. More...

Functions

const char * toString (CollisionResponse response)
 Converts a collision response to its config string.
bool fromString (const std::string &value, CollisionResponse &outResponse)
 Parses a collision response config string.
CollisionResponse resolvePairResponse (CollisionResponse responseAB, CollisionResponse responseBA)
 Resolves two directed profile responses into the final pair response.
void setActiveCollisionProfileRegistry (CollisionProfileRegistry *registry)
 Sets the process-wide collision profile registry used by physics helpers.
CollisionProfileRegistry * getActiveCollisionProfileRegistry ()
 Returns the process-wide active collision profile registry.

Enumeration Type Documentation

◆ CollisionEventType

Lifetime state for a collision or overlap pair.

Enumerator
Begin 

Pair was absent on the previous physics step and is present now.

Stay 

Pair was present on the previous physics step and is still present now.

End 

Pair was present on the previous physics step and is absent or invalidated now.

Definition at line 53 of file CollisionProfile.h.

◆ CollisionProfile

Built-in collision profile enum registered by CollisionProfileRegistry::registerEngineProfiles().

Registered names use the Engine. domain prefix, for example Engine.WorldStatic. Games can register additional enum domains through CollisionProfileRegistry::registerProfileEnum().

Enumerator
BlockAll 

Blocks every registered profile unless a config override changes the response.

OverlapAll 

Overlaps every registered profile unless a config override changes the response.

IgnoreAll 

Ignores every registered profile unless a config override changes the response.

WorldStatic 

Static level geometry and non-moving world collision.

WorldDynamic 

Moving world objects that are not pawns.

Pawn 

Player, NPC, or agent bodies controlled by gameplay code.

Definition at line 40 of file CollisionProfile.h.

◆ CollisionResponse

Collision response selected for a pair of collision profiles.

Pair resolution is conservative: Ignore wins over every other response, Overlap wins over Block, and Block is used only when both profiles resolve to Block.

Enumerator
Ignore 

No contact callback and no physical collision response.

Overlap 

Contact callback without physical collision response.

Block 

Physical collision response and contact callback.

Definition at line 27 of file CollisionProfile.h.

Function Documentation

◆ fromString()

bool Engine::Physics::fromString ( const std::string & value,
CollisionResponse & outResponse )
nodiscard

Parses a collision response config string.

Parameters
valueString value to parse. Accepted values are "Ignore", "Overlap", and "Block".
outResponseReceives the parsed response when the function returns true.
Returns
True when value names a valid collision response.

◆ getActiveCollisionProfileRegistry()

CollisionProfileRegistry * Engine::Physics::getActiveCollisionProfileRegistry ( )
nodiscard

Returns the process-wide active collision profile registry.

Referenced by Engine::Components::Collision::setCollisionProfile().

Here is the caller graph for this function:

◆ resolvePairResponse()

CollisionResponse Engine::Physics::resolvePairResponse ( CollisionResponse responseAB,
CollisionResponse responseBA )
nodiscard

Resolves two directed profile responses into the final pair response.

Returns Ignore when either side ignores, Overlap when at least one non-ignoring side overlaps, and Block only when both sides block.

Parameters
responseABResponse from profile A toward profile B.
responseBAResponse from profile B toward profile A.
Returns
Final response used by collision events, query filtering, and Bullet collision masks.

◆ setActiveCollisionProfileRegistry()

void Engine::Physics::setActiveCollisionProfileRegistry ( CollisionProfileRegistry * registry)

Sets the process-wide collision profile registry used by physics helpers.

◆ toString()

const char * Engine::Physics::toString ( CollisionResponse response)
nodiscard

Converts a collision response to its config string.

Parameters
responseResponse value to convert.
Returns
"Ignore", "Overlap", or "Block".