eVision .NET API
Loading...
Searching...
No Matches
eVision.Legacy.EPolygon Class Reference

Represents a polygon. The number of vertices is arbitrary. A EPolygon could be closed (last and first point connected) or open (like a polyline shape). More...

Inheritance diagram for eVision.Legacy.EPolygon:
Collaboration diagram for eVision.Legacy.EPolygon:

Public Member Functions

 EPolygon ()
 Constructs a EPolygon.
 EPolygon (eVision.Legacy.EPolygon other)
 Constructs a EPolygon.
 EPolygon (eVision.EPoint[] vertices, bool closed)
 Constructs a EPolygon.
 EPolygon (eVision.EPoint[] vertices)
 Constructs a EPolygon.
void CopyTo (eVision.Legacy.EPolygon other)
 Copies all the data of the current EPolygon object into another EPolygon object, and returns it.
void AppendVertex (eVision.EPoint pt)
 Appends a polygon vertex after the last.
void InsertVertex (int index, eVision.EPoint pt)
 Inserts a vertex before the given index.
void RemoveVertex (int index)
 Removes vertex at the given index.
void SetVertex (int index, eVision.EPoint pt)
 Sets a polygon vertex.
eVision.EPoint GetVertex (int index)
 Gets a polygon vertex.
bool IsValid ()
 Returns true if the polygon is valid. A valid polygon has at least 2 (when open) or 3 (when closed) distinct and valid vertices and no duplicate points.
new void Save (string file)
 Saves the polygon.
new void Save (eVision.ESerializer serializer)
 Saves the polygon.
new void Load (string file)
 Loads the polygon.
new void Load (eVision.ESerializer serializer)
 Loads the polygon.
Public Member Functions inherited from eVision.Legacy.EFrame
 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 (eVision.EPoint center, float angle, float scale)
 Constructs a EFrame object.
 EFrame (eVision.Legacy.EFrame frame)
 Constructs a EFrame object.
void CopyTo (eVision.Legacy.EFrame other)
 Copies all the data from the current EFrame object into another EFrame object, and returns it.
eVision.EPoint LocalToGlobal (eVision.EPoint local)
 Transforms a geometrical element from local to global coordinates (local to world).
eVision.Legacy.EFrame LocalToGlobal (eVision.Legacy.EFrame local)
 Transforms a geometrical element from local to global coordinates (local to world).
eVision.Legacy.ELine LocalToGlobal (eVision.Legacy.ELine local)
 Transforms a geometrical element from local to global coordinates (local to world).
eVision.Legacy.ECircle LocalToGlobal (eVision.Legacy.ECircle local)
 Transforms a geometrical element from local to global coordinates (local to world).
eVision.EPoint GlobalToLocal (eVision.EPoint global)
 Transforms a geometrical element from global to local coordinates (world to local).
eVision.Legacy.EFrame GlobalToLocal (eVision.Legacy.EFrame global)
 Transforms a geometrical element from global to local coordinates (world to local).
void Load (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 (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.
void SetCenterXY (float centerX, float centerY)
 Sets the center coordinates of a EFrame object.
eVision.EPoint MidPoint (eVision.EPoint Point)
 Returns the middle coordinate between this EFrame object's center and another EFrame object's center.
eVision.EPoint Rotate (float angle)
 Returns another EPoint object containing the coordinates of the rotated center point.
float Square ()
 Compute the sum of the squared coordinates of the center of a EFrame.
float Modulus ()
 Compute the euclidean modulus of the center of a EFrame.
float Argument ()
 Compute the polar argument of the center of EFrame object.
float Dot (eVision.EPoint Point)
 Compute the dot product of the centers of two EFrame objects.
float Cross (eVision.EPoint Point)
 Compute the cross product of the centers of two EFrame objects.
float Area (eVision.EPoint Point)
 Compute the oriented area of the parallelogram built on the centers of two EFrame.
eVision.EPoint Project (eVision.Legacy.ELine shape)
 Compute the orthogonal projection of the center of a EFrame on another shape.
eVision.EPoint Project (eVision.Legacy.ECircle shape)
 Compute the orthogonal projection of the center of a EFrame on another shape.
float SquaredDistance (eVision.EPoint Point)
 Compute the squared distance between the centers of two EFrame.
eVision.EPoint Move (float angle, float distance)
 Return the position by moving the center along angle by distance.
virtual float Distance (eVision.EPoint point)
 Returns the distance between the addressed point and the center of EFrame object.
virtual float Distance (eVision.Legacy.ELine line, bool segmentOnly)
 Returns the distance between the addressed point and the center of EFrame object.
virtual float Distance (eVision.Legacy.ELine line)
 Returns the distance between the addressed point and the center of EFrame object.
virtual float Distance (eVision.Legacy.ECircle circle, bool arcOnly)
 Returns the distance between the addressed point and the center of EFrame object.
virtual float Distance (eVision.Legacy.ECircle circle)
 Returns the distance between the addressed point and the center of EFrame object.

Properties

bool IsClosed [get, set]
 The polygon close attribute.
int NumVertices [get]
 Returns the number of polygon's vertices.
int NumEdges [get]
 Returns the number of polygon's edges (or sides). Depends on the EPolygon.IsClosed status.
eVision.EPoint[] Vertices [get]
 Returns the list of polygon vertices.
float Length [get]
 Returns the length (perimeter) of the polygon.
float Area [get]
 Returns the area of the polygon.
Properties inherited from eVision.Legacy.EFrame
float Angle [get, set]
 Orientation of the frame.
float Scale [get, set]
 Horizontal sensor resolution, in pixels per unit.
float CenterX [get]
 Abscissa of the origin point of the frame.
float CenterY [get]
 Ordinate of the origin point of the frame.
virtual eVision.EPoint Center [get, set]
 Center.
float X [get, set]
 Abscissa (X coordinate) of the EFrame object.
float Y [get, set]
 Ordinate (Y coordinate) of the EFrame object.

Additional Inherited Members

Static Public Member Functions inherited from eVision.Legacy.EFrame
static eVision.EPoint operator+ (eVision.Legacy.EFrame extraArgument, eVision.EPoint point)
 Returns the addition of the point to the center of the EFrame.
static eVision.EPoint operator- (eVision.Legacy.EFrame extraArgument, eVision.EPoint point)
 Returns the substraction of the center of the EFrame with the given point.
static eVision.EPoint operator* (eVision.Legacy.EFrame extraArgument, float scalar)
 Returns the multiplication of the center of the EFrame with the given multiplier.
static eVision.EPoint operator/ (eVision.Legacy.EFrame extraArgument, float scalar)
 Returns the division of the center of the EFrame with the given divisor.

Detailed Description

Represents a polygon. The number of vertices is arbitrary. A EPolygon could be closed (last and first point connected) or open (like a polyline shape).

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EPolygon() [1/4]

eVision.Legacy.EPolygon.EPolygon ( )

Constructs a EPolygon.

◆ EPolygon() [2/4]

eVision.Legacy.EPolygon.EPolygon ( eVision.Legacy.EPolygon other)

Constructs a EPolygon.

Parameters
otherReference to the EPolygon used for the initialization.

◆ EPolygon() [3/4]

eVision.Legacy.EPolygon.EPolygon ( eVision.EPoint[] vertices,
bool closed )

Constructs a EPolygon.

Parameters
verticesA vector of at least 3 points.
closedAn optional parameter to set the closed properties. When closed, an edge exists between the last and first points of the polygon. By default, created polygons are closed.

◆ EPolygon() [4/4]

eVision.Legacy.EPolygon.EPolygon ( eVision.EPoint[] vertices)

Constructs a EPolygon.

Parameters
verticesA vector of at least 3 points.

Member Function Documentation

◆ AppendVertex()

void eVision.Legacy.EPolygon.AppendVertex ( eVision.EPoint pt)

Appends a polygon vertex after the last.

Parameters
ptThe point to append.

◆ CopyTo()

void eVision.Legacy.EPolygon.CopyTo ( eVision.Legacy.EPolygon other)

Copies all the data of the current EPolygon object into another EPolygon object, and returns it.

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

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

◆ GetVertex()

eVision.EPoint eVision.Legacy.EPolygon.GetVertex ( int index)

Gets a polygon vertex.

Parameters
indexThe index of the vertex.

◆ InsertVertex()

void eVision.Legacy.EPolygon.InsertVertex ( int index,
eVision.EPoint pt )

Inserts a vertex before the given index.

Parameters
indexThe index after which the vertex will be inserted.
ptThe point to insert.

◆ IsValid()

bool eVision.Legacy.EPolygon.IsValid ( )

Returns true if the polygon is valid. A valid polygon has at least 2 (when open) or 3 (when closed) distinct and valid vertices and no duplicate points.

◆ Load() [1/2]

new void eVision.Legacy.EPolygon.Load ( eVision.ESerializer serializer)

Loads the polygon.

Parameters
serializerSerializer. Must be in read mode.

◆ Load() [2/2]

new void eVision.Legacy.EPolygon.Load ( string file)

Loads the polygon.

Parameters
fileFile path.

◆ RemoveVertex()

void eVision.Legacy.EPolygon.RemoveVertex ( int index)

Removes vertex at the given index.

Parameters
indexThe index of the vertex to remove.

◆ Save() [1/2]

new void eVision.Legacy.EPolygon.Save ( eVision.ESerializer serializer)

Saves the polygon.

Parameters
serializerSerializer. Must be in write mode.

◆ Save() [2/2]

new void eVision.Legacy.EPolygon.Save ( string file)

Saves the polygon.

Parameters
fileFile path.

◆ SetVertex()

void eVision.Legacy.EPolygon.SetVertex ( int index,
eVision.EPoint pt )

Sets a polygon vertex.

Parameters
indexThe index of the vertex.
ptThe vertex position.

Property Documentation

◆ Area

float eVision.Legacy.EPolygon.Area
get

Returns the area of the polygon.

◆ IsClosed

bool eVision.Legacy.EPolygon.IsClosed
getset

The polygon close attribute.

◆ Length

float eVision.Legacy.EPolygon.Length
get

Returns the length (perimeter) of the polygon.

◆ NumEdges

int eVision.Legacy.EPolygon.NumEdges
get

Returns the number of polygon's edges (or sides). Depends on the EPolygon.IsClosed status.

◆ NumVertices

int eVision.Legacy.EPolygon.NumVertices
get

Returns the number of polygon's vertices.

◆ Vertices

eVision.EPoint [] eVision.Legacy.EPolygon.Vertices
get

Returns the list of polygon vertices.