StevEngine
StevEngine is a customizable C++ game engine.
Loading...
Searching...
No Matches
Range3.hpp
1#pragma once
2#include "Vector3.hpp"
3
4#ifdef StevEngine_PHYSICS
5#include <Jolt/Geometry/AABox.h>
6#endif
7
8namespace StevEngine::Utilities {
9 class Vector3;
10
17 class Range3 {
18 public:
19 //Values
22
23 //Constructors
25 Range3();
26
36 Range3(double lowX, double highX, double lowY, double highY, double lowZ, double highZ);
37
43 Range3(const Vector3& low, const Vector3& high);
44
49 Vector3 GetCenter() const;
50
55 Vector3 GetSize() const;
56
57 //Conversions
58 explicit operator std::string() const;
59 #ifdef StevEngine_PHYSICS
60 operator JPH::AABox() const;
61 Range3& operator= (const JPH::AABox& other);
62 Range3(const JPH::AABox& other);
63 #endif
64 };
65}
Range3 & operator=(const JPH::AABox &other)
Assign from Jolt AABB.
Definition Range3.cpp:40
Vector3 High
Maximum point (upper bounds)
Definition Range3.hpp:21
Vector3 GetSize() const
Get size of range.
Definition Range3.cpp:29
Vector3 Low
Minimum point (lower bounds)
Definition Range3.hpp:20
Range3()
Create empty range at origin.
Definition Range3.cpp:12
Vector3 GetCenter() const
Get center point of range.
Definition Range3.cpp:25
3D vector class
Definition Vector3.hpp:17