An open source method of characteristics neutron transport code.
Point Class Reference

Class to represent a 2D/3D point in space. More...

#include "src/Point.h"

Public Member Functions

 Point ()
 Constructor initializes an empty Point.
 
virtual ~Point ()
 Destructor.
 
void setCoords (const double x, const double y, const double z=0.0)
 Initializes a Point with two-dimensional coordinates. More...
 
double getX () const
 Returns this Point's x-coordinate. More...
 
double getY () const
 Returns this Point's y-coordinate. More...
 
double getZ () const
 Returns this Point's z-coordinate. More...
 
double * getXYZ ()
 Returns this Point's coordinates. More...
 
void setX (const double x)
 Set the Point's x-coordinate. More...
 
void setY (const double y)
 Set the Point's y-coordinate. More...
 
void setZ (const double z)
 Set the Point's z-coordinate. More...
 
double distance (const double x, const double y, const double z) const
 Compute the distance from this Point to another Point of interest. More...
 
double distanceToPoint (const Point *point)
 Compute the distance from this Point to another Point of interest. More...
 
void copyCoords (Point *point)
 Copy the coordinates from another point. More...
 
std::string toString ()
 Converts this Point to a character representation of its attributes. More...
 
void setXYZ (double *xyz)
 Set the Point's x, y and z-coordinates. More...
 

Detailed Description

Class to represent a 2D/3D point in space.

Member Function Documentation

◆ copyCoords()

void Point::copyCoords ( Point point)
inline

Copy the coordinates from another point.

Parameters
pointa pointer to the Point that has the coordinates of interest

◆ distance()

double Point::distance ( const double  x,
const double  y,
const double  z 
) const
inline

Compute the distance from this Point to another Point of interest.

Parameters
xthe x-coordinate of the Point of interest
ythe y-coordinate of the Point of interest
zthe z-coordinate of the Point of interest
Returns
distance to the Point of interest

◆ distanceToPoint()

double Point::distanceToPoint ( const Point point)
inline

Compute the distance from this Point to another Point of interest.

Parameters
pointa pointer to the Point of interest
Returns
distance to the Point of interest

◆ getX()

double Point::getX ( ) const
inline

Returns this Point's x-coordinate.

Returns
the x-coordinate

◆ getXYZ()

double * Point::getXYZ ( )
inline

Returns this Point's coordinates.

Returns
the xyz coordinates

◆ getY()

double Point::getY ( ) const
inline

Returns this Point's y-coordinate.

Returns
the y-coordinate

◆ getZ()

double Point::getZ ( ) const
inline

Returns this Point's z-coordinate.

Returns
the z-coordinate

◆ setCoords()

void Point::setCoords ( const double  x,
const double  y,
const double  z = 0.0 
)
inline

Initializes a Point with two-dimensional coordinates.

Parameters
xx-coordinate
yy-coordinate
zz-coordinate

◆ setX()

void Point::setX ( const double  x)
inline

Set the Point's x-coordinate.

Parameters
xthe new x-coordinate

◆ setXYZ()

void Point::setXYZ ( double *  xyz)
inline

Set the Point's x, y and z-coordinates.

Parameters
xyzarray with the three coordinates

◆ setY()

void Point::setY ( const double  y)
inline

Set the Point's y-coordinate.

Parameters
ythe new y-coordinate

◆ setZ()

void Point::setZ ( const double  z)
inline

Set the Point's z-coordinate.

Parameters
zthe new z-coordinate

◆ toString()

std::string Point::toString ( )

Converts this Point to a character representation of its attributes.

The character array includes the x-coordinate, y-coordinate, and z-coordinate

Returns
a character array of this Point's attributes

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