|
Isis Developer Reference
|
Go to the documentation of this file.
64 Distance(
double distanceInPixels,
double pixelsPerMeter);
74 double pixels(
double pixelsPerMeter = 1.0)
const;
75 void setPixels(
double distanceInPixels,
double pixelsPerMeter = 1.0);
95 return *
this > otherDistance || *
this == otherDistance;
108 return *
this < otherDistance || *
this == otherDistance;
159 double m_distanceInMeters;
double kilometers() const
Get the distance in kilometers.
Definition: Distance.cpp:106
void setPixels(double distanceInPixels, double pixelsPerMeter=1.0)
Set the distance in pixels.
Definition: Distance.cpp:145
bool operator>(const Distance &otherDistance) const
Compare two distances with the greater than operator.
Definition: Distance.cpp:204
@ Meters
The distance is being specified in meters.
Definition: Displacement.h:40
@ Pixels
The distance is being specified in pixels.
Definition: Distance.h:47
bool operator<(const Distance &otherDistance) const
Compare two distances with the less than operator.
Definition: Distance.cpp:222
Angle operator*(double mult, Angle angle)
Multiply this angle by a double and return the resulting angle.
Definition: Angle.cpp:170
Distance & operator=(const Distance &distanceToCopy)
Assign this distance to the value of another distance.
Definition: Distance.cpp:239
bool operator>=(const Distance &otherDistance) const
Compare two distances with the greater than or equal to operator.
Definition: Distance.h:94
void setKilometers(double distanceInKilometers)
Set the distance in kilometers.
Definition: Distance.cpp:118
double solarRadii() const
Get the distance in solar radii (a unit of ~696,265km).
Definition: Distance.cpp:155
Units
This is a list of available units to access and store Distances in.
Definition: Distance.h:41
@ SolarRadii
"Solar radius is a unit of distance used to express the size of stars in astronomy equal to the curre...
Definition: Distance.h:59
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
void setMeters(double distanceInMeters)
Set the distance in meters.
Definition: Distance.cpp:96
Distance measurement, usually in meters.
Definition: Distance.h:34
@ Kilometers
The distance is being specified in kilometers.
Definition: Distance.h:45
Displacement is a signed length, usually in meters.
Definition: Displacement.h:31
bool operator!=(const Distance &otherDistance) const
Compare two distances with the != operator.
Definition: Distance.h:133
void setSolarRadii(double distanceInSolarRadii)
Set the distance in solar radii.
Definition: Distance.cpp:167
@ Meters
The distance is being specified in meters.
Definition: Distance.h:43
virtual ~Distance()
This will free the memory allocated by this instance of the Distance class.
Definition: Distance.cpp:73
QString toString() const
Get a textual representation of this distance.
Definition: Distance.cpp:177
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
bool operator<=(const Distance &otherDistance) const
Compare two distances with the less than or equal to operator.
Definition: Distance.h:107
bool isValid() const
Test if this distance has been initialized or not.
Definition: Distance.cpp:192
Displacement operator-(const Distance &distanceToSub) const
Subtract another distance from this distance (1km - 1m = 995m).
Definition: Distance.cpp:268
virtual double distance(Units distanceUnit) const
This is a helper method to access distances in a universal manner with uniform error checking.
Definition: Distance.cpp:405
Isis exception class.
Definition: IException.h:91
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Distance()
This initializes the distance to an invalid state.
Definition: Distance.cpp:21
void operator/=(const double &valueToDiv)
Divide this distance by a value and assign the result to ourself.
Definition: Distance.cpp:372
virtual void setDistance(const double &distance, Units distanceUnit)
This is a helper method to set distances in a universal manner with uniform error checking.
Definition: Distance.cpp:452
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
void operator+=(const Distance &distanceToAdd)
Add and assign the given distance to ourselves.
Definition: Distance.cpp:340
void operator*=(const double &valueToMult)
Multiply this distance by a value and assign the result to ourself.
Definition: Distance.cpp:387
void operator-=(const Distance &distanceToSub)
Subtract and assign the given distance from ourself.
Definition: Distance.cpp:357
double meters() const
Get the distance in meters.
Definition: Distance.cpp:85
Distance operator+(const Distance &distanceToAdd) const
Add another distance to this distance (1km + 1m = 1005m)
Definition: Distance.cpp:254
Adds specific functionality to C++ strings.
Definition: IString.h:165
Distance operator*(const double &valueToMult) const
Multiply this distance by a value (5m * 2 = 10m).
Definition: Distance.cpp:313
double pixels(double pixelsPerMeter=1.0) const
Get the distance in pixels using the given conversion ratio.
Definition: Distance.cpp:131
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
double operator/(const Distance &distanceToDiv) const
Divide another distance into this distance (5m / 1m = 5).
Definition: Distance.cpp:284
bool operator==(const Distance &otherDistance) const
Compare two distances with the == operator.
Definition: Distance.h:120