eVision Python API
Loading...
Searching...
No Matches
eVision.ELine Class Reference

Represents a model of a line segment. More...

Inheritance diagram for eVision.ELine:
Collaboration diagram for eVision.ELine:

Public Member Functions

None __init__ (self)
 Constructs a eVision.ELine object.
None __init__ (self, eVision.EPoint center, float length, float angle)
 Constructs a eVision.ELine object.
None __init__ (self, eVision.EPoint center, float length)
 Constructs a eVision.ELine object.
None __init__ (self, eVision.EPoint origin, eVision.EPoint end)
 Constructs a eVision.ELine object.
None __init__ (self, eVision.ELine other)
 Constructs a eVision.ELine object.
None __init__ (self, eVision.Legacy.ELine other)
 Constructs a eVision.ELine object.
None CopyTo (self, eVision.ELine other)
 Copy the eVision.ELine to other.
None SetFromOriginAndEnd (self, eVision.EPoint origin, eVision.EPoint end)
 Sets the geometric parameters (center coordinates, length, and rotation angle) of a eVision.ELine object.
eVision.EPoint GetPoint (self, float fraction)
 Returns the coordinates of a point along the line.
None Load (self, str path)
 Load the eVision.ELine configuration.
None Load (self, eVision.ESerializer|None serializer)
 Load the eVision.ELine configuration.
None Save (self, str path)
 Save the eVision.ELine configuration.
None Save (self, eVision.ESerializer|None serializer)
 Save the eVision.ELine configuration.
eVision.EPoint Center (self)
 Center of the line.
 Center (self, eVision.EPoint value)
 Center of the line.
float CenterX (self)
 Abscissa of the center of the eVision.ELine.
 CenterX (self, float value)
 Abscissa of the center of the eVision.ELine.
float CenterY (self)
 Ordinate of the center of the eVision.ELine.
 CenterY (self, float value)
 Ordinate of the center of the eVision.ELine.
float Angle (self)
 Orientation of the line.
 Angle (self, float value)
 Orientation of the line.
float Length (self)
 Length of the eVision.ELine object.
 Length (self, float value)
 Length of the eVision.ELine object.
eVision.EPoint Org (self)
 Origin point coordinates of the eVision.ELine object.
eVision.EPoint End (self)
 End point coordinates of the eVision.ELine object.
eVision.EEditionMode AvailableEditionModes (self)
 Available edition modes for the shape.
str Description (self)
 Textual description of the shape and its parameters.
Public Member Functions inherited from eVision.EShape
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY, float panX, float panY, bool drawDiagonals)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY, float panX, float panY)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY, float panX)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY, bool drawDiagonals)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX)
 Draws the eVision.EShape shape.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame)
 Draws the eVision.EShape shape.
eVision.EEditionMode HitTest (self, int x, int y, float zoomX, float zoomY, float panX, float panY)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, float zoomX, float zoomY, float panX)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, float zoomX, float zoomY)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, float zoomX)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, 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 (self, int x, int y, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, eVision.EFrame frame, float zoomX, float zoomY)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (self, int x, int y, eVision.EFrame frame, float zoomX)
 Detects if the cursor is placed over one of the dragging handles.
None Drag (self, int x, int 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.
None Drag (self, int x, int y, float zoomX, float zoomY, float panX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, 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.
None Drag (self, int x, int y, 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.
None Drag (self, int x, int y, eVision.EFrame frame, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, eVision.EFrame frame, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
None Drag (self, int x, int y, eVision.EFrame frame)
 Moves the specified handle to a new position and updates all placement parameters of the region.
eVision.EFrame ToFrame (self, bool useAngle, eVision.EFrameScaling frameScaling)
 Converts the shape to a frame.
eVision.EFrame ToFrame (self, bool useAngle, eVision.EFrameScaling frameScaling, eVision.EFrame shapeFrame)
 Converts the shape to a frame.
eVision.EEditionMode EditionMode (self)
 Current edition mode for the shape.
 EditionMode (self, eVision.EEditionMode value)
 Current edition mode for the shape.

Static Public Member Functions

float GetAngleBetweenLines (eVision.ELine line1, eVision.ELine line2)
 Computes the angle between two lines.
float GetDistanceBetweenPointAndLine (eVision.EPoint pt, eVision.ELine line, bool limited)
 Computes the distance between a point and a line.
float GetDistanceBetweenPointAndLine (eVision.EPoint pt, eVision.ELine line)
 Computes the distance between a point and a line.
eVision.EPoint GetProjectionOfPointOnLine (eVision.EPoint pt, eVision.ELine line, bool limited)
 Computes the projection of a point on a line.
eVision.EPoint GetProjectionOfPointOnLine (eVision.EPoint pt, eVision.ELine line)
 Computes the projection of a point on a line.
int GetIntersectionOfLines (eVision.ELine line1, eVision.ELine line2, eVision.EPoint intersection, bool limited)
 Computes the intersection between two lines.
int GetIntersectionOfLines (eVision.ELine line1, eVision.ELine line2, eVision.EPoint intersection)
 Computes the intersection between two lines.

Detailed Description

Represents a model of a line segment.

Remarks:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ __init__() [1/6]

None eVision.ELine.__init__ ( self)

Constructs a eVision.ELine object.

◆ __init__() [2/6]

None eVision.ELine.__init__ ( self,
eVision.EPoint center,
float length,
float angle )

Constructs a eVision.ELine object.

Parameters
centerCenter coordinates of the line at its nominal position. The default value is (0,0).
lengthNominal length of the line. The default value is 100.
angleNominal rotation angle of the line. The default value is 0.

◆ __init__() [3/6]

None eVision.ELine.__init__ ( self,
eVision.EPoint center,
float length )

Constructs a eVision.ELine object.

Parameters
centerCenter coordinates of the line at its nominal position. The default value is (0,0).
lengthNominal length of the line. The default value is 100.

◆ __init__() [4/6]

None eVision.ELine.__init__ ( self,
eVision.EPoint origin,
eVision.EPoint end )

Constructs a eVision.ELine object.

Parameters
originOrigin point coordinates of the line.
endEnd point coordinates of the line.

◆ __init__() [5/6]

None eVision.ELine.__init__ ( self,
eVision.ELine other )

Constructs a eVision.ELine object.

Parameters
otherAnother eVision.ELine object to be copied in the new eVision.ELine object.

◆ __init__() [6/6]

None eVision.ELine.__init__ ( self,
eVision.Legacy.ELine other )

Constructs a eVision.ELine object.

Parameters
otherAnother eVision.ELine object to be copied in the new eVision.ELine object.

Member Function Documentation

◆ Angle() [1/2]

float eVision.ELine.Angle ( self)

Orientation of the line.

◆ Angle() [2/2]

eVision.ELine.Angle ( self,
float value )

Orientation of the line.

◆ AvailableEditionModes()

eVision.EEditionMode eVision.ELine.AvailableEditionModes ( self)

Available edition modes for the shape.

Reimplemented from eVision.EShape.

◆ Center() [1/2]

eVision.EPoint eVision.ELine.Center ( self)

Center of the line.

◆ Center() [2/2]

eVision.ELine.Center ( self,
eVision.EPoint value )

Center of the line.

◆ CenterX() [1/2]

float eVision.ELine.CenterX ( self)

Abscissa of the center of the eVision.ELine.

◆ CenterX() [2/2]

eVision.ELine.CenterX ( self,
float value )

Abscissa of the center of the eVision.ELine.

◆ CenterY() [1/2]

float eVision.ELine.CenterY ( self)

Ordinate of the center of the eVision.ELine.

◆ CenterY() [2/2]

eVision.ELine.CenterY ( self,
float value )

Ordinate of the center of the eVision.ELine.

◆ CopyTo()

None eVision.ELine.CopyTo ( self,
eVision.ELine other )

Copy the eVision.ELine to other.

Parameters
othereVision.ELine object in which the current eVision.ELine object data have to be copied.

◆ Description()

str eVision.ELine.Description ( self)

Textual description of the shape and its parameters.

Reimplemented from eVision.EShape.

◆ End()

eVision.EPoint eVision.ELine.End ( self)

End point coordinates of the eVision.ELine object.

◆ GetAngleBetweenLines()

float eVision.ELine.GetAngleBetweenLines ( eVision.ELine line1,
eVision.ELine line2 )
static

Computes the angle between two lines.

Remarks:

The angle returned by this function is signed in the trigonometric sense, meaning that angle(1,2) = -angle(2,1).

Parameters
line1First line
line2Second line

◆ GetDistanceBetweenPointAndLine() [1/2]

float eVision.ELine.GetDistanceBetweenPointAndLine ( eVision.EPoint pt,
eVision.ELine line )
static

Computes the distance between a point and a line.

Remarks:

When the line is restricted to a segment and the orthogonal projection of the point onto the line falls outside this segment, the distance to the closest endpoint of the segment is returned instead.

Parameters
ptThe point.
lineThe line.

◆ GetDistanceBetweenPointAndLine() [2/2]

float eVision.ELine.GetDistanceBetweenPointAndLine ( eVision.EPoint pt,
eVision.ELine line,
bool limited )
static

Computes the distance between a point and a line.

Remarks:

When the line is restricted to a segment and the orthogonal projection of the point onto the line falls outside this segment, the distance to the closest endpoint of the segment is returned instead.

Parameters
ptThe point.
lineThe line.
limitedIndicates if the line parameter should be considered as an infinite line or as a segment.

◆ GetIntersectionOfLines() [1/2]

int eVision.ELine.GetIntersectionOfLines ( eVision.ELine line1,
eVision.ELine line2,
eVision.EPoint intersection )
static

Computes the intersection between two lines.

Remarks:

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

Parameters
line1First line.
line2Second line.
intersectionFound intersection.

◆ GetIntersectionOfLines() [2/2]

int eVision.ELine.GetIntersectionOfLines ( eVision.ELine line1,
eVision.ELine line2,
eVision.EPoint intersection,
bool limited )
static

Computes the intersection between two lines.

Remarks:

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

Parameters
line1First line.
line2Second line.
intersectionFound intersection.
limitedIndicates if the line parameters should be considered as infinite lines or as a segments.

◆ GetPoint()

eVision.EPoint eVision.ELine.GetPoint ( self,
float fraction )

Returns the coordinates of a point along the line.

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

◆ GetProjectionOfPointOnLine() [1/2]

eVision.EPoint eVision.ELine.GetProjectionOfPointOnLine ( eVision.EPoint pt,
eVision.ELine line )
static

Computes the projection of a point on a line.

Remarks:

When the line is restricted to a segment and the orthogonal projection of the point onto the line falls outside this segment, the closest endpoint of the segment is returned instead.

Parameters
ptThe point.
lineThe line.

◆ GetProjectionOfPointOnLine() [2/2]

eVision.EPoint eVision.ELine.GetProjectionOfPointOnLine ( eVision.EPoint pt,
eVision.ELine line,
bool limited )
static

Computes the projection of a point on a line.

Remarks:

When the line is restricted to a segment and the orthogonal projection of the point onto the line falls outside this segment, the closest endpoint of the segment is returned instead.

Parameters
ptThe point.
lineThe line.
limitedIndicates if the line parameter should be considered as an infinite line or as a segment.

◆ Length() [1/2]

float eVision.ELine.Length ( self)

Length of the eVision.ELine object.

Remarks:

By default, the length of the line 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.

◆ Length() [2/2]

eVision.ELine.Length ( self,
float value )

Length of the eVision.ELine object.

Remarks:

By default, the length of the line 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.

◆ Load() [1/2]

None eVision.ELine.Load ( self,
eVision.ESerializer | None serializer )

Load the eVision.ELine configuration.

The given eVision.ESerializer must have been created for reading.

Parameters
serializerThe serializer.

Reimplemented from eVision.EShape.

◆ Load() [2/2]

None eVision.ELine.Load ( self,
str path )

Load the eVision.ELine configuration.

The given eVision.ESerializer must have been created for reading.

Parameters
pathThe file path.

Reimplemented from eVision.EShape.

◆ Org()

eVision.EPoint eVision.ELine.Org ( self)

Origin point coordinates of the eVision.ELine object.

◆ Save() [1/2]

None eVision.ELine.Save ( self,
eVision.ESerializer | None serializer )

Save the eVision.ELine configuration.

The given eVision.ESerializer must have been created for writing.

Parameters
serializerThe serializer.

Reimplemented from eVision.EShape.

◆ Save() [2/2]

None eVision.ELine.Save ( self,
str path )

Save the eVision.ELine configuration.

The given eVision.ESerializer must have been created for writing.

Parameters
pathThe file path.

Reimplemented from eVision.EShape.

◆ SetFromOriginAndEnd()

None eVision.ELine.SetFromOriginAndEnd ( self,
eVision.EPoint origin,
eVision.EPoint end )

Sets the geometric parameters (center coordinates, length, and rotation angle) of a eVision.ELine object.

Parameters
originOrigin point coordinates of the line.
endEnd point coordinates of the line.