oevislib_net  0.14.3.0
Loading...
Searching...
No Matches

The 2D representation of a straight line on the Cartesian system. More...

Inheritance diagram for oevislib_net.Geometry.Line2D:

Public Member Functions

bool Equals (Line2D other)
override bool Equals (object obj)
override int GetHashCode ()
override object Clone ()
Line2D Features
See also
Features
float GetOrientation ()
 Computes the line orientation.
Vector2D GetNormalVector (bool inReverse)
 Computes the vector normal to the line.
Point2D GetPoint (float inCoordinate, Axis inAxis)
 Returns a point on the line with the provided coordinate.
Line2D Spatial Transforms
Line2D Translate (Vector2D inDelta, TranslateAlignment inDeltaAlignment, bool inInverse)
 Translates the line using the provided vector.
Line2D Rotate (float inAngle, Point2D inCenter, bool inInverse)
 Rotates the line around a center point.
Conditional< Segment2DTrim (Box inBox)
 Trims the line so that it is entirely contained in a box.
Conditional< Segment2DTrim (Rectangle2D inRectangle)
 Trims the line so that it is entirely contained in a rectangle.
Line2D Align (UCS2D inAlignment, bool inInverse)
 Aligns the line to a new coordinate system.
Line2D Rescale (float inScale, Point2D inReferencePoint, bool inInverse)
 Rescales the line using a scale factor.
Line2D Relations
See also
Relations
bool Contains (Point2D inPoint, float inError)
 Returns true if the point belongs to the line.

Static Public Member Functions

static bool operator== (Line2D inLine2D1, Line2D inLine2D2)
static bool operator!= (Line2D inLine2D1, Line2D inLine2D2)

Line2D Basics

See also
Basics
static Line2D Deserialize (ByteBuffer inBuffer)
 De-serialize a Line2D buffer.
 Line2D ()
 Creates a default Line2D.
 Line2D (float inA, float inB, float inC)
 Creates a new Line2D from A, B and C values.
 Line2D (Point2D inPoint1, Point2D inPoint2)
 Creates a new Line2D object passing through two points.
 Line2D (Point2D inPoint, float inAngle)
 Creates a new Line2D object passing through a point and having the provided direction.
float GetA ()
 Returns the coefficient A of the equation.
float GetB ()
 Returns the coefficient B of the equation.
float GetC ()
 Returns the coefficient C of the equation.
void SetA (float inA)
 Sets a new value for the coefficient A in the equation.
void SetB (float inB)
 Sets a new value for the coefficient B in the equation.
void SetC (float inC)
 Sets a new value for the coefficient C in the equation.
void SetCoefficients (Optional< float > inA=null, Optional< float > inB=null, Optional< float > inC=null)
 Set all the coefficients of the line.
float GetM ()
 Returns the slope of the line.
float GetQ ()
 Returns the intercept of the line.
bool IsVertical ()
 Returns true if the line is vertical, false otherwise.
bool IsHorizontal ()
 Returns true if the line is horizontal, false otherwise.
bool HasSlope ()
 Returns true if the line is neither vertical nor horizontal.
ByteBuffer Serialize ()
 Serializes the object.

Detailed Description

The 2D representation of a straight line on the Cartesian system.

The line is described using the general form Ax + By + C = 0. In addition, the coefficients are normalized so that their squared sum is 1.