Capycore Engine  0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
Loading...
Searching...
No Matches
ColliderRayResult Struct Reference

Structure representing the result of a raycast in the physics world. More...

#include <collider_ray_result.h>

Public Attributes

b2ShapeId shape_id {}
 
std::optional< std::reference_wrapper< GameObject > > game_object {std::nullopt}
 
float fraction {0.0f}
 
bool is_valid {false}
 
float distance {0.0f}
 
Point point {0.0f, 0.0f}
 
Point normal {0.0f, 0.0f}
 

Detailed Description

Structure representing the result of a raycast in the physics world.

This struct encapsulates the distance, hit point, normal vector, and validity of a raycast operation.

Member Data Documentation

◆ distance

float ColliderRayResult::distance {0.0f}

◆ fraction

float ColliderRayResult::fraction {0.0f}

◆ game_object

std::optional<std::reference_wrapper<GameObject> > ColliderRayResult::game_object {std::nullopt}

◆ is_valid

bool ColliderRayResult::is_valid {false}

◆ normal

Point ColliderRayResult::normal {0.0f, 0.0f}

◆ point

Point ColliderRayResult::point {0.0f, 0.0f}

◆ shape_id

b2ShapeId ColliderRayResult::shape_id {}

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