Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Physics::RaycastHit Struct Reference

Result data for physics raycasts and sweep tests. More...

#include <PhysicsEngine.h>

Public Member Functions

Components::PhysicsBodygetPhysicsBody () const
 Gets the engine physics body attached to collisionObject.

Public Attributes

glm::vec3 point { 0.0f }
 World-space impact point.
glm::vec3 normal { 0.0f }
 World-space surface normal at the impact point.
float fraction = 0.0f
 Normalized hit fraction along the query segment.
float distance = 0.0f
 Distance from query origin to impact point in meters.
const btCollisionObject * collisionObject = nullptr
 Bullet collision object hit by the query.

Detailed Description

Result data for physics raycasts and sweep tests.

Definition at line 19 of file PhysicsEngine.h.

Member Function Documentation

◆ getPhysicsBody()

Components::PhysicsBody * Engine::Physics::RaycastHit::getPhysicsBody ( ) const
nodiscard

Gets the engine physics body attached to collisionObject.

Returns
Physics body component, or nullptr when the hit object has no attached body.

Member Data Documentation

◆ collisionObject

const btCollisionObject* Engine::Physics::RaycastHit::collisionObject = nullptr

Bullet collision object hit by the query.

Definition at line 44 of file PhysicsEngine.h.

◆ distance

float Engine::Physics::RaycastHit::distance = 0.0f

Distance from query origin to impact point in meters.

Definition at line 39 of file PhysicsEngine.h.

◆ fraction

float Engine::Physics::RaycastHit::fraction = 0.0f

Normalized hit fraction along the query segment.

Definition at line 34 of file PhysicsEngine.h.

◆ normal

glm::vec3 Engine::Physics::RaycastHit::normal { 0.0f }

World-space surface normal at the impact point.

Definition at line 29 of file PhysicsEngine.h.

◆ point

glm::vec3 Engine::Physics::RaycastHit::point { 0.0f }

World-space impact point.

Definition at line 24 of file PhysicsEngine.h.


The documentation for this struct was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Physics/PhysicsEngine.h