DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Expand ModelsModels
Expand DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Expand ModelModel
Expand ViewView
Expand General ComputingGeneral Computing
Expand ViewsViews
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > API Reference > General Geometry > Curves > 2D > ILine2d_DG Go to DGKC docs Search Documentation


ILine2d_DG Interface

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

A standalone 2D line can be constructed with a IObjectGenerator_DG.Create("ILine2d_DG") call.

Implements also: ICurve_DG, IObject_DG.

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

void Init(DG2D origin, DG2D direction)


void Init1(DG2D end0, DG2D 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(DG2D point, double tolerance)

Identifies relative position of the point.


bool IsCollinear(ILine2d_DG line, double tolerance)


void Copy(ILine2d_DG ray)


ILine2d_DG Clone()