|
Isis Developer Reference
|
Go to the documentation of this file.
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);
131 return m_displacementInMeters ==
132 otherDisplacement.m_displacementInMeters;
157 double m_displacementInMeters;
bool operator==(const Displacement &otherDisplacement) const
Compare the lengths of 2 displacements with the == operator.
Definition: Displacement.h:130
bool operator>=(const Displacement &otherDisplacement) const
Compare the distances of 2 displacements with the >= operator.
Definition: Displacement.h:89
@ Meters
The distance is being specified in meters.
Definition: Displacement.h:40
void operator/=(const double &valueToDiv)
Divide this displacement by a value and assign the result to ourself.
Definition: Displacement.cpp:329
Displacement operator*(const double &valueToMult) const
Multiply this displacement by a value (5m * 2 = 10m).
Definition: Displacement.cpp:264
Angle operator*(double mult, Angle angle)
Multiply this angle by a double and return the resulting angle.
Definition: Angle.cpp:170
~Displacement()
Free the memory allocated by this instance of the displacement class.
Definition: Displacement.h:55
bool operator!=(const Displacement &otherDisplacement) const
Compare the lengths of 2 displacements with the != operator.
Definition: Displacement.h:116
Units
This is a list of available units to access and store Distances in.
Definition: Displacement.h:38
bool operator<(const Displacement &otherDisplacement) const
Compare two displacements with the less than operator.
Definition: Displacement.cpp:173
void setDisplacement(const double &displacement, Units displacementUnit)
This is a helper method to set displacements in a universal manner with uniform error checking.
Definition: Displacement.cpp:400
void setKilometers(double displacementInKilometers)
Set the displacement in kilometers.
Definition: Displacement.cpp:105
Displacement operator-(const Displacement &displacementToSub) const
Subtract another displacement from this displacement (1km - 5m = 995m).
Definition: Displacement.cpp:206
@ Pixels
The distance is being specified in pixels.
Definition: Displacement.h:44
void operator-=(const Displacement &displacementToSub)
Subtract the given displacement from ourself and assign.
Definition: Displacement.cpp:303
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
Distance measurement, usually in meters.
Definition: Distance.h:34
Displacement is a signed length, usually in meters.
Definition: Displacement.h:31
double operator/(const Displacement &displacementToDiv) const
Divide another displacement into this displacement (5m / 1m = 5).
Definition: Displacement.cpp:236
double meters() const
Get the displacement in meters.
Definition: Displacement.cpp:73
void setMeters(double displacementInMeters)
Set the displacement in meters.
Definition: Displacement.cpp:84
void operator+=(const Displacement &displacementToAdd)
Add and assign the given displacement to ourselves.
Definition: Displacement.cpp:290
Displacement()
This initializes the displacement to an invalid state.
Definition: Displacement.cpp:20
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
bool isValid() const
Test if this distance has been initialized or not.
Definition: Distance.cpp:192
double pixels(double pixelsPerMeter=1.0) const
Get the displacement in pixels using the given conversion ratio.
Definition: Displacement.cpp:117
Isis exception class.
Definition: IException.h:91
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
void setPixels(double distanceInPixels, double pixelsPerMeter=1.0)
Set the displacement in pixels.
Definition: Displacement.cpp:130
double kilometers() const
Get the displacement in kilometers.
Definition: Displacement.cpp:94
double displacement(Units displacementUnit) const
This is a helper method to access displacements in a universal manner with uniform error checking.
Definition: Displacement.cpp:358
Displacement operator+(const Displacement &displacementToAdd) const
Add another displacement to this displacement (1km + 5m = 1005m)
Definition: Displacement.cpp:191
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
bool isValid() const
Test if this displacement has been initialized or not.
Definition: Displacement.cpp:141
double meters() const
Get the distance in meters.
Definition: Distance.cpp:85
bool operator<=(const Displacement &otherDisplacement) const
Compare the lengths of 2 displacements with the <= operator.
Definition: Displacement.h:102
void operator*=(const double &valueToMult)
Multiply this displacement by a value and assign the result to ourself.
Definition: Displacement.cpp:342
bool operator>(const Displacement &otherDisplacement) const
Get the displacement in meters.
Definition: Displacement.cpp:154
Adds specific functionality to C++ strings.
Definition: IString.h:165
@ Kilometers
The distance is being specified in kilometers.
Definition: Displacement.h:42
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16