HiRISE
 PDS_JP2

Size_2D Struct Reference

A Size_2D holds 2-dimensional size information. More...

#include <Dimensions.hh>

Inheritance diagram for Size_2D:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 Size_2D ()
 Constructs an empty 2D size.
 Size_2D (const unsigned int &width, const unsigned int &height)
 Constructs a specific size.
 Size_2D (const unsigned int &side)
 Constructs a size of equal width and height.
 Size_2D (const Size_2D &size)
 Constructs a size from another size.
Size_2Doperator= (const Size_2D &size)
 Assign the size of another size to this size.
unsigned int width () const
 Get the width of the size.
Size_2Dwidth (const unsigned int &width)
 Set the width of the size.
unsigned int height () const
 Get the height of the size.
Size_2Dheight (const unsigned int &height)
 Set the height of the size.
unsigned long area () const
 Get the area of this size.

Public Attributes

unsigned int Width
 The width of the 2D size.
unsigned int Height
 The height of the 2D size.


Detailed Description

A Size_2D holds 2-dimensional size information.

Author:
Bradford Castalia, UA/PIRL
Version:
1.5

Constructor & Destructor Documentation

Size_2D (  ) 

Constructs an empty 2D size.

Both width and height are zero.

Size_2D ( const unsigned int &  width,
const unsigned int &  height 
)

Constructs a specific size.

Parameters:
width The width of the size.
height The height of the size.

Size_2D ( const unsigned int &  side  ) 

Constructs a size of equal width and height.

Parameters:
side The length of each side. Both width and height will be set to this value.

Size_2D ( const Size_2D size  ) 

Constructs a size from another size.

Parameters:
size A Size_2D to be copied.


Member Function Documentation

Size_2D & operator= ( const Size_2D size  ) 

Assign the size of another size to this size.

Parameters:
size A Size_2D to have its values assigned to this size.

unsigned int width (  )  const [inline]

Get the width of the size.

Returns:
The width of the size.

Size_2D& width ( const unsigned int &  width  )  [inline]

Set the width of the size.

Parameters:
width The width of the size.
Returns:
This Size_2D.

unsigned int height (  )  const [inline]

Get the height of the size.

Returns:
The height of the size.

Size_2D& height ( const unsigned int &  height  )  [inline]

Set the height of the size.

Parameters:
height The height of the size.
Returns:
This Size_2D.

unsigned long area (  )  const [inline]

Get the area of this size.

Returns:
The area (width * height) of the size.


Member Data Documentation

unsigned int Width

The width of the 2D size.

unsigned int Height

The height of the 2D size.


The documentation for this struct was generated from the following files:
Generated on Wed Sep 30 23:48:23 2009 for UA::HiRISE::PDS_JP2 by  doxygen 1.5.3