C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

A two-dimensional point. More...

#include <mesh_float_point.h>

Public Member Functions

 MbFloatPoint ()
 Constructor.
 
 MbFloatPoint (double xx, double yy)
 Constructor.
 
 MbFloatPoint (const MbCartPoint &p)
 Constructor.
 
 MbFloatPoint (const MbVector &p)
 Constructor.
 
 MbFloatPoint (const MbFloatPoint &p)
 Constructor.
 
void Move (const MbVector &v)
 Translation.
 
void Rotate (const MbCartPoint &, const MbDirection &)
 Rotation.
 
void Transform (const MbMatrix &matr)
 Transform according to the matrix.
 
void GetProperties (MbProperties &properties)
 Get properties of the object.
 
void SetProperties (const MbProperties &properties)
 Set properties of the object.
 
void GetCartPoint (MbCartPoint &p) const
 Get the Cartesian point.
 
void GetVector (MbVector &p) const
 Get the vector.
 
void operator= (const MbCartPoint &)
 The assignment of values to the point.
 
void operator= (const MbVector &)
 The assignment of values to the point.
 
void operator= (const MbFloatPoint &)
 The assignment of values to the point.
 
bool operator== (const MbFloatPoint &) const
 The check for equality.
 
bool operator< (const MbFloatPoint &) const
 The check for "less".
 
bool operator> (const MbFloatPoint &) const
 The check for "greater".
 
bool IsSame (const MbFloatPoint &other, double accuracy) const
 Are the objects equal? More...
 

Public Attributes

float x
 A first point coordinate.
 
float y
 A second point coordinate.
 

Detailed Description

A two-dimensional point.

MbFloatPoint class is used to present a point on the plane, as a similar MbCartPoint class which has a higher tolerance of representation. MbFloatPoint has a data structure which consists of a pair of numbers with a single precision floating point (float). It is used in the polygon (MbPolygon) to approximate two-dimensional curves.

Member Function Documentation

◆ IsSame()

bool MbFloatPoint::IsSame ( const MbFloatPoint other,
double  accuracy 
) const
inline

Are the objects equal?

The objects are equal if their data are equal with a given accuracy.

Parameters
[in]other- The object to compare.
[in]accuracy- The accuracy to compare.
Returns
Whether the objects are equal.

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