eVision .NET API
Loading...
Searching...
No Matches
eVision.ERectangle Class Reference

Represents a model of a rectangle. More...

Inheritance diagram for eVision.ERectangle:
Collaboration diagram for eVision.ERectangle:

Public Member Functions

 ERectangle ()
 Constructs a ERectangle.
 ERectangle (eVision.EPoint center, float sizeX, float sizeY, float angle)
 Constructs a ERectangle.
 ERectangle (eVision.EPoint center, float sizeX, float sizeY)
 Constructs a ERectangle.
 ERectangle (eVision.EPoint origin, eVision.EPoint end)
 Constructs a ERectangle.
 ERectangle (eVision.EPoint origin, eVision.EPoint middle, eVision.EPoint end)
 Constructs a ERectangle.
 ERectangle (eVision.ERectangle other)
 Constructs a ERectangle.
 ERectangle (eVision.ERotatedBoundingBox other)
 Constructs a ERectangle.
void CopyTo (eVision.ERectangle other)
 Copies all the data from this object to the other object.
eVision.ERectangle LocalToSensor (eVision.EFrame frame)
 Transforms a rectangle from local to sensor coordinates. This method throws an exception if the input frame has an anisotropic scale and if the angle is non-null.
eVision.ERectangle SensorToLocal (eVision.EFrame frame)
 Transforms a rectangle from sensor to local coordinates. This method throws an exception if the input frame has an anisotropic scale and if the angle is non-null.
void SetFromOppositeCorners (eVision.EPoint origin, eVision.EPoint end)
 Sets the geometric parameters (center coordinates, size, and rotation angle) of an ERectangle object.
void SetFromThreeCorners (eVision.EPoint origin, eVision.EPoint middle, eVision.EPoint end)
 Sets the geometric parameters (center coordinates, size, and rotation angle) of an ERectangle object.
void SetSize (float sizeX, float sizeY)
 Sets the size of a ERectangle object.
eVision.EPoint GetPoint (float fractionX, float fractionY)
 Returns the coordinates of a particular point, specified by its location in the ERectangle area.
void GetMidEdges (ref eVision.EPoint x, ref eVision.EPoint XX, ref eVision.EPoint y, ref eVision.EPoint YY)
 Retrieves the center coordinates of each edge of a ERectangle object.
void GetCorners (ref eVision.EPoint xy, ref eVision.EPoint XXy, ref eVision.EPoint xYY, ref eVision.EPoint XXYY)
 Retrieves the coordinates of each corner of a ERectangle object.
void GetEdges (eVision.ELine x, eVision.ELine XX, eVision.ELine y, eVision.ELine YY)
 Retrieves each edge of a ERectangle object.
bool Contains (eVision.EPoint p)
 Whether the specified point is inside the rectangle or not.
float ComputeOverlap (eVision.ERectangle other)
 Computes the overlap (intersection / min(area1, area2)) of this and the other ERectangle.
bool IsEqual (eVision.ERectangle other)
 Comparison operator.
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.

Properties

eVision.EPoint Center [get, set]
 Center of the ERectangle.
float CenterX [get, set]
 Abscissa of the center of the ERectangle.
float CenterY [get, set]
 Ordinate of the the center of the ERectangle.
float Angle [get, set]
 Orientation of the ERectangle.
float SizeX [get, set]
 X size of the ERectangle.
float SizeY [get, set]
 Y size of the ERectangle.
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 rectangle.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ ERectangle() [1/7]

eVision.ERectangle.ERectangle ( )

Constructs a ERectangle.

◆ ERectangle() [2/7]

eVision.ERectangle.ERectangle ( eVision.EPoint center,
float sizeX,
float sizeY,
float angle )

Constructs a ERectangle.

Parameters
centerCenter coordinates of the rectangle at its nominal position. The default value is (0,0).
sizeXNominal size X/Y of the rectangle. Both default values are 100.
sizeYNominal size X/Y of the rectangle. Both default values are 100.
angleNominal rotation angle of the rectangle. The default value is 0.

◆ ERectangle() [3/7]

eVision.ERectangle.ERectangle ( eVision.EPoint center,
float sizeX,
float sizeY )

Constructs a ERectangle.

Parameters
centerCenter coordinates of the rectangle at its nominal position. The default value is (0,0).
sizeXNominal size X/Y of the rectangle. Both default values are 100.
sizeYNominal size X/Y of the rectangle. Both default values are 100.

◆ ERectangle() [4/7]

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

Constructs a ERectangle.

Parameters
originUpper left point coordinates of the rectangle.
endLower right point coordinates of the rectangle.

◆ ERectangle() [5/7]

eVision.ERectangle.ERectangle ( eVision.EPoint origin,
eVision.EPoint middle,
eVision.EPoint end )

Constructs a ERectangle.

Parameters
originUpper left point coordinates of the rectangle.
middleA third corner point coordinates.
endLower right point coordinates of the rectangle.

◆ ERectangle() [6/7]

eVision.ERectangle.ERectangle ( eVision.ERectangle other)

Constructs a ERectangle.

Parameters
otherAnother object to be copied in the new object.

◆ ERectangle() [7/7]

eVision.ERectangle.ERectangle ( eVision.ERotatedBoundingBox other)

Constructs a ERectangle.

Parameters
otherAnother object to be copied in the new object.

Member Function Documentation

◆ ComputeOverlap()

float eVision.ERectangle.ComputeOverlap ( eVision.ERectangle other)

Computes the overlap (intersection / min(area1, area2)) of this and the other ERectangle.

Parameters
otherThe other ERectangle to which we compute overlap.

◆ Contains()

bool eVision.ERectangle.Contains ( eVision.EPoint p)

Whether the specified point is inside the rectangle or not.

Parameters
pA point.

◆ CopyTo()

void eVision.ERectangle.CopyTo ( eVision.ERectangle other)

Copies all the data from this object to the other object.

Parameters
otherOther ERectangle object in which to copy the content of this object.

◆ GetCorners()

void eVision.ERectangle.GetCorners ( ref eVision.EPoint xy,
ref eVision.EPoint XXy,
ref eVision.EPoint xYY,
ref eVision.EPoint XXYY )

Retrieves the coordinates of each corner of a ERectangle object.

Parameters
xyCoordinates of the lower leftmost corner of the ERectangle object.
XXyCoordinates of the lower rightmost corner of the ERectangle object.
xYYCoordinates of the upper leftmost corner of the ERectangle object.
XXYYCoordinates of the upper rightmost corner of the ERectangle object.

◆ GetEdges()

void eVision.ERectangle.GetEdges ( eVision.ELine x,
eVision.ELine XX,
eVision.ELine y,
eVision.ELine YY )

Retrieves each edge of a ERectangle object.

Parameters
xLeftmost edge of the ERectangle object.
XXRightmost edge of the ERectangle object.
yLower edge of the ERectangle object.
YYUpper edge of the ERectangle object.

◆ GetMidEdges()

void eVision.ERectangle.GetMidEdges ( ref eVision.EPoint x,
ref eVision.EPoint XX,
ref eVision.EPoint y,
ref eVision.EPoint YY )

Retrieves the center coordinates of each edge of a ERectangle object.

Parameters
xCenter coordinates of the leftmost edge of the ERectangle object.
XXCenter coordinates of the rightmost edge of the ERectangle object.
yCenter coordinates of the lower edge of the ERectangle object.
YYCenter coordinates of the upper edge of the ERectangle object.

◆ GetPoint()

eVision.EPoint eVision.ERectangle.GetPoint ( float fractionX,
float fractionY )

Returns the coordinates of a particular point, specified by its location in the ERectangle area.

Parameters
fractionXPoint location expressed as a fraction of the ERectangle vertical edges (range -1, +1).
fractionYPoint location expressed as a fraction of the ERectangle horizontal edges (range -1, +1).

◆ IsEqual()

bool eVision.ERectangle.IsEqual ( eVision.ERectangle other)

Comparison operator.

Parameters
otherOther ERectangle to compare to.

The comparison is only applied on the geometrical parameters of the ERectangle and not its drawing and graphic manipulation or its frame of reference.

◆ LocalToSensor()

eVision.ERectangle eVision.ERectangle.LocalToSensor ( eVision.EFrame frame)

Transforms a rectangle from local to sensor coordinates. This method throws an exception if the input frame has an anisotropic scale and if the angle is non-null.

Parameters
frameReference frame in which the region is defined.

◆ SensorToLocal()

eVision.ERectangle eVision.ERectangle.SensorToLocal ( eVision.EFrame frame)

Transforms a rectangle from sensor to local coordinates. This method throws an exception if the input frame has an anisotropic scale and if the angle is non-null.

Parameters
frameReference frame in which the region is defined.

◆ SetFromOppositeCorners()

void eVision.ERectangle.SetFromOppositeCorners ( eVision.EPoint origin,
eVision.EPoint end )

Sets the geometric parameters (center coordinates, size, and rotation angle) of an ERectangle object.

Parameters
originUpper left point coordinates of the rectangle.
endLower right point coordinates of the rectangle.

◆ SetFromThreeCorners()

void eVision.ERectangle.SetFromThreeCorners ( eVision.EPoint origin,
eVision.EPoint middle,
eVision.EPoint end )

Sets the geometric parameters (center coordinates, size, and rotation angle) of an ERectangle object.

Parameters
originUpper left point coordinates of the rectangle.
middleA third corner point coordinates.
endLower right point coordinates of the rectangle.

◆ SetSize()

void eVision.ERectangle.SetSize ( float sizeX,
float sizeY )

Sets the size of a ERectangle object.

Parameters
sizeXNominal size X of the ERectangle object. Default values is 100.
sizeYNominal size Y of the ERectangle object. Default values is 100.

A ERectangle object is fully defined knowing its nominal position (given by the coordinates of its center), its nominal size, its rotation angle and its outline tolerance. By default, the width and height values are 100, which means 100 pixels when the field of view is not calibrated and 100 "units" in case of a calibrated field of view.

Property Documentation

◆ Angle

float eVision.ERectangle.Angle
getset

Orientation of the ERectangle.

◆ AvailableEditionModes

override eVision.EEditionMode eVision.ERectangle.AvailableEditionModes
get

Available edition modes for the shape.

◆ Center

eVision.EPoint eVision.ERectangle.Center
getset

Center of the ERectangle.

◆ CenterX

float eVision.ERectangle.CenterX
getset

Abscissa of the center of the ERectangle.

◆ CenterY

float eVision.ERectangle.CenterY
getset

Ordinate of the the center of the ERectangle.

◆ Description

override string eVision.ERectangle.Description
get

Textual description of the shape and its parameters.

◆ SizeX

float eVision.ERectangle.SizeX
getset

X size of the ERectangle.

◆ SizeY

float eVision.ERectangle.SizeY
getset

Y size of the ERectangle.