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

Actor-level collision or overlap event generated by PhysicsEngine. More...

#include <CollisionProfile.h>

Collaboration diagram for Engine::Physics::CollisionEvent:

Public Attributes

Components::PhysicsBody * selfBody = nullptr
 Body receiving the callback.
Components::PhysicsBody * otherBody = nullptr
 Counterpart body, or nullptr for invalidation End events.
Entities::Actor * selfActor = nullptr
 Actor that owns selfBody, when available.
Entities::Actor * otherActor = nullptr
 Actor that owns otherBody, when available.
CollisionResponse response = CollisionResponse::Ignore
 Resolved response for this pair.
CollisionEventType eventType = CollisionEventType::Begin
 Pair lifetime state for this event.
std::vector< Components::Collision * > selfComponents
 Collision components on selfBody that contributed to the actor-level event.
std::vector< Components::Collision * > otherComponents
 Collision components on otherBody that contributed to the actor-level event.

Detailed Description

Actor-level collision or overlap event generated by PhysicsEngine.

Events are directed: self* fields describe the body receiving the callback, and other* fields describe the counterpart. During End events caused by body or collision invalidation, the counterpart pointers and handles can be null or invalid because the other object has already been removed.

Definition at line 148 of file CollisionProfile.h.

Member Data Documentation

◆ eventType

CollisionEventType Engine::Physics::CollisionEvent::eventType = CollisionEventType::Begin

Pair lifetime state for this event.

Definition at line 157 of file CollisionProfile.h.

◆ otherActor

Entities::Actor* Engine::Physics::CollisionEvent::otherActor = nullptr

Actor that owns otherBody, when available.

Definition at line 154 of file CollisionProfile.h.

◆ otherBody

Components::PhysicsBody* Engine::Physics::CollisionEvent::otherBody = nullptr

Counterpart body, or nullptr for invalidation End events.

Definition at line 151 of file CollisionProfile.h.

◆ otherComponents

std::vector<Components::Collision *> Engine::Physics::CollisionEvent::otherComponents

Collision components on otherBody that contributed to the actor-level event.

Definition at line 163 of file CollisionProfile.h.

◆ response

CollisionResponse Engine::Physics::CollisionEvent::response = CollisionResponse::Ignore

Resolved response for this pair.

Definition at line 156 of file CollisionProfile.h.

◆ selfActor

Entities::Actor* Engine::Physics::CollisionEvent::selfActor = nullptr

Actor that owns selfBody, when available.

Definition at line 153 of file CollisionProfile.h.

◆ selfBody

Components::PhysicsBody* Engine::Physics::CollisionEvent::selfBody = nullptr

Body receiving the callback.

Definition at line 150 of file CollisionProfile.h.

◆ selfComponents

std::vector<Components::Collision *> Engine::Physics::CollisionEvent::selfComponents

Collision components on selfBody that contributed to the actor-level event.

Definition at line 160 of file CollisionProfile.h.


The documentation for this struct was generated from the following file: