eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::Easy3D::E3DPoint Struct Reference

Represents a 3D point with floating point coordinates. More...

#include <eVision/Easy3D/E3DPoint.h>

Public Member Functions

 E3DPoint ()
 Constructs a default E3DPoint object.
 E3DPoint (float x, float y, float z)
 Constructs a default E3DPoint object.
bool operator== (const eVision::Easy3D::E3DPoint &point) const
 Checks if two E3DPoint are strictly equal.
bool operator!= (const eVision::Easy3D::E3DPoint &point) const
 Checks if two E3DPoint are strictly different.
float SquareDistanceTo (const eVision::Easy3D::E3DPoint &point) const
 Returns the euclidean squared distance to another E3DPoint.
float DistanceTo (const eVision::Easy3D::E3DPoint &point) const
 Returns the euclidean distance to another E3DPoint.
float DistanceToSegment (const eVision::Easy3D::E3DPoint &from, const eVision::Easy3D::E3DPoint &to) const
 Returns the euclidean distance between the E3DPoint and a segment represented by 2 other E3DPoint.
void Save (const std::string &fileName)
 Saves the E3DPoint.
void Save (eVision::ESerializer *serializer)
 Saves the E3DPoint.
void Load (const std::string &fileName)
 Loads the E3DPoint.
void Load (eVision::ESerializer *serializer)
 Loads the E3DPoint.

Public Attributes

float X
 X coordinate of the point.
float Y
 Y coordinate of the point.
float Z
 Z coordinate of the point.

Detailed Description

Represents a 3D point with floating point coordinates.

License(s): Easy3D

Constructor & Destructor Documentation

◆ E3DPoint() [1/2]

eVision::Easy3D::E3DPoint::E3DPoint ( )

Constructs a default E3DPoint object.

If the default constructor is used, the point is initialized to (0, 0, 0).

◆ E3DPoint() [2/2]

eVision::Easy3D::E3DPoint::E3DPoint ( float x,
float y,
float z )

Constructs a default E3DPoint object.

Parameters
xX coordinate of the point.
yY coordinate of the point.
zZ coordinate of the point.

If the default constructor is used, the point is initialized to (0, 0, 0).

Member Function Documentation

◆ DistanceTo()

float eVision::Easy3D::E3DPoint::DistanceTo ( const eVision::Easy3D::E3DPoint & point) const

Returns the euclidean distance to another E3DPoint.

Parameters
pointThe other point.

◆ DistanceToSegment()

float eVision::Easy3D::E3DPoint::DistanceToSegment ( const eVision::Easy3D::E3DPoint & from,
const eVision::Easy3D::E3DPoint & to ) const

Returns the euclidean distance between the E3DPoint and a segment represented by 2 other E3DPoint.

Parameters
fromOne end point of the segment
toThe other end point of the segment

◆ Load() [1/2]

void eVision::Easy3D::E3DPoint::Load ( const std::string & fileName)

Loads the E3DPoint.

Parameters
fileNamePath to the file.

◆ Load() [2/2]

void eVision::Easy3D::E3DPoint::Load ( eVision::ESerializer * serializer)

Loads the E3DPoint.

Parameters
serializerSerializer. Must be in read mode.

◆ operator!=()

bool eVision::Easy3D::E3DPoint::operator!= ( const eVision::Easy3D::E3DPoint & point) const

Checks if two E3DPoint are strictly different.

Parameters
pointThe other point.

◆ operator==()

bool eVision::Easy3D::E3DPoint::operator== ( const eVision::Easy3D::E3DPoint & point) const

Checks if two E3DPoint are strictly equal.

Parameters
pointThe other point.

◆ Save() [1/2]

void eVision::Easy3D::E3DPoint::Save ( const std::string & fileName)

Saves the E3DPoint.

Parameters
fileNamePath to the file.

◆ Save() [2/2]

void eVision::Easy3D::E3DPoint::Save ( eVision::ESerializer * serializer)

Saves the E3DPoint.

Parameters
serializerSerializer. Must be in write mode.

◆ SquareDistanceTo()

float eVision::Easy3D::E3DPoint::SquareDistanceTo ( const eVision::Easy3D::E3DPoint & point) const

Returns the euclidean squared distance to another E3DPoint.

Parameters
pointThe other point.

Member Data Documentation

◆ X

float eVision::Easy3D::E3DPoint::X

X coordinate of the point.

◆ Y

float eVision::Easy3D::E3DPoint::Y

Y coordinate of the point.

◆ Z

float eVision::Easy3D::E3DPoint::Z

Z coordinate of the point.