Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions | Properties
ILPoint Interface Reference

This interface represents a single point(LPoint object). More...

Inheritance diagram for ILPoint:
ILGeomObject ILObject LPoint

Public Member Functions

double Collinear (ILPoint *point1, ILPoint *point2)
 
double Distance (ILPoint *point)
 
double DistanceWithRefLine (ILPoint *point, ILLine *refLine)
 
double DotProduct (ILPoint *point)
 
void Draw (HDC hdc, double zoomX, double zoomY, double panX, double panY)
 
void FromSortable (ILSortable *sortable, LPVPositionMode posMode)
 
ILPointMidPoint (ILPoint *point)
 
ILPointScale (double factorX, double factorY)
 
void Set (double x, double y)
 
ILPointTransform (ILTransform *tf)
 
ILPointTranslate (double offsetX, double offsetY)
 
- Public Member Functions inherited from ILGeomObject
void Drag (LPVGeomHandle geomHandle, int posX, int posY, double zoomX, double zoomY, double panX, double panY)
 
void EnableHandle (LPVGeomHandle geomHandle, BOOL enabled)
 
LPVGeomHandle HitTest (int posX, int posY, double zoomX, double zoomY, double panX, double panY)
 
void ScaleTo (double factorX, double factorY)
 
void TransformTo (ILTransform *tf)
 
void TranslateTo (double offsetX, double offsetY)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Properties

double X [get, set]
 The x-coordinate of the point.
 
double Y [get, set]
 The y-coordinate of the point.
 
- Properties inherited from ILObject
LString Name [get, set]
 Name of the object. By default, the object has no name.
In most cases, LPV classes don't make use of the names.
The name is drawn on canvas around the object if ILDrawable::SetDrawName() is enabled. More...
 

Detailed Description

This interface represents a single point(LPoint object).

Member Function Documentation

◆ Collinear()

double Collinear ( ILPoint point1,
ILPoint point2 
)

Evaluate whether this and the two given points are collinear

Parameters
[in]point1The first input point
[in]point2The second input point
Return values
Returnthe evaluation result, it's a value in (0, 1). For points on a perfect line, it's 1.

◆ Distance()

double Distance ( ILPoint point)

Calculate the distance between this and the input point

Parameters
[in]pointThe input point
Return values
Returnthe distance

◆ DistanceWithRefLine()

double DistanceWithRefLine ( ILPoint point,
ILLine refLine 
)

Calculate the distance between this and the input point in direction of the reference line

Parameters
[in]pointThe input point
[in]refLineThe input reference line
Return values
Returnthe distance

◆ DotProduct()

double DotProduct ( ILPoint point)

Calculate the dot-product of this and the input point

Parameters
[in]pointThe input point
Return values
Returnthe dot-product result

◆ Draw()

void Draw ( HDC  hdc,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw the point on HDC.

Since
2.12 The shape parameter is deprecated and should be set via ILDrawable::SetDrawPoint()
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ FromSortable()

void FromSortable ( ILSortable sortable,
LPVPositionMode  posMode 
)

Set placement of the point from the input sortable object.

Parameters
[in]sortableThe input sortable object
[in]posModeSpecify which point is used as the object's position, usually the center.

◆ MidPoint()

ILPoint* MidPoint ( ILPoint point)

Get the middle point of this and the input point

Parameters
[in]pointThe input point
Return values
Returnthe middle point

◆ Scale()

ILPoint* Scale ( double  factorX,
double  factorY 
)

Scale the point by the given factor and return a new point

Parameters
[in]factorXThe scale factor of x-coordinate
[in]factorYThe scale factor of y-coordinate. Set to 0 means same zoom factor as factorX, aka. isotropic scaling
Return values
Returnthe new point

◆ Set()

void Set ( double  x,
double  y 
)

Set placement of the point

Parameters
[in]xThe x-coordinate of the point
[in]yThe y-coordinate of the point

◆ Transform()

ILPoint* Transform ( ILTransform tf)

Transform the point via the given transformation and return a new point

Parameters
[in]tfThe transformation.
Return values
Returnthe new point

◆ Translate()

ILPoint* Translate ( double  offsetX,
double  offsetY 
)

Translate the point by the given offset and return a new point

Parameters
[in]offsetXThe x-coordinate of the offset
[in]offsetYThe y-coordinate of the offset
Return values
Returnthe new point