123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- #pragma once
- #include <Mathematics/Vector3.h>
- namespace WwiseGTE
- {
- template <typename Real>
- class Circle3
- {
- public:
-
-
- Circle3()
- :
- center(Vector3<Real>::Zero()),
- normal(Vector3<Real>::Unit(2)),
- radius((Real)1)
- {
- }
- Circle3(Vector3<Real> const& inCenter, Vector3<Real> const& inNormal, Real inRadius)
- :
- center(inCenter),
- normal(inNormal),
- radius(inRadius)
- {
- }
-
- Vector3<Real> center, normal;
- Real radius;
- public:
-
- bool operator==(Circle3 const& circle) const
- {
- return center == circle.center
- && normal == circle.normal
- && radius == circle.radius;
- }
- bool operator!=(Circle3 const& circle) const
- {
- return !operator==(circle);
- }
- bool operator< (Circle3 const& circle) const
- {
- if (center < circle.center)
- {
- return true;
- }
- if (center > circle.center)
- {
- return false;
- }
- if (normal < circle.normal)
- {
- return true;
- }
- if (normal > circle.normal)
- {
- return false;
- }
- return radius < circle.radius;
- }
- bool operator<=(Circle3 const& circle) const
- {
- return !circle.operator<(*this);
- }
- bool operator> (Circle3 const& circle) const
- {
- return circle.operator<(*this);
- }
- bool operator>=(Circle3 const& circle) const
- {
- return !operator<(circle);
- }
- };
- }
|