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

Represents a geometrical frame of reference as well as the parameters needed to transform from/to local and global coordinates. It contains a point and an angle and serves as a base class for geometrical elements. More...

#include <eVision/Easy/Legacy/EFrame.h>

Inheritance diagram for eVision::Legacy::EFrame:
Collaboration diagram for eVision::Legacy::EFrame:

Public Member Functions

 EFrame ()
 Constructs a EFrame object.
 EFrame (float centerX, float centerY, float angle, float scale)
 Constructs a EFrame object.
 EFrame (float centerX, float centerY, float angle)
 Constructs a EFrame object.
 EFrame (float centerX, float centerY)
 Constructs a EFrame object.
 EFrame (const eVision::EPoint &center, float angle, float scale)
 Constructs a EFrame object.
 EFrame (const eVision::Legacy::EFrame &frame)
 Constructs a EFrame object.
virtual ~EFrame () throw ()
eVision::Legacy::EFrame & operator= (const eVision::Legacy::EFrame &frame)
 Copies all the data from another EFrame object into the current EFrame object.
eVision::EPoint operator+ (const eVision::EPoint &point) const
 Returns the addition of the point to the center of the EFrame.
eVision::EPoint operator- (const eVision::EPoint &point) const
 Returns the substraction of the center of the EFrame with the given point.
eVision::EPoint operator* (float scalar) const
 Returns the multiplication of the center of the EFrame with the given multiplier.
eVision::EPoint operator/ (float scalar) const
 Returns the division of the center of the EFrame with the given divisor.
bool operator== (const eVision::Legacy::EFrame &frame) const
 Compares the current EFrame center coordinates with the center coordinates of another EFrame object.
bool operator!= (const eVision::Legacy::EFrame &frame) const
 Compares the current EFrame center coordinates with the center coordinates of another EFrame object.
void CopyTo (eVision::Legacy::EFrame &other) const
 Copies all the data from the current EFrame object into another EFrame object, and returns it.
eVision::Legacy::EFrame * CopyTo (eVision::Legacy::EFrame *other) const
 Copies all the data from the current EFrame object into another EFrame object, and returns it.
void SetAngle (float angle)
 Orientation of the frame.
void SetScale (float scale)
 Horizontal sensor resolution, in pixels per unit.
float GetCenterX () const
 Abscissa of the origin point of the frame.
float GetCenterY () const
 Ordinate of the origin point of the frame.
float GetAngle () const
 Orientation of the frame.
float GetScale () const
 Horizontal sensor resolution, in pixels per unit.
eVision::EPoint LocalToGlobal (const eVision::EPoint &local) const
 Transforms a geometrical element from local to global coordinates (local to world).
eVision::Legacy::EFrame LocalToGlobal (const eVision::Legacy::EFrame &local) const
 Transforms a geometrical element from local to global coordinates (local to world).
eVision::Legacy::ELine LocalToGlobal (const eVision::Legacy::ELine &local) const
 Transforms a geometrical element from local to global coordinates (local to world).
eVision::Legacy::ECircle LocalToGlobal (const eVision::Legacy::ECircle &local) const
 Transforms a geometrical element from local to global coordinates (local to world).
eVision::EPoint GlobalToLocal (const eVision::EPoint &global) const
 Transforms a geometrical element from global to local coordinates (world to local).
eVision::Legacy::EFrame GlobalToLocal (const eVision::Legacy::EFrame &global) const
 Transforms a geometrical element from global to local coordinates (world to local).
void Load (const std::string &path)
 Load the EFrame configuration. The given ESerializer must have been created for reading.
void Load (eVision::ESerializer *serializer)
 Load the EFrame configuration. The given ESerializer must have been created for reading.
void Save (const std::string &path)
 Save the EFrame configuration. The given ESerializer must have been created for writing.
void Save (eVision::ESerializer *serializer)
 Save the EFrame configuration. The given ESerializer must have been created for writing.
virtual void SetCenter (const eVision::EPoint &center)
 Center coordinates of a EFrame object.
virtual eVision::EPoint GetCenter () const
 Center.
void SetCenterXY (float centerX, float centerY)
 Sets the center coordinates of a EFrame object.
float GetX () const
 Abscissa (X coordinate) of the EFrame object.
void SetX (float value)
 Abscissa (X coordinate) of the EFrame object.
float GetY () const
 Ordinate (Y coordinate) of the EFrame object.
void SetY (float value)
 Ordinate (Y coordinate) of the EFrame object.
eVision::EPoint MidPoint (const eVision::EPoint &Point) const
 Returns the middle coordinate between this EFrame object's center and another EFrame object's center.
eVision::EPoint Rotate (float angle) const
 Returns another EPoint object containing the coordinates of the rotated center point.
float Square () const
 Compute the sum of the squared coordinates of the center of a EFrame.
float Modulus () const
 Compute the euclidean modulus of the center of a EFrame.
float Argument () const
 Compute the polar argument of the center of EFrame object.
float Dot (const eVision::EPoint &Point) const
 Compute the dot product of the centers of two EFrame objects.
float Cross (const eVision::EPoint &Point) const
 Compute the cross product of the centers of two EFrame objects.
float Area (const eVision::EPoint &Point) const
 Compute the oriented area of the parallelogram built on the centers of two EFrame.
eVision::EPoint Project (const eVision::Legacy::ELine &shape) const
 Compute the orthogonal projection of the center of a EFrame on another shape.
eVision::EPoint Project (const eVision::Legacy::ECircle &shape) const
 Compute the orthogonal projection of the center of a EFrame on another shape.
float SquaredDistance (const eVision::EPoint &Point) const
 Compute the squared distance between the centers of two EFrame.
eVision::EPoint Move (float angle, float distance) const
 Return the position by moving the center along angle by distance.
virtual float Distance (const eVision::EPoint &point) const
 Returns the distance between the addressed point and the center of EFrame object.
virtual float Distance (const eVision::Legacy::ELine &line, bool segmentOnly) const
 Returns the distance between the addressed point and the center of EFrame object.
virtual float Distance (const eVision::Legacy::ELine &line) const
 Returns the distance between the addressed point and the center of EFrame object.
virtual float Distance (const eVision::Legacy::ECircle &circle, bool arcOnly) const
 Returns the distance between the addressed point and the center of EFrame object.
virtual float Distance (const eVision::Legacy::ECircle &circle) const
 Returns the distance between the addressed point and the center of EFrame object.
 EFrame (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Represents a geometrical frame of reference as well as the parameters needed to transform from/to local and global coordinates. It contains a point and an angle and serves as a base class for geometrical elements.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EFrame() [1/7]

eVision::Legacy::EFrame::EFrame ( )

Constructs a EFrame object.

◆ EFrame() [2/7]

eVision::Legacy::EFrame::EFrame ( float centerX,
float centerY,
float angle,
float scale )

Constructs a EFrame object.

Parameters
centerXAbscissa of the center point of the frame.
centerYOrdinate of the center point of the frame.
angleOrientation of the frame.
scaleHorizontal sensor resolution.

◆ EFrame() [3/7]

eVision::Legacy::EFrame::EFrame ( float centerX,
float centerY,
float angle )

Constructs a EFrame object.

Parameters
centerXAbscissa of the center point of the frame.
centerYOrdinate of the center point of the frame.
angleOrientation of the frame.

◆ EFrame() [4/7]

eVision::Legacy::EFrame::EFrame ( float centerX,
float centerY )

Constructs a EFrame object.

Parameters
centerXAbscissa of the center point of the frame.
centerYOrdinate of the center point of the frame.

◆ EFrame() [5/7]

eVision::Legacy::EFrame::EFrame ( const eVision::EPoint & center,
float angle,
float scale )

Constructs a EFrame object.

Parameters
centerCoordinates of the center point of the frame.
angleOrientation of the frame.
scaleHorizontal sensor resolution.

◆ EFrame() [6/7]

eVision::Legacy::EFrame::EFrame ( const eVision::Legacy::EFrame & frame)

Constructs a EFrame object.

Parameters
framePre-existing EFrame object used by the copy constructor.

◆ ~EFrame()

eVision::Legacy::EFrame::~EFrame ( )
throw ( )
virtual

◆ EFrame() [7/7]

eVision::Legacy::EFrame::EFrame ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ Area()

float eVision::Legacy::EFrame::Area ( const eVision::EPoint & Point) const

Compute the oriented area of the parallelogram built on the centers of two EFrame.

Parameters
PointSecond edge of the parallelogram.

Compute the oriented area of the parallelogram built on the center of two EFrame. The area is counted as positive if the oriented vector pair ('first edge', 'second edge') is in the same sense that the axis frame. This oriented area can also be viewed as the z-coordinate of a vector product of two 3D vectors obtained in supplementing each edges with a third z-coordinate (set to zero).

◆ Argument()

float eVision::Legacy::EFrame::Argument ( ) const

Compute the polar argument of the center of EFrame object.

Compute the angle (in radians) between the oriented X-axis and the vector going from the axis origin and the EFrame. If the axis frame is orthogonal, this number is also the polar argument of the EFrame.

◆ CopyTo() [1/2]

void eVision::Legacy::EFrame::CopyTo ( eVision::Legacy::EFrame & other) const

Copies all the data from the current EFrame object into another EFrame object, and returns it.

Parameters
otherPointer to the EFrame object in which the current EFrame object data have to be copied.

In the overload taking a pointer, in case of a NULL pointer, a new EFrame object will be created and returned.

◆ CopyTo() [2/2]

eVision::Legacy::EFrame * eVision::Legacy::EFrame::CopyTo ( eVision::Legacy::EFrame * other) const

Copies all the data from the current EFrame object into another EFrame object, and returns it.

Parameters
otherPointer to the EFrame object in which the current EFrame object data have to be copied.

In the overload taking a pointer, in case of a NULL pointer, a new EFrame object will be created and returned.

Deprecated

Use the overload taking a reference.

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

◆ Cross()

float eVision::Legacy::EFrame::Cross ( const eVision::EPoint & Point) const

Compute the cross product of the centers of two EFrame objects.

Parameters
PointSecond factor of the cross product.

◆ Distance() [1/5]

float eVision::Legacy::EFrame::Distance ( const eVision::EPoint & point) const
virtual

Returns the distance between the addressed point and the center of EFrame object.

Parameters
pointEPoint object with which to calculate the distance.

Many EasyGauge members provide measurement result as a EPoint object (see EPointGauge::SetCenter, EPointGauge::GetMeasuredPoint,...). The EFrame class has its own members to retrieve all the information pertaining to a point. Among them, the Distance method returns the distance between a point pair or between a point and a line segment, a circle arc or a rectangle.

◆ Distance() [2/5]

float eVision::Legacy::EFrame::Distance ( const eVision::Legacy::ECircle & circle) const
virtual

Returns the distance between the addressed point and the center of EFrame object.

Parameters
circleECircle object with which to calculate the distance.

Many EasyGauge members provide measurement result as a EPoint object (see EPointGauge::SetCenter, EPointGauge::GetMeasuredPoint,...). The EFrame class has its own members to retrieve all the information pertaining to a point. Among them, the Distance method returns the distance between a point pair or between a point and a line segment, a circle arc or a rectangle.

Reimplemented in eVision::Legacy::ECircle.

◆ Distance() [3/5]

float eVision::Legacy::EFrame::Distance ( const eVision::Legacy::ECircle & circle,
bool arcOnly ) const
virtual

Returns the distance between the addressed point and the center of EFrame object.

Parameters
circleECircle object with which to calculate the distance.
arcOnlyBy default (false), the circle is not restricted to an arc.

Many EasyGauge members provide measurement result as a EPoint object (see EPointGauge::SetCenter, EPointGauge::GetMeasuredPoint,...). The EFrame class has its own members to retrieve all the information pertaining to a point. Among them, the Distance method returns the distance between a point pair or between a point and a line segment, a circle arc or a rectangle.

◆ Distance() [4/5]

float eVision::Legacy::EFrame::Distance ( const eVision::Legacy::ELine & line) const
virtual

Returns the distance between the addressed point and the center of EFrame object.

Parameters
lineELine object with which to calculate the distance.

Many EasyGauge members provide measurement result as a EPoint object (see EPointGauge::SetCenter, EPointGauge::GetMeasuredPoint,...). The EFrame class has its own members to retrieve all the information pertaining to a point. Among them, the Distance method returns the distance between a point pair or between a point and a line segment, a circle arc or a rectangle.

◆ Distance() [5/5]

float eVision::Legacy::EFrame::Distance ( const eVision::Legacy::ELine & line,
bool segmentOnly ) const
virtual

Returns the distance between the addressed point and the center of EFrame object.

Parameters
lineELine object with which to calculate the distance.
segmentOnlyBy default (false), the line is not restricted to a segment.

Many EasyGauge members provide measurement result as a EPoint object (see EPointGauge::SetCenter, EPointGauge::GetMeasuredPoint,...). The EFrame class has its own members to retrieve all the information pertaining to a point. Among them, the Distance method returns the distance between a point pair or between a point and a line segment, a circle arc or a rectangle.

◆ Dot()

float eVision::Legacy::EFrame::Dot ( const eVision::EPoint & Point) const

Compute the dot product of the centers of two EFrame objects.

Parameters
PointSecond factor of the dot product.

◆ GetAngle()

float eVision::Legacy::EFrame::GetAngle ( ) const

Orientation of the frame.

◆ GetCenter()

eVision::EPoint eVision::Legacy::EFrame::GetCenter ( ) const
virtual

Center.

◆ GetCenterX()

float eVision::Legacy::EFrame::GetCenterX ( ) const

Abscissa of the origin point of the frame.

◆ GetCenterY()

float eVision::Legacy::EFrame::GetCenterY ( ) const

Ordinate of the origin point of the frame.

◆ GetScale()

float eVision::Legacy::EFrame::GetScale ( ) const

Horizontal sensor resolution, in pixels per unit.

◆ GetX()

float eVision::Legacy::EFrame::GetX ( ) const

Abscissa (X coordinate) of the EFrame object.

◆ GetY()

float eVision::Legacy::EFrame::GetY ( ) const

Ordinate (Y coordinate) of the EFrame object.

◆ GlobalToLocal() [1/2]

eVision::EPoint eVision::Legacy::EFrame::GlobalToLocal ( const eVision::EPoint & global) const

Transforms a geometrical element from global to local coordinates (world to local).

Parameters
globalThe element, expressed in global coordinates.

◆ GlobalToLocal() [2/2]

eVision::Legacy::EFrame eVision::Legacy::EFrame::GlobalToLocal ( const eVision::Legacy::EFrame & global) const

Transforms a geometrical element from global to local coordinates (world to local).

Parameters
globalThe element, expressed in global coordinates.

◆ Load() [1/2]

void eVision::Legacy::EFrame::Load ( const std::string & path)

Load the EFrame configuration. The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ Load() [2/2]

void eVision::Legacy::EFrame::Load ( eVision::ESerializer * serializer)

Load the EFrame configuration. The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ LocalToGlobal() [1/4]

eVision::EPoint eVision::Legacy::EFrame::LocalToGlobal ( const eVision::EPoint & local) const

Transforms a geometrical element from local to global coordinates (local to world).

Parameters
localThe element, expressed in local coordinates.

◆ LocalToGlobal() [2/4]

eVision::Legacy::ECircle eVision::Legacy::EFrame::LocalToGlobal ( const eVision::Legacy::ECircle & local) const

Transforms a geometrical element from local to global coordinates (local to world).

Parameters
localThe element, expressed in local coordinates.

◆ LocalToGlobal() [3/4]

eVision::Legacy::EFrame eVision::Legacy::EFrame::LocalToGlobal ( const eVision::Legacy::EFrame & local) const

Transforms a geometrical element from local to global coordinates (local to world).

Parameters
localThe element, expressed in local coordinates.

◆ LocalToGlobal() [4/4]

eVision::Legacy::ELine eVision::Legacy::EFrame::LocalToGlobal ( const eVision::Legacy::ELine & local) const

Transforms a geometrical element from local to global coordinates (local to world).

Parameters
localThe element, expressed in local coordinates.

◆ MidPoint()

eVision::EPoint eVision::Legacy::EFrame::MidPoint ( const eVision::EPoint & Point) const

Returns the middle coordinate between this EFrame object's center and another EFrame object's center.

Parameters
PointThe other point.

◆ Modulus()

float eVision::Legacy::EFrame::Modulus ( ) const

Compute the euclidean modulus of the center of a EFrame.

Compute the squared root of the sum of the squared coordinates of an EFrame. If the axis frame is orthogonal, this number is also the euclidean norm of the EFrame.

◆ Move()

eVision::EPoint eVision::Legacy::EFrame::Move ( float angle,
float distance ) const

Return the position by moving the center along angle by distance.

Parameters
angleThe direction of the displacement, in radians.
distanceThe distance of the displacement.

◆ operator!=()

bool eVision::Legacy::EFrame::operator!= ( const eVision::Legacy::EFrame & frame) const

Compares the current EFrame center coordinates with the center coordinates of another EFrame object.

Parameters
frameThe other EFrame object.

Returns true if EFrame::GetX or EFrame::GetY are respectively different.

Deprecated

Compare EFrame::SetCenter instead.

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

◆ operator*()

eVision::EPoint eVision::Legacy::EFrame::operator* ( float scalar) const

Returns the multiplication of the center of the EFrame with the given multiplier.

Parameters
scalarThe multiplier.
Deprecated

Use EFrame::SetCenter * scalar instead.

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

◆ operator+()

eVision::EPoint eVision::Legacy::EFrame::operator+ ( const eVision::EPoint & point) const

Returns the addition of the point to the center of the EFrame.

Parameters
pointA point.
Deprecated

Use EFrame::SetCenter + point instead.

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

◆ operator-()

eVision::EPoint eVision::Legacy::EFrame::operator- ( const eVision::EPoint & point) const

Returns the substraction of the center of the EFrame with the given point.

Parameters
pointA point.
Deprecated

Use EFrame::SetCenter - point instead.

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

◆ operator/()

eVision::EPoint eVision::Legacy::EFrame::operator/ ( float scalar) const

Returns the division of the center of the EFrame with the given divisor.

Parameters
scalarThe divisor.
Deprecated

Use EFrame::SetCenter / scalar instead.

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

◆ operator=()

eVision::Legacy::EFrame & eVision::Legacy::EFrame::operator= ( const eVision::Legacy::EFrame & frame)

Copies all the data from another EFrame object into the current EFrame object.

Parameters
frameEFrame object to be copied.

◆ operator==()

bool eVision::Legacy::EFrame::operator== ( const eVision::Legacy::EFrame & frame) const

Compares the current EFrame center coordinates with the center coordinates of another EFrame object.

Parameters
frameThe other EFrame object.

Returns true if both EFrame::GetX and EFrame::GetY are respectively the same.

Deprecated

Compare EFrame::SetCenter instead.

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

◆ Project() [1/2]

eVision::EPoint eVision::Legacy::EFrame::Project ( const eVision::Legacy::ECircle & shape) const

Compute the orthogonal projection of the center of a EFrame on another shape.

Parameters
shapeShape object to which point is projected

Compute the orthogonal projection of a EFrame on another shape. This computation is only valid when the axis frame is orthogonal.

◆ Project() [2/2]

eVision::EPoint eVision::Legacy::EFrame::Project ( const eVision::Legacy::ELine & shape) const

Compute the orthogonal projection of the center of a EFrame on another shape.

Parameters
shapeShape object to which point is projected

Compute the orthogonal projection of a EFrame on another shape. This computation is only valid when the axis frame is orthogonal.

◆ Rotate()

eVision::EPoint eVision::Legacy::EFrame::Rotate ( float angle) const

Returns another EPoint object containing the coordinates of the rotated center point.

Parameters
angleRotation angle (in radians)

Rotates a EFrame around the origin (0, 0) by an angle of angle radians. By definition, the smallest (in absolute value) rotation of the oriented X-Axis toward the oriented Y-Axis is chosen as the positive sense of rotation. In a direct frame, this is also the trigonometric sense (counter clockwise).

◆ Save() [1/2]

void eVision::Legacy::EFrame::Save ( const std::string & path)

Save the EFrame configuration. The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ Save() [2/2]

void eVision::Legacy::EFrame::Save ( eVision::ESerializer * serializer)

Save the EFrame configuration. The given ESerializer must have been created for writing.

Parameters
serializerThe serializer.

◆ SetAngle()

void eVision::Legacy::EFrame::SetAngle ( float angle)

Orientation of the frame.

Parameters
angleRotation angle of the frame. The default value is 0.

◆ SetCenter()

void eVision::Legacy::EFrame::SetCenter ( const eVision::EPoint & center)
virtual

Center coordinates of a EFrame object.

◆ SetCenterXY()

void eVision::Legacy::EFrame::SetCenterXY ( float centerX,
float centerY )

Sets the center coordinates of a EFrame object.

Parameters
centerXCenter coordinates of the origin.
centerYCenter coordinates of the origin.

◆ SetScale()

void eVision::Legacy::EFrame::SetScale ( float scale)

Horizontal sensor resolution, in pixels per unit.

Parameters
scaleNew value for the property.

◆ SetX()

void eVision::Legacy::EFrame::SetX ( float value)

Abscissa (X coordinate) of the EFrame object.

◆ SetY()

void eVision::Legacy::EFrame::SetY ( float value)

Ordinate (Y coordinate) of the EFrame object.

◆ Square()

float eVision::Legacy::EFrame::Square ( ) const

Compute the sum of the squared coordinates of the center of a EFrame.

Compute the sum of the squared coordinates of a EFrame. If the axis frame is orthogonal, this sum of squares is also the squared euclidean norm of the EFrame object.

◆ SquaredDistance()

float eVision::Legacy::EFrame::SquaredDistance ( const eVision::EPoint & Point) const

Compute the squared distance between the centers of two EFrame.

Parameters
PointSecond EFrame.

Compute the sum of squared coordinates differences of two EFrame. If the axis frame is orthogonal, this number is also the squared euclidean distance between two EFrame.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::Legacy::EFrame::wrappedClass_