DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


ILine2d_DG Interface

Init
Init1
GetOrigin
SetOrigin
GetDirection
SetDirection
DirectTowards
GetPoint
ReverseDirection
GetDistance
GetAngle
GetPointLocation
IsCollinear
Copy
Clone

ILine2d_DG represents a 2D line/ray/axis defined by its origin point and a direction

A standalone 2D line can be constructed via IObjectGenerator_DG.Create("ILine2d_DG") > ILine2d_DG query.

Implements also: ICurve_DG, IObject_DG.


void Init(DG2D origin, DG2D direction)


void Init1(Point_DG end0, Point_DG end1)

Raises an exception if end0 and end1 coinside (are closer than gTol(=1e-10)


DG2D GetOrigin()


void SetOrigin(DG2D origin)


DG2D GetDirection()


void SetDirection(DG2D direction)


bool DirectTowards(DG2D target)

Returns false if target coinsides with the origin or this has invalid (zero length) direction


DG2D GetPoint(double u)

Parameter u is the distance from the origin


void ReverseDirection()


double GetDistance(DG2D point, out DG2D pointNearestOnThis, out double paramOnThis)


double GetAngle(ILine2d_DG line)

Returns angle between directions of the two lines


PointVs2dLineLocation_DG GetPointLocation(Point_DG point, double tolerance)

Identifies relative position of the point.


bool IsCollinear(ILine2d_DG line, double tolerance)


void Copy(ILine2d_DG ray)


ILine2d_DG Clone()