Leviathan  0.8.0.0
Leviathan game engine
Plane.h
Go to the documentation of this file.
1 // Leviathan Game Engine
2 // Copyright (c) 2012-2019 Henri Hyyryläinen
3 #pragma once
4 #include "Define.h"
5 // ------------------------------------ //
6 #include "Types.h"
7 
8 namespace Leviathan {
9 struct Ray;
10 
12 struct Plane {
13 public:
14  inline Plane(const Float3& normal, float distance) : Normal(normal), Distance(distance) {}
15 
18  DLLEXPORT std::tuple<bool, float> CalculateIntersection(const Ray& ray) const;
19 
20 public:
22  float Distance;
23 };
24 
25 } // namespace Leviathan
26 
27 #ifdef LEAK_INTO_GLOBAL
28 using Leviathan::Plane;
29 #endif
Ray starting from an origin with a direction.
Definition: Ray.h:14
DLLEXPORT std::tuple< bool, float > CalculateIntersection(const Ray &ray) const
Definition: Plane.cpp:8
Plane(const Float3 &normal, float distance)
Definition: Plane.h:14
A plane represented by a normal and a distance.
Definition: Plane.h:12
std::iterator_traits< octet_iterator >::difference_type distance(octet_iterator first, octet_iterator last)
Definition: checked.h:198
#define DLLEXPORT
Definition: Include.h:84
Float3 Normal
Definition: Plane.h:21
The access mask controls which registered functions and classes a script sees.
Definition: GameModule.h:12
float Distance
Definition: Plane.h:22