C3D Toolkit  Kernel - 117982, Vision -

A two-dimensional point. More...

#include <mesh_float_point.h>

Public Member Functions

 MbFloatPoint ()
 MbFloatPoint (double xx, double yy)
 MbFloatPoint (const MbCartPoint &p)
 MbFloatPoint (const MbVector &p)
 MbFloatPoint (const MbFloatPoint &p)
void Move (const MbVector &v)
void Rotate (const MbCartPoint &, const MbDirection &)
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

Are the objects equal?

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

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

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