Eyeshot 11 WinForms API Reference
WinForms Assembly / devDept.Eyeshot Namespace / ViewportLayout Class / FindClosestVertex Method / FindClosestVertex(Point,Double,Type,HitVertex) Method
Mouse position (zero on top)
Limit the search to points at this distance in pixels from mouse cursor position
The type of entities to process
The closest vertex, with the full information to retrieve the vertex from a devDept.Eyeshot.Entities.Solid3D or devDept.Eyeshot.Entities.Solid

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

    Parameters

    mousePos
    Mouse position (zero on top)
    maxDistance
    Limit the search to points at this distance in pixels from mouse cursor position
    entType
    The type of entities to process
    closestVertex
    The closest vertex, with the full information to retrieve the vertex from a devDept.Eyeshot.Entities.Solid3D or devDept.Eyeshot.Entities.Solid

    Return Value

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