HatchitMath
ht_bounds.h
1 
27 #pragma once
28 
29 #include <ht_platform.h>
30 #include <ht_vector3.h>
31 #include <cmath>
32 
33 namespace Hatchit
34 {
35  namespace Math
36  {
37  class HT_API Bounds
38  {
39  public:
42  Bounds();
48  Bounds(Vector3 center, float width);
55  Bounds(Vector3 center, float xWidth, float yWidth, float zWidth);
56  virtual ~Bounds();
57 
58  //Accessors and Mutators
59 
63  float getXWidth();
67  float getYWidth();
71  float getZWidth();
72 
74  Vector3 getCenter();
75 
80  Vector3 getMinBound();
85  Vector3 getMaxBound();
86 
87  //For collisions
88 
94  Vector3 getPositive(Vector3 normal);
95 
101  Vector3 getNegative(Vector3 normal);
102 
107  bool isCollidingWithBounds(Bounds other);
108 
109  private:
110  float xWidth;
111  float yWidth;
112  float zWidth;
113 
114  Vector3 center;
115 
116  Vector3 minBound;
117  Vector3 maxBound;
118  };
119  }
120 }
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_intrin.h:33
Definition: ht_math.h:280
Definition: ht_bounds.h:37