VisuNodeFinder

VisuNodeFinder — provide a node lookup based on coordinates.

Functions

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuNodeFinder

Description

This object can be used to find nodes based on coordinates in a linear scaling complexity.

Functions

visu_node_finder_new ()

VisuNodeFinder *
visu_node_finder_new (VisuData *data);

Creates a new VisuNodeFinder to look for node from coordinates.

Parameters

data

a VisuData object.

 

Returns

a pointer to the VisuNodeFinder it created or NULL otherwise.

Since: 3.8


visu_node_finder_getData ()

VisuData *
visu_node_finder_getData (VisuNodeFinder *finder);

Get the VisuData object the finder is working on.

Parameters

finder

a VisuNodeFinder object.

 

Returns

the corresponding VisuData the finder work on.

[transfer full]

Since: 3.8


visu_node_finder_lookup ()

gint
visu_node_finder_lookup (VisuNodeFinder *finder,
                         const gfloat at[3],
                         gfloat tol);

Giving the cartesian coordinates at , this method lookup for the closest VisuNode within a radius of tol .

Parameters

finder

a VisuNodeFinder object.

 

at

.

[array fixed-size=3]

tol

a float.

 

Returns

the id of the closest node to at (within a maximum radius of tol ). If none is found, returns -1.

Since: 3.8


visu_node_finder_lookupArray ()

void
visu_node_finder_lookupArray (VisuNodeFinder *finder,
                              gint *ids,
                              const gfloat *at,
                              guint np,
                              gfloat tol);

Apply visu_node_finder_lookup() on the array at . It's used mainly for bindings.

Parameters

finder

a VisuNodeFinder object.

 

ids

an allocated array of size np .

[type gint64]

at

an allocated array of size 3 * np , with coordinates to be tested.

[type gint64]

np

the number of coordinates to be tested.

 

tol

a radius to find the nodes in.

 

Since: 3.8

Types and Values