Purpose

Searches the closest vertex in the cost graph for the given point using a k-d tree.

Usage

Connect a XMarkerListToCostGraph or a similar module to inCostGraph and define the Point.

Details

The cost graph is a base object that carries a Boost graph in the form of an adjacency list. In addition it carries a k-d tree (implementation from the PCL) which is used by this module to find the vertex in the cost graph that is closest to the given Point.

Windows

Default Panel

../../../Projects/MLCostGraph/Modules/mhelp/Images/Screenshots/CostGraphClosestVertex._default.png

Input Fields

inCostGraph

name: inCostGraph, type: MLBase

Base field containing the cost graph.

Parameter Fields

Field Index

[]: Trigger Radius: Float
Clear: Trigger Status Code: Enum
Distance: Double Status Message: String
doNotClearOnFailedUpdate: Bool Update: Trigger
Epsilon: Float Vertex Index: Integer
Has Valid Output: Bool Vertex Position: Vector3
On Input Change Behavior: Enum  
Point: Vector3  

Visible Fields

Update

name: update, type: Trigger

Initiates update of all output field values.

Clear

name: clear, type: Trigger

Clears all output field values to a clean initial state.

On Input Change Behavior

name: onInputChangeBehavior, type: Enum, default: Clear, deprecated name: shouldUpdateAutomatically,shouldAutoUpdate

Declares how the module should react if a value of an input field changes.

Values:

Title Name Deprecated Name
Update Update TRUE
Clear Clear FALSE

Status Code

name: statusCode, type: Enum, persistent: no

Reflects module’s status (successful or failed computations) as one of some predefined enumeration values.

Values:

Title Name
Ok Ok
Invalid input object Invalid input object
Invalid input parameter Invalid input parameter
Internal error Internal error

Status Message

name: statusMessage, type: String, persistent: no

Gives additional, detailed information about status code as human-readable message.

Has Valid Output

name: hasValidOutput, type: Bool, persistent: no

Indicates validity of output field values (success of computation).

[]

name: updateDone, type: Trigger, persistent: no

Notifies that an update was performed (Check status interface fields to identify success or failure).

Radius

name: inRadius, type: Float, default: -1

Maximum radius used for nearest neighbor search in the cost graph. Is ignored if smaller than 0.

Epsilon

name: inEpsilon, type: Float, default: 0

Precision used for nearest neighbor search in the cost graph.

Point

name: inPoint, type: Vector3, default: 0 0 0

Point for which the closest vertex is searched.

Vertex Index

name: outVertexIndex, type: Integer, persistent: no

Index of the closest vertex in the graph.

Vertex Position

name: outVertexPosition, type: Vector3, persistent: no

Coordinates of the closest vertex in the graph.

Distance

name: outDistance, type: Double, persistent: no

Distance between the input point and the closest vertex in the graph.

Hidden Fields

doNotClearOnFailedUpdate

name: doNotClearOnFailedUpdate, type: Bool, persistent: no

Prevents automated clear after update failed. This does not affect status fields. It enables the developer to analyze module’s state after failure.