HiRISE
 PDS_JP2

Public Member Functions | Public Attributes

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.7

Constructor & Destructor Documentation

Size_2D (  )

Constructs an empty 2D size.

Both width and height are zero.

Referenced by Rectangle::size().

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

Constructs a specific size.

Parameters:
widthThe width of the size.
heightThe height of the size.
Size_2D ( const unsigned int &  side )

Constructs a size of equal width and height.

Parameters:
sideThe 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:
sizeA 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:
sizeA 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.

References Size_2D::Width.

Referenced by Rectangle::size().

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

Set the width of the size.

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

References Size_2D::width(), and Size_2D::Width.

Referenced by Size_2D::width().

unsigned int height (  ) const [inline]

Get the height of the size.

Returns:
The height of the size.

References Size_2D::Height.

Referenced by Rectangle::size().

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

Set the height of the size.

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

References Size_2D::height(), and Size_2D::Height.

Referenced by Size_2D::height().

unsigned long area (  ) const [inline]

Get the area of this size.

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

References Size_2D::Height, and Size_2D::Width.

Referenced by JP2_Decoder::set_resolution_and_region().


Member Data Documentation

unsigned int Width
unsigned int Height

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