All Classes Namespaces Files Functions Variables Typedefs Friends Macros Modules
Public Member Functions | Public Attributes | Friends | List of all members
sdf::Vector2d Class Reference

Generic double x, y vector. More...

#include <Types.hh>

Public Member Functions

 Vector2d (double _x=0.0, double _y=0.0)
 Constructor. More...
 
bool operator== (const Vector2d &_pt) const
 Equal to operator. More...
 

Public Attributes

double x
 x data More...
 
double y
 y data More...
 

Friends

std::ostream & operator<< (std::ostream &_out, const Vector2d &_pt)
 Stream extraction operator. More...
 
std::istream & operator>> (std::istream &_in, Vector2d &_pt)
 Stream extraction operator. More...
 

Detailed Description

Generic double x, y vector.

Constructor & Destructor Documentation

sdf::Vector2d::Vector2d ( double  _x = 0.0,
double  _y = 0.0 
)
inline

Constructor.

Parameters
[in]_xvalue along x
[in]_yvalue along y

Member Function Documentation

bool sdf::Vector2d::operator== ( const Vector2d _pt) const
inline

Equal to operator.

Parameters
[in]_vthe vector to compare to
Returns
true if the elements of the 2 vectors are equal within a tolerence (1e-6)

References sdf::equal(), x, and y.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  _out,
const Vector2d _pt 
)
friend

Stream extraction operator.

Parameters
[in]_outoutput stream
[in]_ptVector2d to output
Returns
The stream
std::istream& operator>> ( std::istream &  _in,
Vector2d _pt 
)
friend

Stream extraction operator.

Parameters
[in]_ininput stream
[in]_ptVector2d to read values into
Returns
The stream

Member Data Documentation

double sdf::Vector2d::x

x data

Referenced by operator==().

double sdf::Vector2d::y

y data

Referenced by operator==().


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