61 startX + width, startY + height, startZ + depth);
80 setArea(startX, startY, startZ, endX, endY, endZ);
473 if (startX <= endX && startY <= endY && startZ <= endZ)
474 result =
Area3D(startX, startY, startZ, endX, endY, endZ);
532 return !(*
this == otherArea);
593 bool startXValid = startX.
isValid();
594 bool endXValid = endX.
isValid();
595 bool startYValid = startY.
isValid();
596 bool endYValid = endY.
isValid();
597 bool startZValid = startZ.
isValid();
598 bool endZValid = endZ.
isValid();
603 if(startXValid && startYValid && startZValid && endXValid && endYValid &&
604 endZValid && startX <= endX && startY <= endY && startZ <= endZ) {
613 if(startXValid && endXValid && startX > endX) {
614 QString msg = QObject::tr(
"Cannot have a 3D area with inverted X coordinates of "
615 "[%1 meters] to [%2 meters]")
620 if(startYValid && endYValid && startY > endY) {
621 QString msg = QObject::tr(
"Cannot have a 3D area with inverted Y coordinates of "
622 "[%1 meters] to [%2 meters]")
627 if(startZValid && endZValid && startZ > endZ) {
628 QString msg = QObject::tr(
"Cannot have a 3D area with inverted Z coordinates of "
629 "[%1 meters] to [%2 meters]")
bool isValid() const
Test if this displacement has been initialized or not.
void setStartX(const Displacement &startX)
Sets the leftmost X position.
Displacement getStartZ() const
Returns the frontmost Z position of the 3D area.
void moveEndX(const Displacement &endX)
Moves the rightmost X position of the 3D area.
Represents a 3D area (a 3D "cube")
double meters() const
Get the displacement in meters.
Displacement * m_endY
The bottommost Y position. Either NULL or a valid displacement.
Displacement * m_startX
The leftmost X position. Either NULL or a valid displacement.
virtual ~Area3D()
The destructor frees allocated memory.
void setDepth(const Distance &depth)
Changes the depth of the 3D area.
void moveStartY(const Displacement &startY)
Moves the topmost Y position of the 3D area.
void setHeight(const Distance &height)
Changes the height of the 3D area.
Distance getWidth() const
Returns the width (in the X dimension) of the 3D area.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
This error is for when a programmer made an API call that was illegal.
Distance measurement, usually in meters.
void moveStartX(const Displacement &startX)
Moves the leftmost X position of the 3D area.
Displacement getEndZ() const
Returns the backmost Z position of the 3D area.
Displacement getEndY() const
Returns the bottommost Y position of the 3D area.
void setYDimension(const Displacement &startY, const Distance &height)
Sets the Y dimension of the 3D area.
Displacement getEndX() const
Returns the rightmost X position of the 3D area.
void deleteTheData()
Frees all allocated memory used by this 3D area.
void setStartZ(const Displacement &startZ)
Sets the frontmost Z position.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Area3D intersect(const Area3D &otherArea) const
Returns the intersection of this 3D area with another 3D area.
void setStartY(const Displacement &startY)
Sets the topmost Y position.
#define _FILEINFO_
Macro for the filename and line number.
void setZDimension(const Displacement &startZ, const Distance &depth)
Sets the Z dimension of the 3D area.
void moveEndZ(const Displacement &endZ)
Moves the backmost Z position of the 3D area.
Displacement * m_startZ
The frontmost Z position. Either NULL or a valid displacement.
bool operator==(const Area3D &otherArea) const
Compares two areas with the == operator.
bool operator!=(const Area3D &otherArea) const
Compares two areas with the != operator.
Displacement getStartX() const
Returns the leftmost X position of the 3D area.
Displacement * m_endX
The rightmost X position. Either NULL or a valid displacement.
void setEndZ(const Displacement &endZ)
Sets the backmost Z position.
Distance getDepth() const
Returns the depth (in the Z dimension) of the 3D area.
Distance getHeight() const
Returns the height (in the Y dimension) of the 3D area.
bool isValid() const
Returns true if all of the positions of the 3D area are valid (i.e.
virtual void setArea(const Displacement &startX, const Displacement &startY, const Displacement &startZ, const Displacement &endX, const Displacement &endY, const Displacement &endZ)
Sets the area.
void moveStartZ(const Displacement &startZ)
Moves the frontmost Z position of the 3D area.
void setEndX(const Displacement &endX)
Sets the rightmost X position.
Displacement * m_endZ
The backmost Z position. Either NULL or a valid displacement.
void moveEndY(const Displacement &endY)
Moves the bottommost Y position of the 3D area.
Displacement * m_startY
The topmost Y position. Either NULL or a valid displacement.
Displacement is a signed length, usually in meters.
void setXDimension(const Displacement &startX, const Distance &width)
Sets the X dimension of the 3D area.
The distance is being specified in meters.
Displacement getStartY() const
Returns the topmost Y position of the 3D area.
void setEndY(const Displacement &endY)
Sets the bottommost Y position.
Area3D()
The empty constructor creates an invalid 3D area.
void nullTheData()
Nulls all of the members used by this 3D area.
void setWidth(const Distance &width)
Changes the width of the 3D area.
Area3D & operator=(const Area3D &areaToCopy)
Assigns areaToCopy to this.