12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- #pragma once
- #include <Mathematics/Rectangle.h>
- #include <Mathematics/Vector3.h>
- namespace WwiseGTE
- {
-
-
- template <typename Real>
- class Lozenge3
- {
- public:
-
-
-
- Lozenge3()
- :
- radius((Real)1)
- {
- }
- Lozenge3(Rectangle<3, Real> const& inRectangle, Real inRadius)
- :
- rectangle(inRectangle),
- radius(inRadius)
- {
- }
-
- Rectangle<3, Real> rectangle;
- Real radius;
-
- bool operator==(Lozenge3 const& other) const
- {
- return rectangle == other.rectangle && radius == other.radius;
- }
- bool operator!=(Lozenge3 const& other) const
- {
- return !operator==(other);
- }
- bool operator< (Lozenge3 const& other) const
- {
- if (rectangle < other.rectangle)
- {
- return true;
- }
- if (rectangle > other.rectangle)
- {
- return false;
- }
- return radius < other.radius;
- }
- bool operator<=(Lozenge3 const& other) const
- {
- return !other.operator<(*this);
- }
- bool operator> (Lozenge3 const& other) const
- {
- return other.operator<(*this);
- }
- bool operator>=(Lozenge3 const& other) const
- {
- return !operator<(other);
- }
- };
- }
|