Isis Developer Reference
Isis::Area3D Class Reference

Represents a 3D area (a 3D "cube") More...

#include <Area3D.h>

Collaboration diagram for Isis::Area3D:
Collaboration graph

Public Member Functions

 Area3D ()
 The empty constructor creates an invalid 3D area.
 
 Area3D (const Displacement &startX, const Displacement &startY, const Displacement &startZ, const Distance &width, const Distance &height, const Distance &depth)
 Creates a 3D area based on the supplied dimensions.
 
 Area3D (const Displacement &startX, const Displacement &startY, const Displacement &startZ, const Displacement &endX, const Displacement &endY, const Displacement &endZ)
 Creates a 3D area based on the supplied start and end points.
 
 Area3D (const Area3D &areaToCopy)
 The copy constructor.
 
virtual ~Area3D ()
 The destructor frees allocated memory.
 
Displacement getStartX () const
 Returns the leftmost X position of the 3D area.
 
Displacement getStartY () const
 Returns the topmost Y position of the 3D area.
 
Displacement getStartZ () const
 Returns the frontmost Z position of the 3D area.
 
Distance getWidth () const
 Returns the width (in the X dimension) of the 3D area.
 
Distance getHeight () const
 Returns the height (in the Y dimension) of the 3D area.
 
Distance getDepth () const
 Returns the depth (in the Z dimension) of the 3D area.
 
Displacement getEndX () const
 Returns the rightmost X position of the 3D area.
 
Displacement getEndY () const
 Returns the bottommost Y position of the 3D area.
 
Displacement getEndZ () const
 Returns the backmost Z position of the 3D area.
 
void setStartX (const Displacement &startX)
 Sets the leftmost X position.
 
void setStartY (const Displacement &startY)
 Sets the topmost Y position.
 
void setStartZ (const Displacement &startZ)
 Sets the frontmost Z position.
 
void moveStartX (const Displacement &startX)
 Moves the leftmost X position of the 3D area.
 
void moveStartY (const Displacement &startY)
 Moves the topmost Y position of the 3D area.
 
void moveStartZ (const Displacement &startZ)
 Moves the frontmost Z position of the 3D area.
 
void setWidth (const Distance &width)
 Changes the width of the 3D area.
 
void setHeight (const Distance &height)
 Changes the height of the 3D area.
 
void setDepth (const Distance &depth)
 Changes the depth of the 3D area.
 
void setEndX (const Displacement &endX)
 Sets the rightmost X position.
 
void setEndY (const Displacement &endY)
 Sets the bottommost Y position.
 
void setEndZ (const Displacement &endZ)
 Sets the backmost Z position.
 
void moveEndX (const Displacement &endX)
 Moves the rightmost X position of the 3D area.
 
void moveEndY (const Displacement &endY)
 Moves the bottommost Y position of the 3D area.
 
void moveEndZ (const Displacement &endZ)
 Moves the backmost Z position of the 3D area.
 
void setXDimension (const Displacement &startX, const Distance &width)
 Sets the X dimension of the 3D area.
 
void setYDimension (const Displacement &startY, const Distance &height)
 Sets the Y dimension of the 3D area.
 
void setZDimension (const Displacement &startZ, const Distance &depth)
 Sets the Z dimension of the 3D area.
 
Area3D intersect (const Area3D &otherArea) const
 Returns the intersection of this 3D area with another 3D area.
 
bool isValid () const
 Returns true if all of the positions of the 3D area are valid (i.e.
 
bool operator== (const Area3D &otherArea) const
 Compares two areas with the == operator.
 
bool operator!= (const Area3D &otherArea) const
 Compares two areas with the != operator.
 
Area3Doperator= (const Area3D &areaToCopy)
 Assigns areaToCopy to this.
 

Protected Member Functions

virtual void setArea (const Displacement &startX, const Displacement &startY, const Displacement &startZ, const Displacement &endX, const Displacement &endY, const Displacement &endZ)
 Sets the area.
 

Detailed Description

Represents a 3D area (a 3D "cube")

This class is designed to encapsulate the concept of a 3D area (i.e. Cube but not a Cube file).

Author
2011-06-09 Jai Rideout and Steven Lambright

Constructor & Destructor Documentation

◆ Area3D() [1/4]

Isis::Area3D::Area3D ( )

The empty constructor creates an invalid 3D area.

Referenced by intersect().

◆ Area3D() [2/4]

Isis::Area3D::Area3D ( const Displacement & startX,
const Displacement & startY,
const Displacement & startZ,
const Distance & width,
const Distance & height,
const Distance & depth )

Creates a 3D area based on the supplied dimensions.

Parameters
startXthe leftmost X position
startYthe topmost Y position
startZthe frontmost Z position
widththe width of the X dimension
heightthe height of the Y dimension
depththe depth of the Z dimension

References setArea().

◆ Area3D() [3/4]

Isis::Area3D::Area3D ( const Displacement & startX,
const Displacement & startY,
const Displacement & startZ,
const Displacement & endX,
const Displacement & endY,
const Displacement & endZ )

Creates a 3D area based on the supplied start and end points.

Parameters
startXthe leftmost X position
startYthe topmost Y position
startZthe frontmost Z position
endXthe rightmost X position
endYthe bottommost Y position
endZthe backmost Z position

References setArea().

◆ Area3D() [4/4]

Isis::Area3D::Area3D ( const Area3D & areaToCopy)

The copy constructor.

Parameters
areaToCopythe 3D area to copy into this

◆ ~Area3D()

Isis::Area3D::~Area3D ( )
virtual

The destructor frees allocated memory.

Member Function Documentation

◆ getDepth()

Distance Isis::Area3D::getDepth ( ) const

Returns the depth (in the Z dimension) of the 3D area.

Returns
Displacement The depth (in the Z dimension) of the 3D area

References getEndZ(), getStartZ(), and Isis::Distance::Meters.

◆ getEndX()

Displacement Isis::Area3D::getEndX ( ) const

Returns the rightmost X position of the 3D area.

Returns
Displacement The rightmost X position of the 3D area

Referenced by getWidth(), intersect(), moveEndX(), moveEndY(), moveEndZ(), moveStartX(), moveStartY(), moveStartZ(), operator==(), setDepth(), setEndY(), setEndZ(), setHeight(), setStartX(), setStartY(), setStartZ(), setYDimension(), and setZDimension().

◆ getEndY()

Displacement Isis::Area3D::getEndY ( ) const

Returns the bottommost Y position of the 3D area.

Returns
Displacement The bottommost Y position of the 3D area

Referenced by getHeight(), intersect(), moveEndX(), moveEndY(), moveEndZ(), moveStartX(), moveStartY(), moveStartZ(), operator==(), setDepth(), setEndX(), setEndZ(), setStartX(), setStartY(), setStartZ(), setWidth(), setXDimension(), and setZDimension().

◆ getEndZ()

Displacement Isis::Area3D::getEndZ ( ) const

Returns the backmost Z position of the 3D area.

Returns
Displacement The backmost Z position of the 3D area

Referenced by getDepth(), intersect(), moveEndX(), moveEndY(), moveEndZ(), moveStartX(), moveStartY(), moveStartZ(), operator==(), setEndX(), setEndY(), setHeight(), setStartX(), setStartY(), setStartZ(), setWidth(), setXDimension(), and setYDimension().

◆ getHeight()

Distance Isis::Area3D::getHeight ( ) const

Returns the height (in the Y dimension) of the 3D area.

Returns
Displacement The height (in the Y dimension) of the 3D area

References getEndY(), getStartY(), and Isis::Distance::Meters.

◆ getStartX()

Displacement Isis::Area3D::getStartX ( ) const

Returns the leftmost X position of the 3D area.

Returns
Displacement The leftmost X position of the 3D area

Referenced by getWidth(), intersect(), moveEndX(), moveEndY(), moveEndZ(), moveStartX(), moveStartY(), moveStartZ(), operator==(), setDepth(), setEndX(), setEndY(), setEndZ(), setHeight(), setStartY(), setStartZ(), setWidth(), setYDimension(), and setZDimension().

◆ getStartY()

Displacement Isis::Area3D::getStartY ( ) const

Returns the topmost Y position of the 3D area.

Returns
Displacement The topmost Y position of the 3D area

Referenced by getHeight(), intersect(), moveEndX(), moveEndY(), moveEndZ(), moveStartX(), moveStartY(), moveStartZ(), operator==(), setDepth(), setEndX(), setEndY(), setEndZ(), setHeight(), setStartX(), setStartZ(), setWidth(), setXDimension(), and setZDimension().

◆ getStartZ()

Displacement Isis::Area3D::getStartZ ( ) const

Returns the frontmost Z position of the 3D area.

Returns
Displacement The frontmost Z position of the 3D area

Referenced by getDepth(), intersect(), moveEndX(), moveEndY(), moveEndZ(), moveStartX(), moveStartY(), moveStartZ(), operator==(), setDepth(), setEndX(), setEndY(), setEndZ(), setHeight(), setStartX(), setStartY(), setWidth(), setXDimension(), and setYDimension().

◆ getWidth()

Distance Isis::Area3D::getWidth ( ) const

Returns the width (in the X dimension) of the 3D area.

Returns
Displacement The width (in the X dimension) of the 3D area

References getEndX(), getStartX(), and Isis::Distance::Meters.

◆ intersect()

Area3D Isis::Area3D::intersect ( const Area3D & otherArea) const

Returns the intersection of this 3D area with another 3D area.

If there is no intersection, an invalid 3D area will be returned.

Parameters
otherAreathe area to intersect this 3D area with
Returns
the 3D area that is the intersection

References Area3D(), getEndX(), getEndY(), getEndZ(), getStartX(), getStartY(), getStartZ(), and isValid().

◆ isValid()

bool Isis::Area3D::isValid ( ) const

Returns true if all of the positions of the 3D area are valid (i.e.

they are non-NULL).

Returns
bool True if all of the positions of the 3D area are valid (i.e. they are non-NULL).

Referenced by intersect().

◆ moveEndX()

void Isis::Area3D::moveEndX ( const Displacement & endX)

Moves the rightmost X position of the 3D area.

This method will not change the width of the 3D area.

Parameters
endXthe new rightmost X position

References getEndX(), getEndY(), getEndZ(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ moveEndY()

void Isis::Area3D::moveEndY ( const Displacement & endY)

Moves the bottommost Y position of the 3D area.

This method will not change the height of the 3D area.

Parameters
endYthe new bottommost Y position

References getEndX(), getEndY(), getEndZ(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ moveEndZ()

void Isis::Area3D::moveEndZ ( const Displacement & endZ)

Moves the backmost Z position of the 3D area.

This method will not change the depth of the 3D area.

Parameters
endZthe new backmost Z position

References getEndX(), getEndY(), getEndZ(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ moveStartX()

void Isis::Area3D::moveStartX ( const Displacement & startX)

Moves the leftmost X position of the 3D area.

This method will not change the width of the 3D area.

Parameters
startXthe new leftmost X position

References getEndX(), getEndY(), getEndZ(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ moveStartY()

void Isis::Area3D::moveStartY ( const Displacement & startY)

Moves the topmost Y position of the 3D area.

This method will not change the height of the 3D area.

Parameters
startYthe new topmost Y position

References getEndX(), getEndY(), getEndZ(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ moveStartZ()

void Isis::Area3D::moveStartZ ( const Displacement & startZ)

Moves the frontmost Z position of the 3D area.

This method will not change the depth of the 3D area.

Parameters
startZthe new frontmost Z position

References getEndX(), getEndY(), getEndZ(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ operator!=()

bool Isis::Area3D::operator!= ( const Area3D & otherArea) const

Compares two areas with the != operator.

Two uninitialized areas are equal to each other.

Parameters
otherAreaThis is the area we're comparing to, i.e. on the right hand side of the operator when used
Returns
True if this area is not the same as the given area

◆ operator=()

Area3D & Isis::Area3D::operator= ( const Area3D & areaToCopy)

Assigns areaToCopy to this.

areaToCopy is the right hand side of the '='.

Parameters
areaToCopyThis is the area we're copying from
Returns
*this

◆ operator==()

bool Isis::Area3D::operator== ( const Area3D & otherArea) const

Compares two areas with the == operator.

Two uninitialized areas are equal to each other.

Parameters
otherAreaThis is the area we're comparing to, i.e. on the right hand side of the operator when used
Returns
True if this area is the same as the given area

References getEndX(), getEndY(), getEndZ(), getStartX(), getStartY(), and getStartZ().

◆ setArea()

void Isis::Area3D::setArea ( const Displacement & startX,
const Displacement & startY,
const Displacement & startZ,
const Displacement & endX,
const Displacement & endY,
const Displacement & endZ )
protectedvirtual

Sets the area.

This method may be overridden in child classes if more control is needed when setting 3D area members to reflect the new area. All other setter methods call this method to change members of this class.

This method throws an exception if inverted coordinates are given, and it makes this 3D area invalid if invalid coordinates are given.

Parameters
startXthe new leftmost X position
startYthe new topmost Y position
startZthe new frontmost Z position
endXthe new rightmost X position
endYthe new bottommost Y position
endZthe new backmost Z position

References _FILEINFO_, and Isis::IException::Programmer.

Referenced by Area3D(), Area3D(), moveEndX(), moveEndY(), moveEndZ(), moveStartX(), moveStartY(), moveStartZ(), setDepth(), setEndX(), setEndY(), setEndZ(), setHeight(), setStartX(), setStartY(), setStartZ(), setWidth(), setXDimension(), setYDimension(), and setZDimension().

◆ setDepth()

void Isis::Area3D::setDepth ( const Distance & depth)

Changes the depth of the 3D area.

Parameters
depththe new depth of the 3D area

References getEndX(), getEndY(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ setEndX()

void Isis::Area3D::setEndX ( const Displacement & endX)

Sets the rightmost X position.

This method may change the width of the 3D area.

Parameters
endXthe new rightmost X position

References getEndY(), getEndZ(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ setEndY()

void Isis::Area3D::setEndY ( const Displacement & endY)

Sets the bottommost Y position.

This method may change the height of the 3D area.

Parameters
endYthe new bottommost Y position

References getEndX(), getEndZ(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ setEndZ()

void Isis::Area3D::setEndZ ( const Displacement & endZ)

Sets the backmost Z position.

This method may change the depth of the 3D area.

Parameters
endZthe new backmost Z position

References getEndX(), getEndY(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ setHeight()

void Isis::Area3D::setHeight ( const Distance & height)

Changes the height of the 3D area.

Parameters
heightthe new height of the 3D area

References getEndX(), getEndZ(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ setStartX()

void Isis::Area3D::setStartX ( const Displacement & startX)

Sets the leftmost X position.

This method may change the width of the 3D area.

Parameters
startXthe new leftmost X position

References getEndX(), getEndY(), getEndZ(), getStartY(), getStartZ(), and setArea().

◆ setStartY()

void Isis::Area3D::setStartY ( const Displacement & startY)

Sets the topmost Y position.

This method may change the height of the 3D area.

Parameters
startYthe new topmost Y position

References getEndX(), getEndY(), getEndZ(), getStartX(), getStartZ(), and setArea().

◆ setStartZ()

void Isis::Area3D::setStartZ ( const Displacement & startZ)

Sets the frontmost Z position.

This method may change the depth of the 3D area.

Parameters
startZthe new frontmost Z position

References getEndX(), getEndY(), getEndZ(), getStartX(), getStartY(), and setArea().

◆ setWidth()

void Isis::Area3D::setWidth ( const Distance & width)

Changes the width of the 3D area.

Parameters
widththe new width of the 3D area

References getEndY(), getEndZ(), getStartX(), getStartY(), getStartZ(), and setArea().

◆ setXDimension()

void Isis::Area3D::setXDimension ( const Displacement & startX,
const Distance & width )

Sets the X dimension of the 3D area.

This method may change the X positions and the width of the 3D area.

Parameters
startXthe new leftmost X position
widththe new width of the 3D area

References getEndY(), getEndZ(), getStartY(), getStartZ(), and setArea().

◆ setYDimension()

void Isis::Area3D::setYDimension ( const Displacement & startY,
const Distance & height )

Sets the Y dimension of the 3D area.

This method may change the Y positions and the height of the 3D area.

Parameters
startYthe new topmost Y position
heightthe new height of the 3D area

References getEndX(), getEndZ(), getStartX(), getStartZ(), and setArea().

◆ setZDimension()

void Isis::Area3D::setZDimension ( const Displacement & startZ,
const Distance & depth )

Sets the Z dimension of the 3D area.

This method may change the Z positions and the depth of the 3D area.

Parameters
startZthe new frontmost Z position
depththe new depth of the 3D area

References getEndX(), getEndY(), getStartX(), getStartY(), and setArea().


The documentation for this class was generated from the following files: