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

A E3DObject is a geometric description of a set of 3D points, produced by E3DObjectExtractor. Several 3D features are available. All 3D features are expressed in the ZMap metric coordinate system. More...

#include <eVision/Easy3D/E3DObject.h>

Collaboration diagram for eVision::Easy3D::E3DObject:

Public Member Functions

 E3DObject ()
 Constructs an E3DObject with default (invalid) values.
 E3DObject (const eVision::Easy3D::E3DObject &other)
 Copy constructor for the E3DObject.
virtual ~E3DObject () throw ()
eVision::Easy3D::E3DObject & operator= (const eVision::Easy3D::E3DObject &other)
 Assignment operator.
bool operator== (const eVision::Easy3D::E3DObject &other) const
 Comparison operator.
void Load (const std::string &path)
 Loads the E3DObject. The given ESerializer must have been created for reading.
void Load (eVision::ESerializer *serializer)
 Loads the E3DObject. The given ESerializer must have been created for reading.
void Save (const std::string &path)
 Saves the E3DObject. The given ESerializer must have been created for writing.
void Save (eVision::ESerializer *serializer)
 Saves the E3DObject. The given ESerializer must have been created for writing.
void Draw (eVision::EDrawAdapter *drawAdapter, eVision::Easy3D::E3DObjectFeature feature, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX, float panY) const
 Draws the specified feature of the object in the given graphic context.
void Draw (eVision::EDrawAdapter *drawAdapter, eVision::Easy3D::E3DObjectFeature feature, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX) const
 Draws the specified feature of the object in the given graphic context.
void Draw (eVision::EDrawAdapter *drawAdapter, eVision::Easy3D::E3DObjectFeature feature, const eVision::ERGBColor &color, float zoomX, float zoomY) const
 Draws the specified feature of the object in the given graphic context.
void Draw (eVision::EDrawAdapter *drawAdapter, eVision::Easy3D::E3DObjectFeature feature, const eVision::ERGBColor &color, float zoomX) const
 Draws the specified feature of the object in the given graphic context.
void Draw (eVision::EDrawAdapter *drawAdapter, eVision::Easy3D::E3DObjectFeature feature, const eVision::ERGBColor &color) const
 Draws the specified feature of the object in the given graphic context.
void Draw (eVision::EDrawAdapter *drawAdapter, eVision::Easy3D::E3DObjectFeature feature) const
 Draws the specified feature of the object in the given graphic context.
void Draw (HDC graphicContext, eVision::Easy3D::E3DObjectFeature feature, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX, float panY) const
 Draws the specified feature of the object in the given graphic context.
void Draw (HDC graphicContext, eVision::Easy3D::E3DObjectFeature feature, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX) const
 Draws the specified feature of the object in the given graphic context.
void Draw (HDC graphicContext, eVision::Easy3D::E3DObjectFeature feature, const eVision::ERGBColor &color, float zoomX, float zoomY) const
 Draws the specified feature of the object in the given graphic context.
void Draw (HDC graphicContext, eVision::Easy3D::E3DObjectFeature feature, const eVision::ERGBColor &color, float zoomX) const
 Draws the specified feature of the object in the given graphic context.
void Draw (HDC graphicContext, eVision::Easy3D::E3DObjectFeature feature, const eVision::ERGBColor &color) const
 Draws the specified feature of the object in the given graphic context.
void Draw (HDC graphicContext, eVision::Easy3D::E3DObjectFeature feature) const
 Draws the specified feature of the object in the given graphic context.
void AddToMesh (eVision::Easy3D::E3DObjectFeature feature, eVision::Easy3D::EMesh &mesh) const
 Adds a 3D representation (in the form of a list of triangles) of the given feature to the given mesh. If the feature is not defined for the E3DObject, this method has no effect.
eVision::Easy3D::E3DObject Transform (const eVision::Easy3D::E3DTransformMatrix &matrix) const
 Transforms the 3D object with the given transformation matrix. The transformation matrix must contain a rigid transformation (translation and rotation only). Image based attributes of the 3D object are unchanged.
int GetNumPixels () const
 Number of ZMap pixels composing the object.
eVision::Easy3D::E3DBox GetBoundingBox () const
 The E3DBox (3D oriented bounding box) of the object. The bounding box is oriented in the XY plane of the ZMap space (rotation over the ZMap Z axis). The bounding box X and Y sizes are the object length and width (see E3DObject::GetLength and E3DObject::GetWidth). The bounding box Z size is always in the ZMap Z axis direction.
eVision::Easy3D::E3DPoint GetAveragePosition () const
 3D average position of the object.
eVision::Easy3D::E3DPoint GetLocalTopPosition () const
 3D highest position of the object relatively to the object base plane. If it is not possible to evaluate a base plane, the local top position is the reference top position (E3DObject::GetReferenceTopPosition)
eVision::Easy3D::E3DPoint GetReferenceTopPosition () const
 3D top position relative to the ZMap origin (this is the position with the highest Z coordinate)
float GetLength () const
 Length of the object in metric units. The length is the largest dimension of the object on the XY plane of the ZMap space.
float GetWidth () const
 Width of the object in metric units. The width is the smallest dimension of the object on the XY plane of the ZMap space.
float GetAspectRatio () const
 Aspect ratio of the object. The aspect ratio is the smallest dimension divided by the largest dimension, its value is always between 0 and 1. The smaller the ratio, the more elongated the object is. A value of 1 means a perfectly square object (length=width).
float GetLocalHeight () const
 Local height of the object in metric units. The local height of the object is relative to the surroundings. The base plane is used as the reference for the calculation of the local height. If it is not possible to evaluate a base plane, the local height has the same value as the reference height (E3DObject::GetReferenceHeight).
float GetReferenceHeight () const
 Reference height of the object in metric units. The reference height of the object is relative to the ZMap origin (also known as the reference plane).
float GetOrientation () const
 Orientation of the object. The orientation is the angle between the object major (longest) axis and the ZMap X axis.
eVision::Easy3D::E3DPlane GetPlane () const
 Plane fitted to the object 3D positions.
float GetLocalTilt () const
 Angle between the object plane and the base plane.
float GetReferenceTilt () const
 Angle between the object plane and the vertical (Z) axis.
bool GetIsFeatureComputed (eVision::Easy3D::E3DObjectFeature feature) const
 returns true or false depending if the feature was computed for this object
float GetArea () const
 Object area in metric units.
float GetVolume () const
 Object volume in metric units.
eVision::Easy3D::E3DPlane GetBasePlane () const
 Base plane. The base plane is calculated using points surrounding the object.
float GetBaseTilt () const
 Angle between the base plane and the vertical (Z) axis.
const eVision::ERectangleRegion & GetRectangleRegion () const
 ERectangleRegion enclosing the object ZMap pixels.
const eVision::ERegion & GetRegion () const
 ERegion composed of the object ZMap pixels.
const eVision::Easy3D::E3DSphere & GetSphere () const
 Sphere fitted to the object.
 E3DObject (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

A E3DObject is a geometric description of a set of 3D points, produced by E3DObjectExtractor. Several 3D features are available. All 3D features are expressed in the ZMap metric coordinate system.

License(s): Easy3D

Constructor & Destructor Documentation

◆ E3DObject() [1/3]

eVision::Easy3D::E3DObject::E3DObject ( )

Constructs an E3DObject with default (invalid) values.

◆ E3DObject() [2/3]

eVision::Easy3D::E3DObject::E3DObject ( const eVision::Easy3D::E3DObject & other)

Copy constructor for the E3DObject.

Parameters
otherThe other E3DObject that we will copy into this one.

◆ ~E3DObject()

eVision::Easy3D::E3DObject::~E3DObject ( )
throw ( )
virtual

◆ E3DObject() [3/3]

eVision::Easy3D::E3DObject::E3DObject ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ AddToMesh()

void eVision::Easy3D::E3DObject::AddToMesh ( eVision::Easy3D::E3DObjectFeature feature,
eVision::Easy3D::EMesh & mesh ) const

Adds a 3D representation (in the form of a list of triangles) of the given feature to the given mesh. If the feature is not defined for the E3DObject, this method has no effect.

◆ Draw() [1/12]

void eVision::Easy3D::E3DObject::Draw ( eVision::EDrawAdapter * drawAdapter,
eVision::Easy3D::E3DObjectFeature feature ) const

Draws the specified feature of the object in the given graphic context.

Parameters
drawAdapterA pointer to an EDrawAdapter (like the EWindowsDrawAdapter).
featureThe feature to draw.

Drawing is done in the device context associated to the desired window.

◆ Draw() [2/12]

void eVision::Easy3D::E3DObject::Draw ( eVision::EDrawAdapter * drawAdapter,
eVision::Easy3D::E3DObjectFeature feature,
const eVision::ERGBColor & color ) const

Draws the specified feature of the object in the given graphic context.

Parameters
drawAdapterA pointer to an EDrawAdapter (like the EWindowsDrawAdapter).
featureThe feature to draw.
colorThe color in which to draw the feature (optional).

Drawing is done in the device context associated to the desired window.

◆ Draw() [3/12]

void eVision::Easy3D::E3DObject::Draw ( eVision::EDrawAdapter * drawAdapter,
eVision::Easy3D::E3DObjectFeature feature,
const eVision::ERGBColor & color,
float zoomX ) const

Draws the specified feature of the object in the given graphic context.

Parameters
drawAdapterA pointer to an EDrawAdapter (like the EWindowsDrawAdapter).
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.

Drawing is done in the device context associated to the desired window.

◆ Draw() [4/12]

void eVision::Easy3D::E3DObject::Draw ( eVision::EDrawAdapter * drawAdapter,
eVision::Easy3D::E3DObjectFeature feature,
const eVision::ERGBColor & color,
float zoomX,
float zoomY ) const

Draws the specified feature of the object in the given graphic context.

Parameters
drawAdapterA pointer to an EDrawAdapter (like the EWindowsDrawAdapter).
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

Drawing is done in the device context associated to the desired window.

◆ Draw() [5/12]

void eVision::Easy3D::E3DObject::Draw ( eVision::EDrawAdapter * drawAdapter,
eVision::Easy3D::E3DObjectFeature feature,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX ) const

Draws the specified feature of the object in the given graphic context.

Parameters
drawAdapterA pointer to an EDrawAdapter (like the EWindowsDrawAdapter).
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

Drawing is done in the device context associated to the desired window.

◆ Draw() [6/12]

void eVision::Easy3D::E3DObject::Draw ( eVision::EDrawAdapter * drawAdapter,
eVision::Easy3D::E3DObjectFeature feature,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws the specified feature of the object in the given graphic context.

Parameters
drawAdapterA pointer to an EDrawAdapter (like the EWindowsDrawAdapter).
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

Drawing is done in the device context associated to the desired window.

◆ Draw() [7/12]

void eVision::Easy3D::E3DObject::Draw ( HDC graphicContext,
eVision::Easy3D::E3DObjectFeature feature ) const

Draws the specified feature of the object in the given graphic context.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.

Drawing is done in the device context associated to the desired window.

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [8/12]

void eVision::Easy3D::E3DObject::Draw ( HDC graphicContext,
eVision::Easy3D::E3DObjectFeature feature,
const eVision::ERGBColor & color ) const

Draws the specified feature of the object in the given graphic context.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.
colorThe color in which to draw the feature (optional).

Drawing is done in the device context associated to the desired window.

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [9/12]

void eVision::Easy3D::E3DObject::Draw ( HDC graphicContext,
eVision::Easy3D::E3DObjectFeature feature,
const eVision::ERGBColor & color,
float zoomX ) const

Draws the specified feature of the object in the given graphic context.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.

Drawing is done in the device context associated to the desired window.

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [10/12]

void eVision::Easy3D::E3DObject::Draw ( HDC graphicContext,
eVision::Easy3D::E3DObjectFeature feature,
const eVision::ERGBColor & color,
float zoomX,
float zoomY ) const

Draws the specified feature of the object in the given graphic context.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

Drawing is done in the device context associated to the desired window.

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [11/12]

void eVision::Easy3D::E3DObject::Draw ( HDC graphicContext,
eVision::Easy3D::E3DObjectFeature feature,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX ) const

Draws the specified feature of the object in the given graphic context.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

Drawing is done in the device context associated to the desired window.

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [12/12]

void eVision::Easy3D::E3DObject::Draw ( HDC graphicContext,
eVision::Easy3D::E3DObjectFeature feature,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws the specified feature of the object in the given graphic context.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

Drawing is done in the device context associated to the desired window.

Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ GetArea()

float eVision::Easy3D::E3DObject::GetArea ( ) const

Object area in metric units.

◆ GetAspectRatio()

float eVision::Easy3D::E3DObject::GetAspectRatio ( ) const

Aspect ratio of the object. The aspect ratio is the smallest dimension divided by the largest dimension, its value is always between 0 and 1. The smaller the ratio, the more elongated the object is. A value of 1 means a perfectly square object (length=width).

◆ GetAveragePosition()

eVision::Easy3D::E3DPoint eVision::Easy3D::E3DObject::GetAveragePosition ( ) const

3D average position of the object.

◆ GetBasePlane()

eVision::Easy3D::E3DPlane eVision::Easy3D::E3DObject::GetBasePlane ( ) const

Base plane. The base plane is calculated using points surrounding the object.

◆ GetBaseTilt()

float eVision::Easy3D::E3DObject::GetBaseTilt ( ) const

Angle between the base plane and the vertical (Z) axis.

◆ GetBoundingBox()

eVision::Easy3D::E3DBox eVision::Easy3D::E3DObject::GetBoundingBox ( ) const

The E3DBox (3D oriented bounding box) of the object. The bounding box is oriented in the XY plane of the ZMap space (rotation over the ZMap Z axis). The bounding box X and Y sizes are the object length and width (see E3DObject::GetLength and E3DObject::GetWidth). The bounding box Z size is always in the ZMap Z axis direction.

◆ GetIsFeatureComputed()

bool eVision::Easy3D::E3DObject::GetIsFeatureComputed ( eVision::Easy3D::E3DObjectFeature feature) const

returns true or false depending if the feature was computed for this object

Parameters
featureThe feature that is either computed or not.

◆ GetLength()

float eVision::Easy3D::E3DObject::GetLength ( ) const

Length of the object in metric units. The length is the largest dimension of the object on the XY plane of the ZMap space.

◆ GetLocalHeight()

float eVision::Easy3D::E3DObject::GetLocalHeight ( ) const

Local height of the object in metric units. The local height of the object is relative to the surroundings. The base plane is used as the reference for the calculation of the local height. If it is not possible to evaluate a base plane, the local height has the same value as the reference height (E3DObject::GetReferenceHeight).

◆ GetLocalTilt()

float eVision::Easy3D::E3DObject::GetLocalTilt ( ) const

Angle between the object plane and the base plane.

◆ GetLocalTopPosition()

eVision::Easy3D::E3DPoint eVision::Easy3D::E3DObject::GetLocalTopPosition ( ) const

3D highest position of the object relatively to the object base plane. If it is not possible to evaluate a base plane, the local top position is the reference top position (E3DObject::GetReferenceTopPosition)

◆ GetNumPixels()

int eVision::Easy3D::E3DObject::GetNumPixels ( ) const

Number of ZMap pixels composing the object.

◆ GetOrientation()

float eVision::Easy3D::E3DObject::GetOrientation ( ) const

Orientation of the object. The orientation is the angle between the object major (longest) axis and the ZMap X axis.

◆ GetPlane()

eVision::Easy3D::E3DPlane eVision::Easy3D::E3DObject::GetPlane ( ) const

Plane fitted to the object 3D positions.

◆ GetRectangleRegion()

const eVision::ERectangleRegion & eVision::Easy3D::E3DObject::GetRectangleRegion ( ) const

ERectangleRegion enclosing the object ZMap pixels.

◆ GetReferenceHeight()

float eVision::Easy3D::E3DObject::GetReferenceHeight ( ) const

Reference height of the object in metric units. The reference height of the object is relative to the ZMap origin (also known as the reference plane).

◆ GetReferenceTilt()

float eVision::Easy3D::E3DObject::GetReferenceTilt ( ) const

Angle between the object plane and the vertical (Z) axis.

◆ GetReferenceTopPosition()

eVision::Easy3D::E3DPoint eVision::Easy3D::E3DObject::GetReferenceTopPosition ( ) const

3D top position relative to the ZMap origin (this is the position with the highest Z coordinate)

◆ GetRegion()

const eVision::ERegion & eVision::Easy3D::E3DObject::GetRegion ( ) const

ERegion composed of the object ZMap pixels.

◆ GetSphere()

const eVision::Easy3D::E3DSphere & eVision::Easy3D::E3DObject::GetSphere ( ) const

Sphere fitted to the object.

◆ GetVolume()

float eVision::Easy3D::E3DObject::GetVolume ( ) const

Object volume in metric units.

◆ GetWidth()

float eVision::Easy3D::E3DObject::GetWidth ( ) const

Width of the object in metric units. The width is the smallest dimension of the object on the XY plane of the ZMap space.

◆ Load() [1/2]

void eVision::Easy3D::E3DObject::Load ( const std::string & path)

Loads the E3DObject. The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ Load() [2/2]

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

Loads the E3DObject. The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ operator=()

eVision::Easy3D::E3DObject & eVision::Easy3D::E3DObject::operator= ( const eVision::Easy3D::E3DObject & other)

Assignment operator.

Parameters
otherThe other E3DObject that we will copy into this one.

◆ operator==()

bool eVision::Easy3D::E3DObject::operator== ( const eVision::Easy3D::E3DObject & other) const

Comparison operator.

Parameters
otherThe other E3DObject.

◆ Save() [1/2]

void eVision::Easy3D::E3DObject::Save ( const std::string & path)

Saves the E3DObject. The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ Save() [2/2]

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

Saves the E3DObject. The given ESerializer must have been created for writing.

Parameters
serializerThe ESerializer object that is written to.

◆ Transform()

eVision::Easy3D::E3DObject eVision::Easy3D::E3DObject::Transform ( const eVision::Easy3D::E3DTransformMatrix & matrix) const

Transforms the 3D object with the given transformation matrix. The transformation matrix must contain a rigid transformation (translation and rotation only). Image based attributes of the 3D object are unchanged.

Parameters
matrixThe 3D transformation matrix.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::Easy3D::E3DObject::wrappedClass_