|
oevislib_net
0.14.3.0
|
A 2D representation of a rectangle in the Cartesian space. More...
Public Member Functions | |
| bool | Equals (Rectangle2D other) |
| override bool | Equals (object obj) |
| override int | GetHashCode () |
| override object | Clone () |
Rectangle2D Constructions | |
| |
| void | Split (Rectangle2D outRectangle1, Rectangle2D outRectangle2, SplitDirection inSplitDirection) |
| Splits the rectangle along the provided direction. | |
Rectangle2D Features | |
| |
| Point2D | GetCenter () |
| Returns the rectangle center. | |
| Point2D | GetCorner (RectangleCorner inRectangleCorner) |
| Returns a rectangle corner. | |
| void | GetCorners (Point2D outTopLeft, Point2D outTopRight, Point2D outBottomRight, Point2D outBottomLeft) |
| Computes all the rectangle corners. | |
| Point2D | GetAnchoredPoint (Anchor2D inPointAnchor) |
| Computes the rectangle points found at the provided anchor. | |
| float | GetArea () |
| Returns the rectangle area. | |
| float | GetPerimeter () |
| Returns the rectangle perimeter. | |
| Box | GetBoundingBox () |
| Returns the box with minimum area that contains the entire rectangle. | |
| Circle2D | GetBoundingCircle () |
| Returns the circle with minimum area that contains the entire rectangle. | |
Rectangle2D Normalizations | |
| |
| void | NormalizeOrientation (float inReferenceAngle, RectangleOrientation inRectangleOrientation) |
| Normalizes the rectangle's angle value. | |
Rectangle2D Relations | |
| |
| bool | Contains (Point2D inPoint) |
| Checks if the object contains the provided point. | |
| bool | Contains (Array< Point2D > inPoints, Optional< Array< bool > > outIsContainedArray, Optional< Array< Point2D > > outPoints) |
| Checks if all the points in the array are contained in the rectangle. | |
| bool | IntersectsWith (Rectangle2D inReferenceRectangle, Optional< float > outOverlapArea=null) |
| Checks if the object intersect with the provided rectangle. | |
Rectangle2D Spatial Transforms | |
| |
| Rectangle2D | Translate (Vector2D inDelta, bool inInverse) |
| Translates the rectangle using the provided vector. | |
| Rectangle2D | Rotate (float inAngle, Optional< Point2D > inCenter=null, bool inInverse=false) |
| Rotates the rectangle around a point. | |
| Rectangle2D | Align (UCS2D inAlignment, bool inInverse) |
| Aligns the rectangle to a new coordinate system. | |
| Rectangle2D | Rescale (float inScale=1.0f, Optional< Point2D > inReferencePoint=null, bool inInverse=false) |
| Rescales the rectangle using a scale factor. | |
| Rectangle2D | Resize (Anchor2D inAnchor, Optional< float > inNewWidth=null, Optional< float > inNewHeight=null) |
| Changes the dimensions of the rectangle, while keeping an anchor point fixed. | |
| Rectangle2D | Resize (Anchor2D inAnchor, float inWidthScale, float inHeightScale) |
| Changes the dimensions of the rectangle using a scaling factor, while keeping an anchor point fixed. | |
| Rectangle2D | ResizeRelative (Anchor2D inAnchor, float inWidthDelta, float inHeightDelta) |
| Changes the dimensions of the rectangle by adding a certain quantity to each dimension, while keeping an anchor point fixed. | |
| Rectangle2D | Inflate (float inMargin) |
| Increases rectangle dimension by some amount. | |
Properties | |
| Point2D | Origin = new Point2D(0.0f, 0.0f) [get, set] |
| float | Angle = 0.0f [get, set] |
| float | Width = 0.0f [get, set] |
| float | Height = 0.0f [get, set] |
Rectangle2D Basics | |
| |
| static bool | operator== (Rectangle2D inRectangle2D1, Rectangle2D inRectangle2D2) |
| static bool | operator!= (Rectangle2D inRectangle2D1, Rectangle2D inRectangle2D2) |
| static Rectangle2D | Deserialize (ByteBuffer inBuffer) |
| De-serialize a Rectangle2D buffer. | |
| Rectangle2D () | |
| Creates a Rectangle2D with default values. | |
| Rectangle2D (Point2D inOrigin, float inAngle, float inWidth, float inHeight) | |
| Creates a new Rectangle2D given origin, angle, width and height. | |
| Rectangle2D (float inX, float inY, float inAngle, float inWidth, float inHeight) | |
| Creates a new Rectangle2D given origin coordinates, angle, width and height. | |
| Rectangle2D (Point2D inPoint, Anchor2D inPointAnchor, float inAngle, float inWidth, float inHeight) | |
| Creates a new Rectangle2D using the provided anchor point. | |
| Rectangle2D (Point2D inOrigin, Point2D inPoint, float inAngle) | |
| Creates a new Rectangle2D given its origin, the opposite point and the angle. | |
| ByteBuffer | Serialize () |
| Serializes the object. | |
A 2D representation of a rectangle in the Cartesian space.