DelaunayTriangulation
A C++ Object Oriented data structure with algorithms that could be used to generate a Delaunay triangulation
Public Member Functions | Private Attributes | Friends | List of all members
Vec Class Reference

Class representing coordinates of a Vector. More...

#include <Vec.hpp>

Collaboration diagram for Vec:
Collaboration graph

Public Member Functions

 Vec ()
 Default constructor.
 
 Vec (int dim)
 Contstructor populating dimensions. More...
 
 Vec (float x, float y, float z, int dim)
 Constructor populating all members. More...
 
double getX () const
 Accessor to private member x. More...
 
double getY () const
 Accessor to private member y. More...
 
double getZ () const
 Accessor to private member z. More...
 
int getDimensions () const
 Accessor to private member dimensions. More...
 
bool operator== (const Vec &rhs) const
 Equality operator. More...
 
bool operator!= (const Vec &rhs) const
 Non-equality operator. More...
 

Private Attributes

double x
 x coordinate
 
double y
 y coordinate
 
double z
 z coordinate
 
int dimensions
 number of dimensions in mesh
 

Friends

std::istream & operator>> (std::istream &is, Vec &vec)
 Input stream operator. More...
 
std::ofstream & operator<< (std::ofstream &os, Vec &vec)
 Output filestream operator. More...
 
std::ostream & operator<< (std::ostream &os, Vec &vec)
 Output stream operator. More...
 

Detailed Description

Class representing coordinates of a Vector.

Note
Class can only be mutated through recreating vec and setting in parent Vertex class

Constructor & Destructor Documentation

◆ Vec() [1/2]

Vec::Vec ( int  dim)
inlineexplicit

Contstructor populating dimensions.

Parameters
dimnumber of dimensions

◆ Vec() [2/2]

Vec::Vec ( float  x,
float  y,
float  z,
int  dim 
)
inline

Constructor populating all members.

Parameters
xx coordinate
yy coordinate
zz coordinate
dimnumber of dimensions

Member Function Documentation

◆ getDimensions()

int Vec::getDimensions ( ) const

Accessor to private member dimensions.

Returns
number of dimensions

◆ getX()

double Vec::getX ( ) const

Accessor to private member x.

Returns
x coordinate

◆ getY()

double Vec::getY ( ) const

Accessor to private member y.

Returns
y coordinate

◆ getZ()

double Vec::getZ ( ) const

Accessor to private member z.

Returns
z coordinate

◆ operator!=()

bool Vec::operator!= ( const Vec rhs) const

Non-equality operator.

Parameters
rhs
Returns

◆ operator==()

bool Vec::operator== ( const Vec rhs) const

Equality operator.

Parameters
rhs
Returns

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ofstream & operator<< ( std::ofstream &  os,
Vec vec 
)
friend

Output filestream operator.

Parameters
os
vec
Returns

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream &  os,
Vec vec 
)
friend

Output stream operator.

Parameters
os
vec
Returns

◆ operator>>

std::istream & operator>> ( std::istream &  is,
Vec vec 
)
friend

Input stream operator.

Parameters
is
vec
Returns

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