HiRISE
 PDS_JP2

Public Member Functions | Public Attributes | List of all members
Size_2D Struct Reference

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

#include <Dimensions.hh>

Inheritance diagram for Size_2D:
Inheritance graph
[legend]

Public Member Functions

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

Public Attributes

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

Detailed Description

A Size_2D holds 2-dimensional size information.

Author
Bradford Castalia, UA/PIRL
Version
1.7

Constructor & Destructor Documentation

◆ Size_2D() [1/4]

Size_2D ( )

Constructs an empty 2D size.

Both width and height are zero.

Referenced by Rectangle::size().

◆ Size_2D() [2/4]

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() [3/4]

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() [4/4]

Size_2D ( const Size_2D size)

Constructs a size from another size.

Parameters
sizeA Size_2D to be copied.

Member Function Documentation

◆ operator=()

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.

References Size_2D::Width.

◆ width() [1/2]

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(), and Size_2D::width().

◆ width() [2/2]

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

◆ height() [1/2]

unsigned int height ( ) const
inline

Get the height of the size.

Returns
The height of the size.

References Size_2D::Height.

Referenced by Size_2D::height(), and Rectangle::size().

◆ height() [2/2]

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

◆ area()

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

◆ Width

unsigned int Width

◆ Height

unsigned int Height

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