|
Programming Reference for VirtualLab Fusion
2022.1
|
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Public class which defines a simple polygon (defined by an array of vertices). 'Simple' means, that there are no intersections of the vertices.
More...
Public Member Functions | |
| override double | CalculateDistanceOfPointToRegionBorder (VectorD point) |
| Calculates the distance of a point to the border of this region. More... | |
| VectorD[] | CalculateIntersectionsOfHalfLineAndPolygon (VectorD startPositionOfHalfLine, VectorD directionOfHalfLine, string linesName, bool ignoreVirtualVertices, out string[] namesOfPoints) |
| Method for calculating the intersection points of a given half line and this polygon More... | |
| List<(VectorD intersectionPoint, string nameOfPoint)> | CalculateIntersectionsOfLineAndPolygon (VectorD firstPointOnLine, VectorD secondPointOnLineOrDirectionOfLine, bool directionGivenInsteadOfSecondPointOnLine, string linesName, bool ignoreVirtualVertices, out List<(int edgeStart, int edgeEnd)> congruentEdges) |
| // Method for calculating the intersection points of a given line and this polygon // More... | |
| VectorD[] | CalculateIntersectionsOfLineSegmentAndPolygon (VectorD startPositionOfSegment, VectorD endPositionOfSegment, string linesName, string nameOfSegmentStart, string nameOfSegmentEnd, bool ignoreVirtualVertices, out(string, string)[] namesOfPoints) |
| Method for calculating the intersection points of a given line segment and this polygon More... | |
| override object | Clone () |
| Deep copy of the object. More... | |
| override bool | Equals (object obj, EqualityIntent equalityIntent) |
| Equality operator. More... | |
| void | ExtrapolatedRegionBorders (RectanglePhysical boundingBox, out List< Tuple< bool, double > > leftBorders, out List< Tuple< bool, double > > topBorders, out List< Tuple< bool, double > > rightBorders, out List< Tuple< bool, double > > bottomBorders) |
| Determine region borders that can be created by 'border continuation' extrapolation. //See ITN.064 for more information. More... | |
| PolygonVertexList | Get_EffectiveVertices () |
| Method which creates a new PolygonVertexList containing only effective vertices. More... | |
| override InsideOutside | GetInOutRelation (VectorD point, ExtrapolationInfo extrapolation2use=null) |
| Method which checks whether or not a point lies inside or outside the 2D region or on its boundary. More... | |
| InsideOutside | InOutRelation_boundingBoxBorder_extrapolated (VectorD point, RectanglePhysical boundingBox, List< Tuple< bool, double > > leftBorders, List< Tuple< bool, double > > topBorders, List< Tuple< bool, double > > rightBorders, List< Tuple< bool, double > > bottomBorders, ExtrapolationInfo extrapolation2use) |
| If a simple polygon is used inside a composed region, we may need a special handling for points near a given bounding box. If there are edges of neighbored vertices exactly on a border of the bounding box, the border may effectively disappear in case of 'periodic' or 'border continuation' extrapolation. See ITN.064 for more information on the mode 'border continuation'. More... | |
| override void | MayBeNonzeroOutside (out bool maybeNonZeroLeft, out bool maybeNonZeroRight, out bool maybeNonZeroBottom, out bool maybeNonZeroTop) |
| Method which determines whether or not non zero values (i.e. 'inside' states) may appear outside the polygon in case of 'border continuation' extrapolation. More... | |
| SimplePolygon () | |
| Default constructor, creating a triangle with an edge length of 5mm, centered at (0, 0), and with its base line parallel to the x-axis. | |
| SimplePolygon (bool useOnlyEffectiveVertices=true, VectorD[] vertices) | |
| Initializes a new instance of the SimplePolygon class out of a list of VectorD. Each vertex gets the name "Vertex" and a running number. More... | |
| SimplePolygon (PolygonVertexList vertices, bool boundaryIsInside=false, PhysicalProperty propertyOfCoordinatesX=PhysicalProperty.Length, PhysicalProperty propertyOfCoordinatesY=PhysicalProperty.Length, bool dontCheckConsistency=false, bool useOnlyEffectiveVertices=true) | |
| A constructor of the simple polygon class. Non-simple polygons (where at least two edges intersect) are not allowed. The constructor determines the type of the polygon. More... | |
| SimplePolygon (RectanglePhysical rectangle, bool boundaryIsInside=false) | |
| Constructor which gets a rectangle that shall be represented by a polygon. More... | |
| SimplePolygon (RectangularRegion rectangle) | |
| Constructor which gets a rectangular region which shall be represented by a polygon. More... | |
| SimplePolygon (SerializationInfo info, StreamingContext context) | |
| Deserialization constructor. See the ISerializable interface for more details. More... | |
| SimplePolygon (SimplePolygon polygon) | |
| copy constructor of the simple polygon class More... | |
| override void | UpdatePropertyOfCoordinates () |
| Method for handling update after change of the physical property of the coordinate | |
Public Member Functions inherited from ElementaryRegion2D | |
| abstract double | CalculateDistanceOfPointToRegionBorder (VectorD point) |
| Calculates the distance of a point to the border of this region. More... | |
| ElementaryRegion2D (bool boundariesAreInside, PhysicalProperty propertyOfCoordinatesX=PhysicalProperty.Length, PhysicalProperty propertyOfCoordinatesY=PhysicalProperty.Length) | |
| Constructor which gets the _boundariesAreInside flag. To be called from derived classes constructors. More... | |
| ElementaryRegion2D (ElementaryRegion2D region2bCopied) | |
| Copy constructor. More... | |
| ElementaryRegion2D (SerializationInfo info, StreamingContext context) | |
| Deserialization constructor. See the ISerializable interface for more details. More... | |
Public Member Functions inherited from Region2D | |
| override object | Clone () |
| Clones the current object. More... | |
| override bool | Equals (object obj, EqualityIntent equalityIntent) |
| Equality operation More... | |
| abstract InsideOutside | GetInOutRelation (VectorD point, ExtrapolationInfo extrapolation2use=null) |
| Method which checks whether or not a point lies inside or outside the 2D region or on its boundary. More... | |
| bool | IsInside (double pointX, double pointY) |
| Method which checks whether or not a point is inside the 2D region. More... | |
| bool | IsInside (VectorD point) |
| Method which checks whether or not a point is inside the 2D region. More... | |
| abstract void | MayBeNonzeroOutside (out bool maybeNonZeroLeft, out bool maybeNonZeroRight, out bool maybeNonZeroBottom, out bool maybeNonZeroTop) |
| Method which determines whether or not the region can provide "inside" state outside of its boundary interval. This is not the case for extrapolation mode 'ConstantZero', of course. More... | |
| Region2D (bool boundariesAreInside, PhysicalProperty propertyOfCoordinatesX=PhysicalProperty.Length, PhysicalProperty propertyOfCoordinatesY=PhysicalProperty.Length) | |
| Constructor which gets the _boundariesAreInside flag. To be called from derived classes constructors. More... | |
| Region2D (Region2D region2bCopied) | |
| Copy constructor. More... | |
| Region2D (SerializationInfo info, StreamingContext context) | |
| Deserialization constructor. See the ISerializable interface for more details. More... | |
| virtual void | UpdatePropertyOfCoordinates () |
| Method for handling update after change of the physical property of the coordinate | |
| bool | Equals (object otherObject, EqualityIntent equalityIntent) |
| Determines whether the specified Object is equal to this instance. More... | |
Public Member Functions inherited from IDocument | |
| void | Reload () |
| Reload function for the document | |
Static Public Member Functions | |
| static double | CalculateArea (SimplePolygon polygon) |
| Calculates the area of a given polygon. Formula taken from Wikipedia. More... | |
| static VectorD | CalculateCentroid (SimplePolygon polygon) |
| Calculates the centroid of a given polygon. Formula taken from Wikipedia. More... | |
| static List< SimplePolygon > | CalculateIntersectionOfTwoPolygons (SimplePolygon polygon1, SimplePolygon polygon2, bool ignoreVirtualVertices) |
| Method for calculating the intersection of two polygons. See ITN.067 for more information. More... | |
| static SimplePolygon | CalculateUnionOfTwoPolygons (SimplePolygon polygon1, SimplePolygon polygon2, bool ignoreVirtualVertices, out List< SimplePolygon > holes) |
| Method for calculating the union of two polygons. See ITN.067 for more information. More... | |
| static bool | CheckPolygonalChainForConvexityAndMonotony (VectorD[] polygonalPoints, out bool monotone_inX, out bool monotone_inY, out RectangleD boundingBox, out List< int > minX_vertexIndices, out List< int > maxX_vertexIndices, out List< int > minY_vertexIndices, out List< int > maxY_vertexIndices) |
| Check whether a polygonal chain is convex and monotone. More... | |
| static SimplePolygon | EnsureClockwisePolygon (SimplePolygon polygon2check) |
| Method which checks whether the vertices of a polygon are given in clockwise order. If so, it will be returned unchanged. If not, a polygon with reversed vertex order is returned. More... | |
| static SimplePolygon | EnsureCounterClockwisePolygon (SimplePolygon polygon2check) |
| Method which checks whether the vertices of a polygon are given in counterclockwise order. If so, it will be returned unchanged. If not, a polygon with reversed vertex order is returned. More... | |
| static List<(long index, VectorD point)> | ExtendConvexPolygonWithOutlyingPoint (SimplePolygon polygon, List< long > pointIndicesOfPolygonVertices, NamedPolygonVertex singlePoint, long pointIndexOfSinglePoint, out List< TriangulationTriangle2D > newTrianglesForExtension) |
| Method which extends a convex polygon by a given point. The polygon is meant to be the convex hull of a triangulated point cloud as described in ITN.065. More... | |
| static InsideOutside | IsInsideTriangle (VectorD point, VectorD vertex1, VectorD vertex2, VectorD vertex3, bool useNumericalChecks=true) |
| Fast method for checking whether a point lies inside a given triangle. Important: No check for collinearity is done (for performance reasons). More... | |
| static bool | IsSelfIntersecting (VectorD[] vertices, out bool counterClockwiseDefinition) |
| Method which checks whether or not a polygon (for the given order of the vertices!) is self intersecting. More... | |
| static bool | operator!= (SimplePolygon o1, SimplePolygon o2) |
| Unequals operator. More... | |
| static bool | operator== (SimplePolygon o1, SimplePolygon o2) |
| Equals operator More... | |
| static SimplePolygon | RemoveVirtualVertices (SimplePolygon polygon) |
| Method for creating a polygon without virtual vertices from an arbitrary polygon. More... | |
| static SimplePolygon | Rotate (SimplePolygon polygon, double angle, VectorD centerOfRotation) |
| Static method for transforming a given polygon to another one which is rotated by an angle around a given rotation center. More... | |
| static SimplePolygon | TransformToTargetBox (SimplePolygon polygon, RectanglePhysical targetBoundingBox) |
| Static method for transforming a given polygon to another one with defined position and size. More... | |
| static SimplePolygon | Translate (SimplePolygon polygon, VectorD translationVector) |
| Static method for transforming a given polygon to another one which is translated by a given vector. More... | |
Static Public Member Functions inherited from ElementaryRegion2D | |
| static bool | operator!= (ElementaryRegion2D o1, ElementaryRegion2D o2) |
| Unequals operator. More... | |
| static bool | operator== (ElementaryRegion2D o1, ElementaryRegion2D o2) |
| Equals operator More... | |
Static Public Member Functions inherited from Region2D | |
| static Region2D | InvertRegion (Region2D region2Invert) |
| Creates a new region with inverted in / out regions compared to this. More... | |
| static Region2D | Load (string fileName) |
| Loads the specified file name. Works independently from whether the document has been saved without view settings (as prior to VL 6.0) or with view settings. More... | |
| static bool | operator!= (Region2D o1, Region2D o2) |
| Unequals operator. More... | |
| static bool | operator== (Region2D o1, Region2D o2) |
| Equals operator More... | |
Public Attributes | |
| EventHandler | PolygonChanged |
| Event for changed vertices. | |
| int | startIndexOfNearestEdge |
| Calculates the distance of a point to the border of this polygon. Important: This method will ignore all extrapolation settings! More... | |
Properties | |
| override RectanglePhysical | AxisAlignedBoundingBox [get] |
| Gets the bounding box for the polygon. Its sides are parallel to the x- and y-axis resp. It is calculated during preprocessing. | |
| bool | CounterClockwise [get] |
| Gets whether or not the polygon is defined counterclockwise. It is determined during preprocessing. | |
| virtual List< Parameter > | ParameterRunParameters [get] |
| Gets all available parameters. For variable parameters (i.e. those double and int parameters which can be used in the Parameter Run, Parametric Optimization and so on) add a VaryParameterInfo object (derived from Parameter class) to the returned list. | |
| PolygonType | Type [get] |
| Gets the type of the polygon. It is determined during preprocessing. | |
| PolygonVertexList | Vertices [get] |
| public property to get the vertices of the polygon | |
Properties inherited from Region2D | |
| abstract RectanglePhysical | AxisAlignedBoundingBox [get] |
| Gets the bounding box for the 2D region. Its sides are parallel to the x- and y-axis resp. | |
| bool | BoundariesAreInside [get, set] |
| Gets or sets whether or not the boundaries of the region belong to the inner region. | |
| string | CommentOfCoordinates_X [get, set] |
| Gets and sets the comment for the x-coordinates. | |
| string | CommentOfCoordinates_Y [get, set] |
| Gets and sets the comment for the y-coordinates. | |
| ExtrapolationInfo | ExtrapolationHandling [get, set] |
| The extrapolation mode for this region. See ITN.064 for more information on the mode 'border continuation'. | |
| bool | IsOneD [get] |
| Gets whether this IRegion1D2D is 1D or 2D | |
| string | Name [get, set] |
| The name which can be given to the region by the user. | |
| PhysicalProperty | PropertyOfCoordinatesX [get, set] |
| Physical property of the x-coordinates of the region | |
| PhysicalProperty | PropertyOfCoordinatesY [get, set] |
| Physical property of the y-coordinates of the region | |
| Region2DType | RegionType [get] |
| Gets the type of the region | |
| SamplingParameters | SamplingForUsageWithComplexFields [get, set] |
| Sampling parameters which will be used for a coordinate rescaling in case of using the region with a complex field. | |
Properties inherited from IRegion1D2D | |
| bool | BoundariesAreInside [get, set] |
| Gets or sets whether or not the boundaries of the region belong to the inner region. | |
| bool | IsOneD [get] |
| Gets whether this IRegion1D2D is 1D or 2D | |
| string | Name [get, set] |
| The name which can be given to the region by the user. | |
| SamplingParameters | SamplingForUsageWithComplexFields [get, set] |
| Sampling parameters which will be used for a coordinate rescaling in case of using the region with a complex field. | |
Properties inherited from IDocument | |
| VirtualLabSession | Session [get, set] |
| every documents need to be handled in a session ==> default is the VirtualLab Mainsession | |
| NodeVLExplorer | TreeStructure [get] |
| every document should have a node (maybe with subnodes) in the VirtualLab Explorer | |
| DocumentType | TypeOfDocument [get] |
| Gets an enum entry specifying the type of the document. | |
Additional Inherited Members | |
Static Public Attributes inherited from Region2D | |
| const string | DefaultDocumentName |
| The default document name (= type description) for an Order Collection. | |
| static readonly string | FileDialogFilterString |
| The filter string used in "Open File" dialogs. | |
| const string | FileExtensionString |
| The file extension for an Order Collection. | |
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Public class which defines a simple polygon (defined by an array of vertices). 'Simple' means, that there are no intersections of the vertices.
| SimplePolygon | ( | bool | useOnlyEffectiveVertices = true, |
| VectorD[] | vertices | ||
| ) |
Initializes a new instance of the SimplePolygon class out of a list of VectorD. Each vertex gets the name "Vertex" and a running number.
| vertices | The vertices of the polygon. |
| useOnlyEffectiveVertices | If true, only effective vertices (instead of all defined vertices) will be used. |
| System.ArgumentException | At least three vertices must be given. |
| System.ArgumentException | Vertices have to be unique. |
| SimplePolygon | ( | PolygonVertexList | vertices, |
| bool | boundaryIsInside = false, |
||
| PhysicalProperty | propertyOfCoordinatesX = PhysicalProperty.Length, |
||
| PhysicalProperty | propertyOfCoordinatesY = PhysicalProperty.Length, |
||
| bool | dontCheckConsistency = false, |
||
| bool | useOnlyEffectiveVertices = true |
||
| ) |
A constructor of the simple polygon class. Non-simple polygons (where at least two edges intersect) are not allowed. The constructor determines the type of the polygon.
| vertices | The vertices that define the polygon. The order is important. |
| boundaryIsInside | Flag which says whether or not the boundary is part of the inner region or not. |
| propertyOfCoordinatesX | Physical property of the x-coordinate. |
| propertyOfCoordinatesY | Physical property of the y-coordinate. |
| dontCheckConsistency | If true, no consistency check will be done. (Make sure that you know what you're doing!) |
| SimplePolygon | ( | SimplePolygon | polygon | ) |
copy constructor of the simple polygon class
| polygon | the polygon which shall be copied |
| SimplePolygon | ( | RectanglePhysical | rectangle, |
| bool | boundaryIsInside = false |
||
| ) |
Constructor which gets a rectangle that shall be represented by a polygon.
| rectangle | Rectangle to be converted to a polygon. |
| boundaryIsInside | Flag which says whether or not the boundary is part of the inner region or not. |
| SimplePolygon | ( | RectangularRegion | rectangle | ) |
Constructor which gets a rectangular region which shall be represented by a polygon.
| rectangle | Rectangle to be converted to a polygon. |
| SimplePolygon | ( | SerializationInfo | info, |
| StreamingContext | context | ||
| ) |
Deserialization constructor. See the ISerializable interface for more details.
| info | SerializationInfo |
| context | StreamingContext |
|
static |
Calculates the area of a given polygon. Formula taken from Wikipedia.
| polygon | Polygon to calculate the area for. |
|
static |
Calculates the centroid of a given polygon. Formula taken from Wikipedia.
| polygon | Polygon to calculate the centroid for. |
|
virtual |
Calculates the distance of a point to the border of this region.
| point | Point to calculate the distance for. |
Implements ElementaryRegion2D.
|
static |
Method for calculating the intersection of two polygons. See ITN.067 for more information.
| polygon1 | First of the polygons to intersect. |
| polygon2 | Second of the polygons to intersect. |
| ignoreVirtualVertices | If true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead. |
| VectorD[] CalculateIntersectionsOfHalfLineAndPolygon | ( | VectorD | startPositionOfHalfLine, |
| VectorD | directionOfHalfLine, | ||
| string | linesName, | ||
| bool | ignoreVirtualVertices, | ||
| out string[] | namesOfPoints | ||
| ) |
Method for calculating the intersection points of a given half line and this polygon
| startPositionOfHalfLine | The start position of the half line. |
| directionOfHalfLine | The direction of the half line. |
| linesName | Name of the line to intersect with the polygon. |
| ignoreVirtualVertices | If true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead. |
| namesOfPoints | Array which contains the names of the intersection points. |
| List<(VectorD intersectionPoint, string nameOfPoint)> CalculateIntersectionsOfLineAndPolygon | ( | VectorD | firstPointOnLine, |
| VectorD | secondPointOnLineOrDirectionOfLine, | ||
| bool | directionGivenInsteadOfSecondPointOnLine, | ||
| string | linesName, | ||
| bool | ignoreVirtualVertices, | ||
| out List<(int edgeStart, int edgeEnd)> | congruentEdges | ||
| ) |
// Method for calculating the intersection points of a given line and this polygon //
//
| basePointOnLine | An start or base point of the line. |
//
| directionOfLine | The direction of the line. |
//
| linesName | Name of the line to intersect with the polygon. |
//
| ignoreVirtualVertices | If true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead. |
//
| congruentEdges | A list of edge start and end indices of these edges which are congruent to the line to intersect. |
//
Method for calculating the intersection points of a given line and this polygon.
| firstPointOnLine | One point lying on the line to be intersecting. |
| secondPointOnLineOrDirectionOfLine | Either a second point on the line or the direction of the line, depending on the flag directionGivenInsteadOfSecondPointOnLine. |
| directionGivenInsteadOfSecondPointOnLine | If true, the second VectorD is interpreted as line direction instead of a second point on the line. |
| linesName | Name of the line to intersect with the polygon. |
| ignoreVirtualVertices | If true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead. |
| congruentEdges | A list of edge start and end indices of these edges which are congruent to the line to intersect. |
| ArgumentException | If directionGivenInsteadOfSecondPointOnLine is true and the absolute value of secondPointOnLineOrDirectionOfLine, an exception is thrown. |
| VectorD[] CalculateIntersectionsOfLineSegmentAndPolygon | ( | VectorD | startPositionOfSegment, |
| VectorD | endPositionOfSegment, | ||
| string | linesName, | ||
| string | nameOfSegmentStart, | ||
| string | nameOfSegmentEnd, | ||
| bool | ignoreVirtualVertices, | ||
| out(string, string)[] | namesOfPoints | ||
| ) |
Method for calculating the intersection points of a given line segment and this polygon
| startPositionOfSegment | The start position of the line segment. |
| endPositionOfSegment | The end position of the line segment. |
| linesName | Name of the line to intersect with the polygon. |
| nameOfSegmentStart | Name of the start point of the line segment to be intersected with the polygon. |
| nameOfSegmentEnd | Name of the end point of the line segment to be intersected with the polygon. |
| ignoreVirtualVertices | If true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead. |
| namesOfPoints | Array which contains the names of the intersection points. |
|
static |
Method for calculating the union of two polygons. See ITN.067 for more information.
| polygon1 | First of the polygons to unite. |
| polygon2 | Second of the polygons to unite. |
| ignoreVirtualVertices | If true, only effective vertices are used. That will be sufficient for most geometrical cases. If it is about triangulation, all vertices are needed instead. |
| holes | A list of holes that do not belong to the mathematical union set but which can be not represented by the returned simple polygon. |
Null will be returned in case of the two given polygons being separate or touching in one single contact point at most.
|
static |
Check whether a polygonal chain is convex and monotone.
| polygonalPoints | Points of the polygonal chain to check. |
| monotone_inX | Out parameter which is true, if the polygon is monotone in x. |
| monotone_inY | Out parameter which is true, if the polygon is monotone in y. |
| boundingBox | The bounding box of the polygon. |
| minX_vertexIndices | Out parameter which is a list of the indices of those vertices which have the minimum x-coordinate. |
| maxX_vertexIndices | Out parameter which is a list of the indices of those vertices which have the maximum x-coordinate. |
| minY_vertexIndices | Out parameter which is a list of the indices of those vertices which have the minimum y-coordinate. |
| maxY_vertexIndices | Out parameter which is a list of the indices of those vertices which have the maximum y-coordinate. |
True if the polygon which is described by the chain is convex.| override object Clone | ( | ) |
Deep copy of the object.
|
static |
Method which checks whether the vertices of a polygon are given in clockwise order. If so, it will be returned unchanged. If not, a polygon with reversed vertex order is returned.
| polygon2check | Polygon to check for clockwise vertex order. |
|
static |
Method which checks whether the vertices of a polygon are given in counterclockwise order. If so, it will be returned unchanged. If not, a polygon with reversed vertex order is returned.
| polygon2check | Polygon to check for counterclockwise vertex order. |
| override bool Equals | ( | object | obj, |
| EqualityIntent | equalityIntent | ||
| ) |
Equality operator.
| obj | |
| equalityIntent | Defines what kind of equality you want to check when comparing two objects, for example all values or physical equality. |
Implements IRegion1D2D.
|
static |
Method which extends a convex polygon by a given point. The polygon is meant to be the convex hull of a triangulated point cloud as described in ITN.065.
| polygon | Polygon to be extended. |
| pointIndicesOfPolygonVertices | List of indices which correspond to the list of points the polygon is the convex hull for. |
| singlePoint | Outlying point to be a new vertex of the polygon. |
| pointIndexOfSinglePoint | Index of the single point in the point cloud. |
| newTrianglesForExtension | Adding the new vertex will usually remove old edges which lie inside the new polygon now. This out parameters gives all triangle which are defined by the removed edge and the new point. |
| void ExtrapolatedRegionBorders | ( | RectanglePhysical | boundingBox, |
| out List< Tuple< bool, double > > | leftBorders, | ||
| out List< Tuple< bool, double > > | topBorders, | ||
| out List< Tuple< bool, double > > | rightBorders, | ||
| out List< Tuple< bool, double > > | bottomBorders | ||
| ) |
Determine region borders that can be created by 'border continuation' extrapolation. //See ITN.064 for more information.
| boundingBox | bounding box to limit the region |
| leftBorders | left horizontal extrapolated borders |
| topBorders | top vertical extrapolated borders |
| rightBorders | right horizontal extrapolated borders |
| bottomBorders | bottom vertical extrapolated borders |
| PolygonVertexList Get_EffectiveVertices | ( | ) |
Method which creates a new PolygonVertexList containing only effective vertices.
|
virtual |
Method which checks whether or not a point lies inside or outside the 2D region or on its boundary.
| point | The point to be checked whether it lies inside. |
| extrapolation2use | Extrapolation info actually to be used. |
Implements Region2D.
| InsideOutside InOutRelation_boundingBoxBorder_extrapolated | ( | VectorD | point, |
| RectanglePhysical | boundingBox, | ||
| List< Tuple< bool, double > > | leftBorders, | ||
| List< Tuple< bool, double > > | topBorders, | ||
| List< Tuple< bool, double > > | rightBorders, | ||
| List< Tuple< bool, double > > | bottomBorders, | ||
| ExtrapolationInfo | extrapolation2use | ||
| ) |
If a simple polygon is used inside a composed region, we may need a special handling for points near a given bounding box. If there are edges of neighbored vertices exactly on a border of the bounding box, the border may effectively disappear in case of 'periodic' or 'border continuation' extrapolation. See ITN.064 for more information on the mode 'border continuation'.
| point | Point to get the InOut-relation for. |
| boundingBox | Bounding box of the parenting composed region. |
| leftBorders | Help list of extrapolated horizontal borders left of the bounding box. The list has to be created in a previous preprocessing. |
| topBorders | Help list of extrapolated vertical borders above the top of the bounding box. The list has to be created in a previous preprocessing. |
| rightBorders | Help list of extrapolated horizontal borders right of the bounding box. The list has to be created in a previous preprocessing. |
| bottomBorders | Help list of extrapolated vertical borders right of the bounding box. The list has to be created in a previous preprocessing. |
| extrapolation2use | Extrapolation info actually to be used. |
|
static |
Fast method for checking whether a point lies inside a given triangle. Important: No check for collinearity is done (for performance reasons).
| point | Point to check. |
| vertex1 | First triangle vertex. |
| vertex2 | Second triangle vertex. |
| vertex3 | Third triangle vertex. |
| useNumericalChecks | If true, NumericalChecks comparison is used in order to tolerate numerical errors. |
|
static |
Method which checks whether or not a polygon (for the given order of the vertices!) is self intersecting.
| vertices | Vertices of the polygon to be checked. The order is important. |
| counterClockwiseDefinition | Flag indicating whether the polygon is defined counterclockwise or not. |
true if the polygon is self intersecting.
|
virtual |
Method which determines whether or not non zero values (i.e. 'inside' states) may appear outside the polygon in case of 'border continuation' extrapolation.
| maybeNonZeroLeft | Are inside states possible at the left? |
| maybeNonZeroRight | Are inside states possible at the right? |
| maybeNonZeroBottom | Are inside states possible at the bottom? |
| maybeNonZeroTop | Are inside states possible at the top? |
Implements Region2D.
|
static |
Unequals operator.
| o1 | |
| o2 |
|
static |
Equals operator
| o1 | |
| o2 |
|
static |
Method for creating a polygon without virtual vertices from an arbitrary polygon.
| polygon | Polygon which may contain virtual vertices. |
|
static |
Static method for transforming a given polygon to another one which is rotated by an angle around a given rotation center.
| polygon | The polygon to be rotated. |
| angle | The angle to rotate the polygon with. |
| centerOfRotation | The center to rotate the polygon around. |
|
static |
Static method for transforming a given polygon to another one with defined position and size.
| polygon | Polygon to be transformed. |
| targetBoundingBox | Target position and size. |
|
static |
Static method for transforming a given polygon to another one which is translated by a given vector.
| polygon | The polygon to be shifted. |
| translationVector | The shifting vector. |
| int startIndexOfNearestEdge |
Calculates the distance of a point to the border of this polygon. Important: This method will ignore all extrapolation settings!
| point | Point to calculate the distance for. |
| ignoreVirtualVertices | If set to true, virtua vertices will be ignored. |