123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- #pragma once
- #include <Mathematics/Line.h>
- namespace WwiseGTE
- {
- template <typename Real>
- class Cylinder3
- {
- public:
-
-
- Cylinder3()
- :
- axis(Line3<Real>()),
- radius((Real)1),
- height((Real)1)
- {
- }
- Cylinder3(Line3<Real> const& inAxis, Real inRadius, Real inHeight)
- :
- axis(inAxis),
- radius(inRadius),
- height(inHeight)
- {
- }
- Line3<Real> axis;
- Real radius, height;
- public:
-
- bool operator==(Cylinder3 const& cylinder) const
- {
- return axis == cylinder.axis
- && radius == cylinder.radius
- && height == cylinder.height;
- }
- bool operator!=(Cylinder3 const& cylinder) const
- {
- return !operator==(cylinder);
- }
- bool operator< (Cylinder3 const& cylinder) const
- {
- if (axis < cylinder.axis)
- {
- return true;
- }
- if (axis > cylinder.axis)
- {
- return false;
- }
- if (radius < cylinder.radius)
- {
- return true;
- }
- if (radius > cylinder.radius)
- {
- return false;
- }
- return height < cylinder.height;
- }
- bool operator<=(Cylinder3 const& cylinder) const
- {
- return !cylinder.operator<(*this);
- }
- bool operator> (Cylinder3 const& cylinder) const
- {
- return cylinder.operator<(*this);
- }
- bool operator>=(Cylinder3 const& cylinder) const
- {
- return !operator<(cylinder);
- }
- };
- }
|