ILine_DG Interface
Represents a 3D ray (axis) defined by its origin and direction.
A standalone line can be constructed via IObjectGenerator_DG.Create("ILine_DG") > ILine_DG query.
Implements also: IObject_DG.
- Init
- Init1
- Init2
- GetOrigin
- SetOrigin
- GetDirection
- SetDirection
- DirectTowards
- GetPoint
- ReverseDirection
- GetDistance
- GetDistanceLine
- GetLineIntersection
- GetAngle
- GetPointLocation
- GetPointPosition
- IsCollinear
- IsCoplanar
- GetLineLocation
- Rotate
- Slide
- Copy
- Clone
- GetPointProjection
- GetPointProjection1
- GetVectorProjection
void Init(Point_DG origin, Vect_DG direction)
void Init1(Point_DG end0, Point_DG end1)
void Init2(Line_DG line)
Point_DG GetOrigin()
void SetOrigin(Point_DG origin)
Vect_DG GetDirection()
void SetDirection(Vect_DG direction)
void DirectTowards(Point_DG target, bool success)
Point_DG GetPoint(double u)
void ReverseDirection()
double GetDistance(Point_DG point, out Point_DG pointNearestOnThis, out double paramOnThis)
Computes distance point to this line.
pointNearestOnThis - [out] Parameter along this of the nearest point (distance origin to the point).
double GetDistanceLine(ILine_DG line, out double paramNearestThis, out double paramNearestLine)
Computes distance between two 3D lines.
paramNearestThis - [out] Parameter along this of the nearest point on this (distance origin to the point). Random if lines are collinear
paramNearestLine - [out] Parameter along line of the nearest point on line (distance origin to the point). Random if lines are collinear
bool GetLineIntersection(ILine_DG* line, double tolerance, out double* paramThis, out double* paramLine, out Point_DG* intersection)
Returns false if there is no single intersection point
paramThis - [out] Parameter of the intersection point on this (distance origin to the point).
paramLine - [out] Parameter of the intersection point on line.
double GetAngle(ILine_DG line)
Returns angle between the two lines in radians.
PointVsLineLocation_DG GetPointLocation(Point_DG point)
PointVsLineLocation_DG GetPointLocation(Point_DG point, double tolerance)
double GetPointPosition(Point_DG point)
Returns parameter of the point along the line, which is equal to distance to origin. Uses projection to the line if the point is outside.
bool IsCollinear(ILine_DG iLine, double tolerance)
bool IsCoplanar(ILine_DG line, double tolerance)
LineVsLineLocation_DG GetLineLocation(ILine_DG line)
LineVsLineLocation_DG GetLineLocation(ILine_DG line, double tolerance)
void Rotate(ILine_DG axis, double angleBy)
angleBy is expected in radians.
void Slide(double dist)
Slides origin along the line by dist, which can be negative.
void Copy(ILine_DG line)
ILine_DG Clone()
Returns a new copy of this.
Point_DG GetPointProjection(Point_DG point)
double GetPointProjection1(Point_DG point)
Returns parameter of the projected point.
Vect_DG GetVectorProjection(Vect_DG vector)
|