|
Isis 3 Programmer Reference
|
49 Displacement(
double displacementInPixels,
double pixelsPerMeter);
58 void setMeters(
double displacementInMeters);
63 double pixels(
double pixelsPerMeter = 1.0)
const;
64 void setPixels(
double distanceInPixels,
double pixelsPerMeter = 1.0);
90 return *
this > otherDisplacement || *
this == otherDisplacement;
103 return *
this < otherDisplacement || *
this == otherDisplacement;
117 return !(*
this == otherDisplacement);
bool operator==(const Displacement &otherDisplacement) const
Compare the lengths of 2 displacements with the == operator.
bool operator>=(const Displacement &otherDisplacement) const
Compare the distances of 2 displacements with the >= operator.
double m_displacementInMeters
This is the displacement value that this class is encapsulating, always stored in meters.
@ Meters
The distance is being specified in meters.
void operator/=(const double &valueToDiv)
Divide this displacement by a value and assign the result to ourself.
Displacement operator*(const double &valueToMult) const
Multiply this displacement by a value (5m * 2 = 10m).
~Displacement()
Free the memory allocated by this instance of the displacement class.
bool operator!=(const Displacement &otherDisplacement) const
Compare the lengths of 2 displacements with the != operator.
Units
This is a list of available units to access and store Distances in.
bool operator<(const Displacement &otherDisplacement) const
Compare two displacements with the less than operator.
void setDisplacement(const double &displacement, Units displacementUnit)
This is a helper method to set displacements in a universal manner with uniform error checking.
void setKilometers(double displacementInKilometers)
Set the displacement in kilometers.
Displacement operator-(const Displacement &displacementToSub) const
Subtract another displacement from this displacement (1km - 5m = 995m).
@ Pixels
The distance is being specified in pixels.
void operator-=(const Displacement &displacementToSub)
Subtract the given displacement from ourself and assign.
Distance measurement, usually in meters.
Displacement is a signed length, usually in meters.
double operator/(const Displacement &displacementToDiv) const
Divide another displacement into this displacement (5m / 1m = 5).
double meters() const
Get the displacement in meters.
void setMeters(double displacementInMeters)
Set the displacement in meters.
void operator+=(const Displacement &displacementToAdd)
Add and assign the given displacement to ourselves.
Displacement()
This initializes the displacement to an invalid state.
double pixels(double pixelsPerMeter=1.0) const
Get the displacement in pixels using the given conversion ratio.
void setPixels(double distanceInPixels, double pixelsPerMeter=1.0)
Set the displacement in pixels.
double kilometers() const
Get the displacement in kilometers.
double displacement(Units displacementUnit) const
This is a helper method to access displacements in a universal manner with uniform error checking.
Displacement operator+(const Displacement &displacementToAdd) const
Add another displacement to this displacement (1km + 5m = 1005m)
bool isValid() const
Test if this displacement has been initialized or not.
bool operator<=(const Displacement &otherDisplacement) const
Compare the lengths of 2 displacements with the <= operator.
void operator*=(const double &valueToMult)
Multiply this displacement by a value and assign the result to ourself.
bool operator>(const Displacement &otherDisplacement) const
Get the displacement in meters.
@ Kilometers
The distance is being specified in kilometers.
This is free and unencumbered software released into the public domain.