eVision .NET 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

 ELine ()
 Constructs a ELine object.
 ELine (eVision.EPoint center, float length, float angle)
 Constructs a ELine object.
 ELine (eVision.EPoint center, float length)
 Constructs a ELine object.
 ELine (eVision.EPoint origin, eVision.EPoint end)
 Constructs a ELine object.
 ELine (eVision.ELine other)
 Constructs a ELine object.
 ELine (eVision.Legacy.ELine other)
 Constructs a ELine object.
void CopyTo (eVision.ELine other)
 Copy the ELine to other.
void SetFromOriginAndEnd (eVision.EPoint origin, eVision.EPoint end)
 Sets the geometric parameters (center coordinates, length, and rotation angle) of a ELine object.
eVision.EPoint GetPoint (float fraction)
 Returns the coordinates of a point along the line.
new void Load (string path)
 Load the ELine configuration. The given ESerializer must have been created for reading.
new void Load (eVision.ESerializer serializer)
 Load the ELine configuration. The given ESerializer must have been created for reading.
new void Save (string path)
 Save the ELine configuration. The given ESerializer must have been created for writing.
new void Save (eVision.ESerializer serializer)
 Save the ELine configuration. The given ESerializer must have been created for writing.
Public Member Functions inherited from eVision.EShape
void Load (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 (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)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter, float zoomX, float zoomY, float panX, float panY)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter, float zoomX, float zoomY, float panX)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter, float zoomX, float zoomY)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter, float zoomX)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY, bool drawDiagonals)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter, eVision.EFrame frame, float zoomX, float zoomY)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter, eVision.EFrame frame, float zoomX)
 Draws the EShape shape.
void Draw (eVision.EDrawAdapter drawAdapter, eVision.EFrame frame)
 Draws the EShape shape.
eVision.EEditionMode HitTest (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 (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 (int x, int y, float zoomX, float zoomY)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (int x, int y, float zoomX)
 Detects if the cursor is placed over one of the dragging handles.
eVision.EEditionMode HitTest (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 (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 (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 (int x, int y, eVision.EFrame frame, float zoomX)
 Detects if the cursor is placed over one of the dragging handles.
void Drag (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.
void Drag (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.
void Drag (int x, int y, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int x, int y, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int x, int y)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (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.
void Drag (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.
void Drag (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.
void Drag (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.
void Drag (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 (bool useAngle, eVision.EFrameScaling frameScaling)
 Converts the shape to a frame.
eVision.EFrame ToFrame (bool useAngle, eVision.EFrameScaling frameScaling, eVision.EFrame shapeFrame)
 Converts the shape to a frame.

Static Public Member Functions

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

Properties

eVision.EPoint Center [get, set]
 Center of the line.
float CenterX [get, set]
 Abscissa of the center of the ELine.
float CenterY [get, set]
 Ordinate of the center of the ELine.
float Angle [get, set]
 Orientation of the line.
float Length [get, set]
 Length of the ELine object.
eVision.EPoint Org [get]
 Origin point coordinates of the ELine object.
eVision.EPoint End [get]
 End point coordinates of the ELine object.
override eVision.EEditionMode AvailableEditionModes [get]
 Available edition modes for the shape.
override string Description [get]
 Textual description of the shape and its parameters.
Properties inherited from eVision.EShape
eVision.EEditionMode EditionMode [get, set]
 Current edition mode for the shape. Default: EEditionMode_None.
eVision.EEditionMode AvailableEditionModes [get]
 Available edition modes for the shape.
string Description [get]
 Textual description of the shape and its parameters.

Detailed Description

Represents a model of a line segment.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ ELine() [1/6]

eVision.ELine.ELine ( )

Constructs a ELine object.

◆ ELine() [2/6]

eVision.ELine.ELine ( eVision.EPoint center,
float length,
float angle )

Constructs a 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.

◆ ELine() [3/6]

eVision.ELine.ELine ( eVision.EPoint center,
float length )

Constructs a 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.

◆ ELine() [4/6]

eVision.ELine.ELine ( eVision.EPoint origin,
eVision.EPoint end )

Constructs a ELine object.

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

◆ ELine() [5/6]

eVision.ELine.ELine ( eVision.ELine other)

Constructs a ELine object.

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

◆ ELine() [6/6]

eVision.ELine.ELine ( eVision.Legacy.ELine other)

Constructs a ELine object.

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

Member Function Documentation

◆ CopyTo()

void eVision.ELine.CopyTo ( eVision.ELine other)

Copy the ELine to other.

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

◆ GetAngleBetweenLines()

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

Computes the angle between two lines.

Parameters
line1First line
line2Second line

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

◆ GetDistanceBetweenPointAndLine() [1/2]

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

Computes the distance between a point and a line.

Parameters
ptThe point.
lineThe line.

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.

◆ 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.

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

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.

◆ GetIntersectionOfLines() [1/2]

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

Computes the intersection between two lines.

Parameters
line1First line.
line2Second line.
intersectionFound intersection.

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

◆ GetIntersectionOfLines() [2/2]

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

Computes the intersection between two lines.

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

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

◆ GetPoint()

eVision.EPoint eVision.ELine.GetPoint ( 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.

Parameters
ptThe point.
lineThe line.

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.

◆ 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.

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

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.

◆ Load() [1/2]

new void eVision.ELine.Load ( eVision.ESerializer serializer)

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

Parameters
serializerThe serializer.

◆ Load() [2/2]

new void eVision.ELine.Load ( string path)

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

Parameters
pathThe file path.

◆ Save() [1/2]

new void eVision.ELine.Save ( eVision.ESerializer serializer)

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

Parameters
serializerThe serializer.

◆ Save() [2/2]

new void eVision.ELine.Save ( string path)

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

Parameters
pathThe file path.

◆ SetFromOriginAndEnd()

void eVision.ELine.SetFromOriginAndEnd ( eVision.EPoint origin,
eVision.EPoint end )

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

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

Property Documentation

◆ Angle

float eVision.ELine.Angle
getset

Orientation of the line.

◆ AvailableEditionModes

override eVision.EEditionMode eVision.ELine.AvailableEditionModes
get

Available edition modes for the shape.

◆ Center

eVision.EPoint eVision.ELine.Center
getset

Center of the line.

◆ CenterX

float eVision.ELine.CenterX
getset

Abscissa of the center of the ELine.

◆ CenterY

float eVision.ELine.CenterY
getset

Ordinate of the center of the ELine.

◆ Description

override string eVision.ELine.Description
get

Textual description of the shape and its parameters.

◆ End

eVision.EPoint eVision.ELine.End
get

End point coordinates of the ELine object.

◆ Length

float eVision.ELine.Length
getset

Length of the ELine object.

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.

◆ Org

eVision.EPoint eVision.ELine.Org
get

Origin point coordinates of the ELine object.