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

Represents a model of a circle (or arc) in EasyGauge. More...

#include <eVision/Easy/ECircle.h>

Inheritance diagram for eVision::ECircle:
Collaboration diagram for eVision::ECircle:

Public Member Functions

 ECircle ()
 Constructs a ECircle object.
 ECircle (const eVision::EPoint &center, float diameter, float originAngle, bool direct)
 Constructs a ECircle object.
 ECircle (const eVision::EPoint &center, float diameter, float originAngle)
 Constructs a ECircle object.
 ECircle (const eVision::EPoint &center, float diameter)
 Constructs a ECircle object.
 ECircle (const eVision::EPoint &center, const eVision::EPoint &origin, bool direct)
 Constructs a ECircle object.
 ECircle (const eVision::EPoint &center, const eVision::EPoint &origin)
 Constructs a ECircle object.
 ECircle (const eVision::EPoint &center, float diameter, float originAngle, float amplitude)
 Constructs a ECircle object.
 ECircle (const eVision::EPoint &origin, const eVision::EPoint &middle, const eVision::EPoint &end, bool fullCircle)
 Constructs a ECircle object.
 ECircle (const eVision::EPoint &origin, const eVision::EPoint &middle, const eVision::EPoint &end)
 Constructs a ECircle object.
 ECircle (const eVision::ECircle &other)
 Constructs a ECircle object.
 ECircle (const eVision::Legacy::ECircle &other)
 Constructs a ECircle object.
virtual ~ECircle () throw ()
eVision::ECircle & operator= (const eVision::ECircle &other)
 Copies all the data from another ECircle object into the current ECircle object.
void SetCenter (const eVision::EPoint &center)
 Center of the ECircle.
eVision::EPoint GetCenter () const
 Center of the ECircle.
float GetCenterX () const
 Abscissa of the center of the ECircle.
void SetCenterX (float centerX)
 Abscissa of the center of the ECircle.
float GetCenterY () const
 Ordinate of the the center of the ECircle.
void SetCenterY (float centerY)
 Ordinate of the the center of the ECircle.
float GetAngle () const
 Starting orientation of the ECircle.
void SetAngle (float angle)
 Starting orientation of the ECircle.
void SetFromCenterAndOrigin (const eVision::EPoint &center, const eVision::EPoint &origin, bool direct)
 Sets the geometric parameters (nominal position and diameter, angular position and amplitude) of an ECircle object.
void SetFromCenterAndOrigin (const eVision::EPoint &center, const eVision::EPoint &origin)
 Sets the geometric parameters (nominal position and diameter, angular position and amplitude) of an ECircle object.
void SetFromOriginMiddleEnd (const eVision::EPoint &origin, const eVision::EPoint &middle, const eVision::EPoint &end, bool fullCircle)
 Sets the geometric parameters (nominal position and diameter, angular position and amplitude) of an ECircle object.
void SetFromOriginMiddleEnd (const eVision::EPoint &origin, const eVision::EPoint &middle, const eVision::EPoint &end)
 Sets the geometric parameters (nominal position and diameter, angular position and amplitude) of an ECircle object.
float GetRadius () const
 Radius of a ECircle object.
void SetRadius (float f32Radius)
 Radius of a ECircle object.
float GetDiameter () const
 Diameter of a ECircle object.
void SetDiameter (float f32Diameter)
 Diameter of a ECircle object.
float GetArcLength () const
 Circle arc length of a ECircle object.
float GetOrgAngle () const
 Angular position from where the ECircle object extents.
float GetApexAngle () const
 Angular position at the apex of a ECircle object.
float GetEndAngle () const
 Angular position of the end of a ECircle object.
eVision::EPoint GetOrg () const
 Origin point coordinates of a ECircle object.
eVision::EPoint GetApex () const
 Apex point coordinates of a ECircle object.
eVision::EPoint GetEnd () const
 End point coordinates of a ECircle object.
eVision::EPoint GetPoint (float fraction) const
 Returns the coordinates of a particular point specified by its location along the circle arc.
bool GetFull () const
 Flag indicating whether the ECircle object is a full circle or not.
bool IsDirect () const
 Flag indicating whether positive angles correspond to a clockwise or an anticlockwise rotation.
float GetAmplitude () const
 Angular amplitude of the ECircle object.
void SetAmplitude (float amplitude)
 Angular amplitude of the ECircle object.
float Distance (const eVision::ECircle &circle) const
 Returns the smallest distance between this ECircle object an another ECircle.
virtual eVision::EEditionMode GetAvailableEditionModes () const
 Available edition modes for the shape.
virtual std::string GetDescription () const
 Textual description of the shape and its parameters.
 ECircle (CppWrapperInternal::InternalConstructor)
Public Member Functions inherited from eVision::EShape
virtual ~EShape () throw ()
void Load (const std::string &path)
 Load the EShape configuration. The given ESerializer must have been created for reading.
void Load (eVision::ESerializer *serializer)
 Load the EShape configuration. The given ESerializer must have been created for reading.
void Save (const std::string &path)
 Save the EShape configuration. The given ESerializer must have been created for writing.
void Save (eVision::ESerializer *serializer)
 Save the EShape configuration. The given ESerializer must have been created for writing.
void Draw (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY, float panX, float panY, bool drawDiagonals) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY, float panX, float panY) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY, float panX) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, float zoomX) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY, bool drawDiagonals) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float zoomX, float zoomY, float panX) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float zoomX, float zoomY) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float zoomX) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame) const
 Draws the EShape shape.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX, float zoomY, float panX, float panY)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX, float zoomY, float panX)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX, float zoomY)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX)
 Detects if the cursor is placed over one of the dragging handles.
void Drag (int32_t x, int32_t y, float zoomX, float zoomY, float panX, float panY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, float zoomX, float zoomY, float panX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void SetEditionMode (eVision::EEditionMode modes)
 Current edition mode for the shape. Default: EEditionMode_None.
eVision::EEditionMode GetEditionMode () const
 Current edition mode for the shape. Default: EEditionMode_None.
eVision::EFrame ToFrame (bool useAngle, eVision::EFrameScaling frameScaling) const
 Converts the shape to a frame.
eVision::EFrame ToFrame (bool useAngle, eVision::EFrameScaling frameScaling, const eVision::EFrame &shapeFrame) const
 Converts the shape to a frame.
 EShape (CppWrapperInternal::InternalConstructor)

Static Public Member Functions

static eVision::EPoint GetProjectionOfPointOnCircle (const eVision::EPoint &pt, const eVision::ECircle &circle, bool limited)
 Computes the projection of a point on a circle.
static eVision::EPoint GetProjectionOfPointOnCircle (const eVision::EPoint &pt, const eVision::ECircle &circle)
 Computes the projection of a point on a circle.
static float GetDistanceBetweenPointAndCircle (const eVision::EPoint &pt, const eVision::ECircle &circle, bool limited)
 Computes the distance between a point and a circle.
static float GetDistanceBetweenPointAndCircle (const eVision::EPoint &pt, const eVision::ECircle &circle)
 Computes the distance between a point and a circle.
static float GetDistanceBetweenLineAndCircle (const eVision::ELine &line, const eVision::ECircle &circle, bool limited)
 Computes the distance between a line and a circle.
static float GetDistanceBetweenLineAndCircle (const eVision::ELine &line, const eVision::ECircle &circle)
 Computes the distance between a line and a circle.
static int32_t GetIntersectionOfLineAndCircle (const eVision::ELine &line, const eVision::ECircle &circle, eVision::EPoint &intersection1, eVision::EPoint &intersection2, bool limited)
 Computes the intersections between a line and circle. Returns the number of intersections and stores the found intersections in the provided point parameters.
static int32_t GetIntersectionOfLineAndCircle (const eVision::ELine &line, const eVision::ECircle &circle, eVision::EPoint &intersection1, eVision::EPoint &intersection2)
 Computes the intersections between a line and circle. Returns the number of intersections and stores the found intersections in the provided point parameters.
static int32_t GetIntersectionOfCircles (const eVision::ECircle &circle1, const eVision::ECircle &circle2, eVision::EPoint &intersection1, eVision::EPoint &intersection2, bool limited)
 Computes the intersections between two circles. Returns the number of intersections and stores the found intersections in the provided point parameters.
static int32_t GetIntersectionOfCircles (const eVision::ECircle &circle1, const eVision::ECircle &circle2, eVision::EPoint &intersection1, eVision::EPoint &intersection2)
 Computes the intersections between two circles. Returns the number of intersections and stores the found intersections in the provided point parameters.
static eVision::ECircle Fit (const std::vector< eVision::EPoint > &points, bool fitArc, uint32_t numFilteringPasses, float filteringThreshold)
 Fits an ECircle to a set of points.
static eVision::ECircle Fit (const std::vector< eVision::EPoint > &points, bool fitArc, uint32_t numFilteringPasses)
 Fits an ECircle to a set of points.
static eVision::ECircle Fit (const std::vector< eVision::EPoint > &points, bool fitArc)
 Fits an ECircle to a set of points.
static eVision::ECircle Fit (const std::vector< eVision::EPoint > &points)
 Fits an ECircle to a set of points.

Additional Inherited Members

Public Attributes inherited from eVision::EShape
CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Represents a model of a circle (or arc) in EasyGauge.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ ECircle() [1/12]

eVision::ECircle::ECircle ( )

Constructs a ECircle object.

◆ ECircle() [2/12]

eVision::ECircle::ECircle ( const eVision::EPoint & center,
float diameter,
float originAngle,
bool direct )

Constructs a ECircle object.

Parameters
centerCenter coordinates of the circle at its nominal position. The default value is (0,0).
diameterNominal diameter of the circle. The default value is 100.
originAngleNominal angular origin of the circle. The default value is 0.
directtrue (default) means that angles increase anticlockwisely in a direct coordinate system.

◆ ECircle() [3/12]

eVision::ECircle::ECircle ( const eVision::EPoint & center,
float diameter,
float originAngle )

Constructs a ECircle object.

Parameters
centerCenter coordinates of the circle at its nominal position. The default value is (0,0).
diameterNominal diameter of the circle. The default value is 100.
originAngleNominal angular origin of the circle. The default value is 0.

◆ ECircle() [4/12]

eVision::ECircle::ECircle ( const eVision::EPoint & center,
float diameter )

Constructs a ECircle object.

Parameters
centerCenter coordinates of the circle at its nominal position. The default value is (0,0).
diameterNominal diameter of the circle. The default value is 100.

◆ ECircle() [5/12]

eVision::ECircle::ECircle ( const eVision::EPoint & center,
const eVision::EPoint & origin,
bool direct )

Constructs a ECircle object.

Parameters
centerCenter coordinates of the circle at its nominal position. The default value is (0,0).
originOrigin point coordinates of the circle.
directtrue (default) means that angles increase anticlockwisely in a direct coordinate system.

◆ ECircle() [6/12]

eVision::ECircle::ECircle ( const eVision::EPoint & center,
const eVision::EPoint & origin )

Constructs a ECircle object.

Parameters
centerCenter coordinates of the circle at its nominal position. The default value is (0,0).
originOrigin point coordinates of the circle.

◆ ECircle() [7/12]

eVision::ECircle::ECircle ( const eVision::EPoint & center,
float diameter,
float originAngle,
float amplitude )

Constructs a ECircle object.

Parameters
centerCenter coordinates of the circle at its nominal position. The default value is (0,0).
diameterNominal diameter of the circle. The default value is 100.
originAngleNominal angular origin of the circle. The default value is 0.
amplitudeNominal angular amplitude of the circle. The default value is 360.

◆ ECircle() [8/12]

eVision::ECircle::ECircle ( const eVision::EPoint & origin,
const eVision::EPoint & middle,
const eVision::EPoint & end,
bool fullCircle )

Constructs a ECircle object.

Parameters
originOrigin point coordinates of the circle.
middleMiddle point coordinates of the circle.
endEnd point coordinates of the circle.
fullCircletrue (default) in case of a full turn circle. If fullCircle is false, origin and end give the circle's amplitude.

◆ ECircle() [9/12]

eVision::ECircle::ECircle ( const eVision::EPoint & origin,
const eVision::EPoint & middle,
const eVision::EPoint & end )

Constructs a ECircle object.

Parameters
originOrigin point coordinates of the circle.
middleMiddle point coordinates of the circle.
endEnd point coordinates of the circle.

◆ ECircle() [10/12]

eVision::ECircle::ECircle ( const eVision::ECircle & other)

Constructs a ECircle object.

Parameters
otherAnother ECircle object to be copied in the new ECircle object.

◆ ECircle() [11/12]

eVision::ECircle::ECircle ( const eVision::Legacy::ECircle & other)

Constructs a ECircle object.

Parameters
otherAnother ECircle object to be copied in the new ECircle object.

◆ ~ECircle()

eVision::ECircle::~ECircle ( )
throw ( )
virtual

◆ ECircle() [12/12]

eVision::ECircle::ECircle ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ Distance()

float eVision::ECircle::Distance ( const eVision::ECircle & circle) const

Returns the smallest distance between this ECircle object an another ECircle.

Parameters
circleThe other circle

◆ Fit() [1/4]

eVision::ECircle eVision::ECircle::Fit ( const std::vector< eVision::EPoint > & points)
static

Fits an ECircle to a set of points.

Parameters
pointsVector of points to fit.

The algorithm used here is the same as the one used in ECircleGauge::Measure.

During a filtering pass, the points that are too distant from the model are discarded. During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

This method returns a "direct" ECircle, see ECircle::IsDirect.

◆ Fit() [2/4]

eVision::ECircle eVision::ECircle::Fit ( const std::vector< eVision::EPoint > & points,
bool fitArc )
static

Fits an ECircle to a set of points.

Parameters
pointsVector of points to fit.
fitArcIf true, a circle arc big enough to be close to all points will be returned instead of a full circle. Defaults to false.

The algorithm used here is the same as the one used in ECircleGauge::Measure.

During a filtering pass, the points that are too distant from the model are discarded. During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

This method returns a "direct" ECircle, see ECircle::IsDirect.

◆ Fit() [3/4]

eVision::ECircle eVision::ECircle::Fit ( const std::vector< eVision::EPoint > & points,
bool fitArc,
uint32_t numFilteringPasses )
static

Fits an ECircle to a set of points.

Parameters
pointsVector of points to fit.
fitArcIf true, a circle arc big enough to be close to all points will be returned instead of a full circle. Defaults to false.
numFilteringPassesNumber of filtering passes for a circle fitting operation. Defaults to 0 (no filtering performed).

The algorithm used here is the same as the one used in ECircleGauge::Measure.

During a filtering pass, the points that are too distant from the model are discarded. During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

This method returns a "direct" ECircle, see ECircle::IsDirect.

◆ Fit() [4/4]

eVision::ECircle eVision::ECircle::Fit ( const std::vector< eVision::EPoint > & points,
bool fitArc,
uint32_t numFilteringPasses,
float filteringThreshold )
static

Fits an ECircle to a set of points.

Parameters
pointsVector of points to fit.
fitArcIf true, a circle arc big enough to be close to all points will be returned instead of a full circle. Defaults to false.
numFilteringPassesNumber of filtering passes for a circle fitting operation. Defaults to 0 (no filtering performed).
filteringThresholdRelative filtering threshold, that is the fraction of the average distance between the points and the fitted model above which a point is filtered out. Defaults to 3.

The algorithm used here is the same as the one used in ECircleGauge::Measure.

During a filtering pass, the points that are too distant from the model are discarded. During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

This method returns a "direct" ECircle, see ECircle::IsDirect.

◆ GetAmplitude()

float eVision::ECircle::GetAmplitude ( ) const

Angular amplitude of the ECircle object.

The default value is 360. A ECircle object is fully defined knowing its nominal position (its center coordinates), its nominal radius (diameter), the angular position from where it extents, its angular amplitude, and its outline tolerance. The sign of the rotation angle depends whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ GetAngle()

float eVision::ECircle::GetAngle ( ) const

Starting orientation of the ECircle.

◆ GetApex()

eVision::EPoint eVision::ECircle::GetApex ( ) const

Apex point coordinates of a ECircle object.

◆ GetApexAngle()

float eVision::ECircle::GetApexAngle ( ) const

Angular position at the apex of a ECircle object.

A ECircle object is fully defined knowing its nominal position (its center coordinates), its nominal radius (diameter), the angular position from where it extents, its angular amplitude, and its outline tolerance. The sign of the rotation angle depends whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ GetArcLength()

float eVision::ECircle::GetArcLength ( ) const

Circle arc length of a ECircle object.

A ECircle object is fully defined knowing its nominal position (its center coordinates), its nominal radius (diameter), the angular position from where it extents, its angular amplitude, and its outline tolerance.

◆ GetAvailableEditionModes()

eVision::EEditionMode eVision::ECircle::GetAvailableEditionModes ( ) const
virtual

Available edition modes for the shape.

Implements eVision::EShape.

◆ GetCenter()

eVision::EPoint eVision::ECircle::GetCenter ( ) const

Center of the ECircle.

◆ GetCenterX()

float eVision::ECircle::GetCenterX ( ) const

Abscissa of the center of the ECircle.

◆ GetCenterY()

float eVision::ECircle::GetCenterY ( ) const

Ordinate of the the center of the ECircle.

◆ GetDescription()

std::string eVision::ECircle::GetDescription ( ) const
virtual

Textual description of the shape and its parameters.

Implements eVision::EShape.

◆ GetDiameter()

float eVision::ECircle::GetDiameter ( ) const

Diameter of a ECircle object.

A ECircle object is fully defined knowing its nominal position (its center coordinates), its nominal radius (diameter), the angular position from where it extents, its angular amplitude, and its outline tolerance. By default, the diameter is 100, which means 100 pixels when the field of view is not calibrated, and 100 physical units in case of a calibrated field of view.

◆ GetDistanceBetweenLineAndCircle() [1/2]

float eVision::ECircle::GetDistanceBetweenLineAndCircle ( const eVision::ELine & line,
const eVision::ECircle & circle )
static

Computes the distance between a line and a circle.

Parameters
lineThe line.
circleThe circle.

◆ GetDistanceBetweenLineAndCircle() [2/2]

float eVision::ECircle::GetDistanceBetweenLineAndCircle ( const eVision::ELine & line,
const eVision::ECircle & circle,
bool limited )
static

Computes the distance between a line and a circle.

Parameters
lineThe line.
circleThe circle.
limitedIndicates if the line and circle parameters should be considered as infinite lines and full circles or as a segments and arcs.

◆ GetDistanceBetweenPointAndCircle() [1/2]

float eVision::ECircle::GetDistanceBetweenPointAndCircle ( const eVision::EPoint & pt,
const eVision::ECircle & circle )
static

Computes the distance between a point and a circle.

Parameters
ptThe point.
circleThe circle.

When the circle is restricted to an arc and the orthogonal projection of the point onto the circle falls outside this arc, the distance to the closest endpoint of the arc is returned instead.

◆ GetDistanceBetweenPointAndCircle() [2/2]

float eVision::ECircle::GetDistanceBetweenPointAndCircle ( const eVision::EPoint & pt,
const eVision::ECircle & circle,
bool limited )
static

Computes the distance between a point and a circle.

Parameters
ptThe point.
circleThe circle.
limitedIndicates if the circle parameter should be considered as a full circle or as an arc.

When the circle is restricted to an arc and the orthogonal projection of the point onto the circle falls outside this arc, the distance to the closest endpoint of the arc is returned instead.

◆ GetEnd()

eVision::EPoint eVision::ECircle::GetEnd ( ) const

End point coordinates of a ECircle object.

◆ GetEndAngle()

float eVision::ECircle::GetEndAngle ( ) const

Angular position of the end of a ECircle object.

A ECircle object is fully defined knowing its nominal position (its center coordinates), its nominal radius (diameter), the angular position from where it extents, its angular amplitude, and its outline tolerance. The sign of the rotation angle depends whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ GetFull()

bool eVision::ECircle::GetFull ( ) const

Flag indicating whether the ECircle object is a full circle or not.

By default (true), the ECircle object is a full circle.

◆ GetIntersectionOfCircles() [1/2]

int32_t eVision::ECircle::GetIntersectionOfCircles ( const eVision::ECircle & circle1,
const eVision::ECircle & circle2,
eVision::EPoint & intersection1,
eVision::EPoint & intersection2 )
static

Computes the intersections between two circles. Returns the number of intersections and stores the found intersections in the provided point parameters.

Parameters
circle1The first circle
circle2The second circle
intersection1The first intersection
intersection2The second intersection

The function returns the number of intersections found. It will return -1 if the two circles are overlapping.

◆ GetIntersectionOfCircles() [2/2]

int32_t eVision::ECircle::GetIntersectionOfCircles ( const eVision::ECircle & circle1,
const eVision::ECircle & circle2,
eVision::EPoint & intersection1,
eVision::EPoint & intersection2,
bool limited )
static

Computes the intersections between two circles. Returns the number of intersections and stores the found intersections in the provided point parameters.

Parameters
circle1The first circle
circle2The second circle
intersection1The first intersection
intersection2The second intersection
limitedIndicates if the circle parameters should be considered as full circles or as arcs.

The function returns the number of intersections found. It will return -1 if the two circles are overlapping.

◆ GetIntersectionOfLineAndCircle() [1/2]

int32_t eVision::ECircle::GetIntersectionOfLineAndCircle ( const eVision::ELine & line,
const eVision::ECircle & circle,
eVision::EPoint & intersection1,
eVision::EPoint & intersection2 )
static

Computes the intersections between a line and circle. Returns the number of intersections and stores the found intersections in the provided point parameters.

Parameters
lineThe line
circleThe circle
intersection1The first intersection
intersection2The second intersection

The function returns the number of intersections found.

◆ GetIntersectionOfLineAndCircle() [2/2]

int32_t eVision::ECircle::GetIntersectionOfLineAndCircle ( const eVision::ELine & line,
const eVision::ECircle & circle,
eVision::EPoint & intersection1,
eVision::EPoint & intersection2,
bool limited )
static

Computes the intersections between a line and circle. Returns the number of intersections and stores the found intersections in the provided point parameters.

Parameters
lineThe line
circleThe circle
intersection1The first intersection
intersection2The second intersection
limitedIndicates if the line and circle parameters should be considered as infinite lines and full circles or as a segments and arcs.

The function returns the number of intersections found.

◆ GetOrg()

eVision::EPoint eVision::ECircle::GetOrg ( ) const

Origin point coordinates of a ECircle object.

◆ GetOrgAngle()

float eVision::ECircle::GetOrgAngle ( ) const

Angular position from where the ECircle object extents.

A ECircle object is fully defined knowing its nominal position (its center coordinates), its nominal radius (diameter), the angular position from where it extents, its angular amplitude, and its outline tolerance. The sign of the rotation angle depends whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ GetPoint()

eVision::EPoint eVision::ECircle::GetPoint ( float fraction) const

Returns the coordinates of a particular point specified by its location along the circle arc.

Parameters
fractionPoint location expressed as a fraction of the circle arc (range [-1, +1]).

◆ GetProjectionOfPointOnCircle() [1/2]

eVision::EPoint eVision::ECircle::GetProjectionOfPointOnCircle ( const eVision::EPoint & pt,
const eVision::ECircle & circle )
static

Computes the projection of a point on a circle.

Parameters
ptThe point.
circleThe circle.

When the circle is restricted to an arc and the orthogonal projection of the point onto the circle falls outside this arc, the closest endpoint of the arc is returned instead.

◆ GetProjectionOfPointOnCircle() [2/2]

eVision::EPoint eVision::ECircle::GetProjectionOfPointOnCircle ( const eVision::EPoint & pt,
const eVision::ECircle & circle,
bool limited )
static

Computes the projection of a point on a circle.

Parameters
ptThe point.
circleThe circle.
limitedIndicates if the circle parameter should be considered as a full circle or as an arc.

When the circle is restricted to an arc and the orthogonal projection of the point onto the circle falls outside this arc, the closest endpoint of the arc is returned instead.

◆ GetRadius()

float eVision::ECircle::GetRadius ( ) const

Radius of a ECircle object.

A ECircle object is fully defined knowing its nominal position (its center coordinates), its nominal radius (diameter), the angular position from where it extents, its angular amplitude, and its outline tolerance. By default, the radius is 50, which means 50 pixels when the field of view is not calibrated, and 50 physical units in case of a calibrated field of view.

◆ IsDirect()

bool eVision::ECircle::IsDirect ( ) const

Flag indicating whether positive angles correspond to a clockwise or an anticlockwise rotation.

true (default) means that angles increase anticlockwisely in a direct coordinate system, and clockwisely in an inverse coordinate system.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards.

◆ operator=()

eVision::ECircle & eVision::ECircle::operator= ( const eVision::ECircle & other)

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

Parameters
otherECircle object to be copied

◆ SetAmplitude()

void eVision::ECircle::SetAmplitude ( float amplitude)

Angular amplitude of the ECircle object.

The default value is 360. A ECircle object is fully defined knowing its nominal position (its center coordinates), its nominal radius (diameter), the angular position from where it extents, its angular amplitude, and its outline tolerance. The sign of the rotation angle depends whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ SetAngle()

void eVision::ECircle::SetAngle ( float angle)

Starting orientation of the ECircle.

Parameters
angleNew starting orientation of the ECircle.

◆ SetCenter()

void eVision::ECircle::SetCenter ( const eVision::EPoint & center)

Center of the ECircle.

Parameters
centerNew center of the ECircle.

◆ SetCenterX()

void eVision::ECircle::SetCenterX ( float centerX)

Abscissa of the center of the ECircle.

Parameters
centerXX coordinate of the center of the ECircle.

◆ SetCenterY()

void eVision::ECircle::SetCenterY ( float centerY)

Ordinate of the the center of the ECircle.

Parameters
centerYY coordinate of the center of the ECircle.

◆ SetDiameter()

void eVision::ECircle::SetDiameter ( float f32Diameter)

Diameter of a ECircle object.

A ECircle object is fully defined knowing its nominal position (its center coordinates), its nominal radius (diameter), the angular position from where it extents, its angular amplitude, and its outline tolerance. By default, the diameter is 100, which means 100 pixels when the field of view is not calibrated, and 100 physical units in case of a calibrated field of view.

◆ SetFromCenterAndOrigin() [1/2]

void eVision::ECircle::SetFromCenterAndOrigin ( const eVision::EPoint & center,
const eVision::EPoint & origin )

Sets the geometric parameters (nominal position and diameter, angular position and amplitude) of an ECircle object.

Parameters
centerCenter coordinates of the circle at its nominal position. The default value is (0,0).
originOrigin point coordinates of the circle.

◆ SetFromCenterAndOrigin() [2/2]

void eVision::ECircle::SetFromCenterAndOrigin ( const eVision::EPoint & center,
const eVision::EPoint & origin,
bool direct )

Sets the geometric parameters (nominal position and diameter, angular position and amplitude) of an ECircle object.

Parameters
centerCenter coordinates of the circle at its nominal position. The default value is (0,0).
originOrigin point coordinates of the circle.
directtrue (default) means that angles increase anticlockwisely in a direct coordinate system.

◆ SetFromOriginMiddleEnd() [1/2]

void eVision::ECircle::SetFromOriginMiddleEnd ( const eVision::EPoint & origin,
const eVision::EPoint & middle,
const eVision::EPoint & end )

Sets the geometric parameters (nominal position and diameter, angular position and amplitude) of an ECircle object.

Parameters
originOrigin of the circle Arc.
middleMiddle of the circle Arc.
endEnd of the circle Arc.

For example, for a calibrated circle centered on the origin with a radius of 1, whose arc length is 180° and origin angle 0°: Its origin is (1, 0), its middle (0, 1) and its end (-1, 0).

◆ SetFromOriginMiddleEnd() [2/2]

void eVision::ECircle::SetFromOriginMiddleEnd ( const eVision::EPoint & origin,
const eVision::EPoint & middle,
const eVision::EPoint & end,
bool fullCircle )

Sets the geometric parameters (nominal position and diameter, angular position and amplitude) of an ECircle object.

Parameters
originOrigin of the circle Arc.
middleMiddle of the circle Arc.
endEnd of the circle Arc.
fullCircletrue (default) in case of a full turn circle. If fullCircle is false, origin and end give the circle's amplitude.

For example, for a calibrated circle centered on the origin with a radius of 1, whose arc length is 180° and origin angle 0°: Its origin is (1, 0), its middle (0, 1) and its end (-1, 0).

◆ SetRadius()

void eVision::ECircle::SetRadius ( float f32Radius)

Radius of a ECircle object.

A ECircle object is fully defined knowing its nominal position (its center coordinates), its nominal radius (diameter), the angular position from where it extents, its angular amplitude, and its outline tolerance. By default, the radius is 50, which means 50 pixels when the field of view is not calibrated, and 50 physical units in case of a calibrated field of view.