Eyeshot 11 WinForms API Reference
WinForms Assembly / devDept.Eyeshot Namespace / ViewportLayout Class / FindClosestVertex Method / FindClosestVertex(Point,Double,Point3D) Method
Mouse position (zero on top)
Limit the search to points at this distance in pixels from mouse cursor position
The closest vertex as a 3D point

In This Topic
    FindClosestVertex(Point,Double,Point3D) Method
    In This Topic
    Looks for the model vertex whose 2D screen projection is closer to the mouse cursor.
    Syntax
    'Declaration
     
    Public Overloads Function FindClosestVertex( _
       ByVal mousePos As Point, _
       ByVal maxDistance As Double, _
       ByRef closest As Point3D _
    ) As Integer
    public int FindClosestVertex( 
       Point mousePos,
       double maxDistance,
       out Point3D closest
    )

    Parameters

    mousePos
    Mouse position (zero on top)
    maxDistance
    Limit the search to points at this distance in pixels from mouse cursor position
    closest
    The closest vertex as a 3D point

    Return Value

    The entity index if the closest vertex is nearer than maxDistance, -1 otherwise.
    Remarks
    The closest point is in the coordinate space of the CurrentBlockReference so, if there is a current BlockReference, to get the 3D world coordinates of the closest point you need to transform it by the CurrentTransformation.
    See Also