opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
collision_tests.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <optional>
7
8namespace osc { class Rect; }
9namespace osc { struct AABB; }
10namespace osc { struct Disc; }
11namespace osc { struct FrustumPlanes;}
12namespace osc { struct Ray; }
13namespace osc { struct Plane; }
14namespace osc { struct Sphere; }
15namespace osc { struct Triangle; }
16
17namespace osc
18{
19 bool is_intersecting(const Rect&, const Vector2&);
20 bool is_intersecting(const FrustumPlanes&, const AABB&);
21 std::optional<RayCollision> find_collision(const Ray&, const Sphere&);
22 std::optional<RayCollision> find_collision(const Ray&, const AABB&);
23 std::optional<RayCollision> find_collision(const Ray&, const Plane&);
24 std::optional<RayCollision> find_collision(const Ray&, const Disc&);
25 std::optional<RayCollision> find_collision(const Ray&, const Triangle&);
26}
Definition rect.h:17
Definition custom_decoration_generator.h:5
std::optional< RayCollision > find_collision(const Ray &, const Sphere &)
bool is_intersecting(const Rect &, const Vector2 &)
Definition aabb.h:14
Definition disc.h:12
Definition frustum_planes.h:10
Definition plane.h:16
Definition ray.h:13
Definition sphere.h:9
Definition triangle.h:9