Fade2.5D Documentation pages v2.12
Delaunay Features
GEOM_FADE25D::Point2 Class Reference

Point. More...

#include <Point2.h>

Public Member Functions

 Point2 ()
 Default constructor.
 
 Point2 (const double x_, const double y_, const double z_)
 Constructor. More...
 
 Point2 (const Point2 &p_)
 Copy constructor. More...
 
int getCustomIndex () const
 Get the custom index. More...
 
Triangle2getIncidentTriangle () const
 Get the associated triangle. More...
 
double getMaxAbs () const
 Get max(abs(x),abs(y))
 
bool operator!= (const Point2 &p) const
 Inequality operator. More...
 
Point2 operator+ (const Vector2 &vec) const
 Add vector and point.
 
Vector2 operator- (const Point2 &other) const
 Returns a vector from other to *this.
 
Point2 operator- (const Vector2 &vec) const
 Subtract vector from point.
 
bool operator< (const Point2 &p) const
 Less than operator. More...
 
Point2operator= (const Point2 &other)
 
bool operator== (const Point2 &p) const
 Equality operator. More...
 
bool operator> (const Point2 &p) const
 Greater than operator. More...
 
bool samePoint (const Point2 &p) const
 Equality operator. More...
 
void set (const double x_, const double y_, const double z_, int customIndex_)
 Set the coordinates. More...
 
void set (const Point2 &pnt)
 Set the coordiantes. More...
 
void setCoords (const double x_, const double y_, const double z_)
 Set the coordinates. More...
 
void setCustomIndex (int customIndex_)
 Set a custom index. More...
 
void setHeight (double z)
 Set the z-coordinate. More...
 
void setIncidentTriangle (Triangle2 *pT)
 Associate a triangle with the point. More...
 
double x () const
 Get the x-coordinate. More...
 
void xy (double &x_, double &y_) const
 Get the x- and y-coordinate. More...
 
void xyz (double &x_, double &y_, double &z_) const
 Get the x-, y- and z-coordinate. More...
 
double y () const
 Get the y-coordinate. More...
 
double z () const
 Get the z-coordinate. More...
 

Protected Attributes

double coordX
 
double coordY
 
double coordZ
 
int customIndex
 
Triangle2pAssociatedTriangle
 

Friends

class Dt2
 
std::ostream & operator<< (std::ostream &stream, const Point2 &pnt)
 Print to stream.
 
std::istream & operator>> (std::istream &stream, Point2 &pnt)
 Stream-to-Point.
 

Detailed Description

This class represents a point in 2D with x- and y-coordinates and an additional pointer to an associated triangle.

Constructor & Destructor Documentation

◆ Point2() [1/2]

GEOM_FADE25D::Point2::Point2 ( const double  x_,
const double  y_,
const double  z_ 
)
inline
Parameters
x_x-coordinate
y_y-coordinate
z_z-coordinate

◆ Point2() [2/2]

GEOM_FADE25D::Point2::Point2 ( const Point2 p_)
inline

Create a point as a copy of p_. The associated triangle pointer is initialized to NULL

Member Function Documentation

◆ getCustomIndex()

int GEOM_FADE25D::Point2::getCustomIndex ( ) const
inline
Returns
the custom index.
Note
The custom index defaults to -1. It is not the index of the point in the triangulation (such an index does not exist) but an arbitrary value which can be set by the user.
See also
void setCustomIndex(int customIndex_)
A best practices example that deals with indices: http://www.geom.at/runtime/

◆ getIncidentTriangle()

Triangle2* GEOM_FADE25D::Point2::getIncidentTriangle ( ) const
inline
Returns
the associated triangle

◆ operator!=()

bool GEOM_FADE25D::Point2::operator!= ( const Point2 p) const
inline

Compares the x and y coordinates

Note
Although a point has a z-coordinate in the 2.5D version only x and y a compared by this method

◆ operator<()

bool GEOM_FADE25D::Point2::operator< ( const Point2 p) const
inline

Compares the x and y coordinates

Note
Although a point has a z-coordinate in the 2.5D version only x and y a compared by this method

◆ operator==()

bool GEOM_FADE25D::Point2::operator== ( const Point2 p) const
inline

Compares the x and y coordinates

Note
Although a point has a z-coordinate in the 2.5D version only x and y a compared by this method

◆ operator>()

bool GEOM_FADE25D::Point2::operator> ( const Point2 p) const
inline

Compares the x and y coordinates

Note
Although a point has a z-coordinate in the 2.5D version only x and y a compared by this method

◆ samePoint()

bool GEOM_FADE25D::Point2::samePoint ( const Point2 p) const
inline

Compares the x,y,z coordinates while operator==() compares only x,y

◆ set() [1/2]

void GEOM_FADE25D::Point2::set ( const double  x_,
const double  y_,
const double  z_,
int  customIndex_ 
)
inline

Internal method

Parameters
x_x-coordinate
y_y-coordinate
z_z-coordinate
customIndex_Arbitrary index, use -1 if not required

◆ set() [2/2]

void GEOM_FADE25D::Point2::set ( const Point2 pnt)
inline
Parameters
pntis the point whose coordinates are assigned to the current point

◆ setCoords()

void GEOM_FADE25D::Point2::setCoords ( const double  x_,
const double  y_,
const double  z_ 
)
inline

Internal method

Parameters
x_x-coordinate
y_y-coordinate
z_z-coordinate
Note
Does not adapt customIndex and pAssociatedTriangle.

◆ setCustomIndex()

void GEOM_FADE25D::Point2::setCustomIndex ( int  customIndex_)
inline

An arbitrary index can be assigned to a point. Use getCustomIndex() to retrieve it later.

Note
This method is provided for the users' convenience. It has nothing to do with the internal data structures of Fade 2D and using this method is optional. By default this index is -1.
See also
int getCustomIndex()
A best practices example that deals with indices: http://www.geom.at/runtime/

◆ setHeight()

void GEOM_FADE25D::Point2::setHeight ( double  z)
inline

Allows to exchange the z-coordinate

◆ setIncidentTriangle()

void GEOM_FADE25D::Point2::setIncidentTriangle ( Triangle2 pT)
inline
Parameters
pTwill be associated with the triangle

◆ x()

double GEOM_FADE25D::Point2::x ( ) const
inline
Returns
the x-coordinate

◆ xy()

void GEOM_FADE25D::Point2::xy ( double &  x_,
double &  y_ 
) const
inline
Parameters
x_x-coordinate
y_y-coordinate

◆ xyz()

void GEOM_FADE25D::Point2::xyz ( double &  x_,
double &  y_,
double &  z_ 
) const
inline
Parameters
x_x-coordinate
y_y-coordinate
z_z-coordinate

◆ y()

double GEOM_FADE25D::Point2::y ( ) const
inline
Returns
the y-coordinate

◆ z()

double GEOM_FADE25D::Point2::z ( ) const
inline
Returns
the z-coordinate

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