HiRISE
 PDS_JP2

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

A Point_2D holds 2-dimensional position information. More...

#include <Dimensions.hh>

Inheritance diagram for Point_2D:
Inheritance graph
[legend]

Public Member Functions

 Point_2D ()
 Constructs a point at position 0,0. More...
 
 Point_2D (const int &x, const int &y)
 Constructs a point at position x,y. More...
 
 Point_2D (const Point_2D &point)
 Constructs a point from another point. More...
 
Point_2Doperator= (const Point_2D &point)
 Assign the position of another point to this point. More...
 
int x () const
 Get the horizontal (x-axis) position. More...
 
Point_2Dx (const int &x_position)
 Set the horizontal (x-axis) position. More...
 
int y () const
 Get the vertical (y-axis) position. More...
 
Point_2Dy (const int &y_position)
 Set the vertical (y-axis) position. More...
 

Public Attributes

int X
 The horizontal (x-axis) position of the point. More...
 
int Y
 The vertical (y-axis) position of the point. More...
 

Detailed Description

A Point_2D holds 2-dimensional position information.

Author
Bradford Castalia, UA/PIRL
Version
1.7

Constructor & Destructor Documentation

◆ Point_2D() [1/3]

Point_2D ( )

Constructs a point at position 0,0.

Referenced by Rectangle::position().

◆ Point_2D() [2/3]

Point_2D ( const int &  x,
const int &  y 
)

Constructs a point at position x,y.

◆ Point_2D() [3/3]

Point_2D ( const Point_2D point)

Constructs a point from another point.

Parameters
pointA Point_2D to be copied.

Member Function Documentation

◆ operator=()

Point_2D & operator= ( const Point_2D point)

Assign the position of another point to this point.

Parameters
pointA Point_2D whose values are to be assigned to this point.

References Point_2D::X.

◆ x() [1/2]

int x ( ) const
inline

Get the horizontal (x-axis) position.

Returns
The horizontal (x-axis) position of the point.

References Point_2D::X.

Referenced by Rectangle::position().

◆ x() [2/2]

Point_2D& x ( const int &  x_position)
inline

Set the horizontal (x-axis) position.

Parameters
x_positionThe horizontal (x-axis) position of the point.
Returns
This Point_2D.

References Point_2D::X.

◆ y() [1/2]

int y ( ) const
inline

Get the vertical (y-axis) position.

Returns
The vertical (y-axis) position of the point.

References Point_2D::Y.

Referenced by Rectangle::position().

◆ y() [2/2]

Point_2D& y ( const int &  y_position)
inline

Set the vertical (y-axis) position.

Parameters
y_positionThe vertical (y-axis) position of the point.
Returns
This Point_2D.

References Point_2D::Y.

Member Data Documentation

◆ X

int X

◆ Y

int Y

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