7#ifndef __HDI_CORE_ANGLE__
8#define __HDI_CORE_ANGLE__
54 Angle(
const double value_,
const Units units_ = Radians);
502 virtual double sin(
const double tol_ = 10000.0 * maxDoublePrecision)
const;
517 virtual double cos(
const double tol_ = 10000.0 * maxDoublePrecision)
const;
532 virtual double tan(
const double tol_ = 10000.0 * maxDoublePrecision)
const;
548 static Angle asin(
const double val_,
const double tol_ = 10000.0 * maxDoublePrecision);
564 static Angle acos(
const double val_,
const double tol_ = 10000.0 * maxDoublePrecision);
580 static Angle atan(
const double val_,
const double tol_ = 10000.0 * maxDoublePrecision);
611 friend geo::Angle* __accessImpl(
const Angle&);
612 friend Angle __accessCtor(
const geo::Angle&);
624 Angle(
const geo::Angle&);
627 typedef std::unique_ptr<Angle> AngleUP;
628 typedef std::shared_ptr<Angle> AngleSP;
629 typedef std::weak_ptr<Angle> AngleWP;
631 extern geo::Angle* __accessImpl(
const Angle&);
632 extern Angle __accessCtor(
const geo::Angle&);
Describes an angle, and allows for easy conversion between various units.
Definition: hdicoreAngle.h:26
virtual double tan(const double tol_=10000.0 *maxDoublePrecision) const
"Safely" computes the tangent of an angle
virtual Angle operator/(const Angle &rhs_) const
Allows one Angle object to be divided by another with the / operator.
static Angle TwoPi()
Convenience method to construct an Angle object for 2*pi radians.
virtual void setValueInUnits(const double value_, const Units units_=Radians)
Sets the value of the target object in the given units.
virtual Angle operator+(const Angle &rhs_) const
Allows two Angle objects to be added together with the + operator.
virtual double sin(const double tol_=10000.0 *maxDoublePrecision) const
"Safely" computes the sine of an angle
static Angle acos(const double val_, const double tol_=10000.0 *maxDoublePrecision)
"Safely" computes the angle for a given cosine value
virtual Angle & operator*=(const double rhs_)
Allows an Angle object to be multipled by a constant, assigning the lefthand object.
virtual Angle operator-(const Angle &rhs_) const
Allows one Angle object to be substracted from another with the - operator.
virtual Angle constrainPiTo2Pi() const
Constrains the target Angle object's value to the range [pi,2pi].
static Angle atan(const double val_, const double tol_=10000.0 *maxDoublePrecision)
"Safely" computes the angle for a given tangent value
virtual ~Angle()
Angle destructor.
virtual bool operator>(const Angle &rhs_) const
Checks if the target angle's value is greater than the provided angle's.
virtual double asTurns() const
Gets the value of the target object in turns.
virtual Angle operator*(const double rhs_) const
Allows an Angle object to be multipled by a constant.
Units
Units supported for angle calculations.
Definition: hdicoreAngle.h:32
virtual Angle bisect(const Angle &angle2_) const
Gets the bisection of the target Angle with a provided Angle on their most acute "side".
Angle(const Angle &angle_)
Angle copy constructor.
virtual bool operator<=(const Angle &rhs_) const
Checks if the target angle's value is less than or equal to the provided angle's.
virtual Angle constrainNegPiOver2ToPiOver2() const
Constrains the target Angle object's value to the range [-pi/2,pi/2].
Angle(const double value_, const Units units_=Radians)
Angle constructor; sets the angle to the provided value.
virtual Angle constrain0ToPi() const
Constrains the target Angle object's value to the range [0,pi].
virtual Angle range0To2Pi() const
Changes the range of the angle value to be in [0,2pi].
virtual bool firstQuadrant() const
Tests if the target Angle lies in the first quadrant, were it from point (0,0)
virtual Angle & operator*=(const Angle &rhs_)
Allows two Angle objects to be multipled together with the * operator, assigning the lefthand object.
virtual Angle operator/(const double rhs_) const
Allows an Angle object to be divided by a constant.
virtual Angle & operator/=(const Angle &rhs_)
Allows one Angle object to be divided by another with the / operator, assigning the lefthand object.
virtual bool operator>=(const Angle &rhs_) const
Checks if the target angle's value is greater than or equal to the provided angle's.
static Angle asin(const double val_, const double tol_=10000.0 *maxDoublePrecision)
"Safely" computes the angle for a given sine value
virtual bool operator!=(const Angle &rhs_) const
Compares two angles for inequality.
virtual bool thirdQuadrant() const
Tests if the target Angle lies in the third quadrant, were it from point (0,0)
virtual Angle & operator=(const Angle &rhs_)
Allows one Angle object to be assigned from another.
virtual Angle nearest45() const
Constrains an angle to the nearest 45-degree (pi/4) interval.
Angle()
Default Angle constructor; sets the angle to 0.0 radians.
virtual Angle & operator/=(const double rhs_)
Allows an Angle object to be divided by a constant, assigning the lefthand object.
virtual int16_t quadrantNumber() const
Gets the quadrant number for the target Angle, were it from point (0,0)
virtual Angle delta(const Angle &angle2_) const
Gets the delta between the target Angle and a provided Angle object.
virtual Angle & operator+=(const Angle &rhs_)
Allows two Angle objects to be added together with the + operator, assigning the lefthand object.
virtual Angle operator-() const
Flips the sign of the target angle.
virtual bool equalWithinTol(const Angle &compare_, const Angle &tol_) const
Checks for two angles being within a given tolerance of one another.
virtual Angle constrainPiOver2To3PiOver2() const
Constrains the target Angle object's value to the range [pi/2,3pi/2].
virtual Angle & operator-=(const Angle &rhs_)
Allows one Angle object to be substracted from another with the - operator, assigning the lefthand ob...
virtual double valueInUnits(const Units units_=Radians) const
Gets the value of the target object in the given units.
static Angle Pi()
Convenience method to construct an Angle object for pi radians.
virtual Angle rangeNegPiToPi() const
Changes the range of the angle value to be in [-pi,pi].
virtual double asRadians() const
Gets the value of the target object in radians.
virtual double asDegrees() const
Gets the value of the target object in degrees.
virtual double cos(const double tol_=10000.0 *maxDoublePrecision) const
"Safely" computes the cosine of an angle
static Angle Zero()
Convenience method to construct an Angle object for zero radians, degrees, etc.
virtual Angle operator*(const Angle &rhs_) const
Allows two Angle objects to be multipled together with the * operator.
virtual double asGradians() const
Gets the value of the target object in gradians.
virtual bool operator<(const Angle &rhs_) const
Checks if the target angle's value is less than the provided angle's.
virtual bool operator==(const Angle &rhs_) const
Compares two angles for equality.
virtual bool fourthQuadrant() const
Tests if the target Angle lies in the fourth quadrant, were it from point (0,0)
virtual bool secondQuadrant() const
Tests if the target Angle lies in the second quadrant, were it from point (0,0)
hdi::core::Angle operator*(const double lhs_, const hdi::core::Angle &rhs_)
Allows a constant to be multipled by an Angle object.
Header file for defining various plugin constants.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.