Capycore Engine  0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
Loading...
Searching...
No Matches
collider_ray_result.h
Go to the documentation of this file.
1#pragma once
2
3#include <box2d/box2d.h>
6
14 b2ShapeId shape_id{};
15 std::optional<std::reference_wrapper<GameObject>> game_object{std::nullopt};
16 float fraction{0.0f};
17 bool is_valid{false};
18
19 float distance{0.0f};
20 Point point{0.0f, 0.0f};
21 Point normal{0.0f, 0.0f};
22};
Represents a point in 2D space.
Definition point.h:6
Structure representing the result of a raycast in the physics world.
Definition collider_ray_result.h:13
float distance
Definition collider_ray_result.h:19
std::optional< std::reference_wrapper< GameObject > > game_object
Definition collider_ray_result.h:15
Point point
Definition collider_ray_result.h:20
bool is_valid
Definition collider_ray_result.h:17
float fraction
Definition collider_ray_result.h:16
Point normal
Definition collider_ray_result.h:21
b2ShapeId shape_id
Definition collider_ray_result.h:14