Toast Engine
Loading...
Searching...
No Matches
shape_query.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
9#include "body.hpp"
10#include "shape.hpp"
11
12#include <glm/glm.hpp>
13
14namespace physics {
15
18 BodyID body;
19 ShapeID shape;
20 glm::vec3 normal = {};
21 glm::vec3 point = {};
22 float penetration = 0.0f;
23};
24
25struct SweepHit {
26 bool hit = false;
27 float fraction = 1.0f;
28 glm::vec3 position = {};
29 glm::vec3 normal = {};
30 glm::vec3 point = {};
31 BodyID body;
32 ShapeID shape;
33};
34
35}
Body identifiers, creation data, and copied runtime state.
Shape identifiers, geometry, and runtime records.
Definition body.hpp:20
normal points out of the obstacle toward the query shape
Definition shape_query.hpp:17
Definition shape.hpp:29
Definition shape_query.hpp:25