vtkLocator is an abstract base class for spatial search objects, or locators. The principle behind locators is that they divide 3-space into small regions (or “buckets”) that can be quickly found in response to queries about point location, line intersection, or object-object intersection.
Methods
extend
Method use to decorate a given object (publicAPI+model) with vtkLocator characteristics.
Argument
Type
Required
Description
publicAPI
Yes
object on which methods will be bounds (public)
model
Yes
object on which data structure will be bounds (protected)
initialValues
ILocatorInitialValues
No
(default: {})
getAutomatic
Get whether locator depth/resolution of locator is computed automatically from average number of entities in bucket.
getDataSet
Get the dataset associated with this locator.
Returns
Type
Description
vtkDataSet
The dataset associated with this locator.
getLevel
Get the current level of the locator.
Returns
Type
Description
Number
The current level of the locator.
getMaxLevel
Get the maximum level of the locator.
Returns
Type
Description
Number
The maximum level of the locator.
getTolerance
Get the tolerance used for the locator.
Returns
Type
Description
Number
The tolerance value.
getUseExistingSearchStructure
Get whether to use an existing search structure.
Returns
Type
Description
Boolean
Whether an existing search structure is used.
setAutomatic
Set whether locator depth/resolution of locator is computed automatically from average number of entities in bucket.
export interface vtkLocator extends vtkObject { /** * Get whether locator depth/resolution of locator is computed automatically * from average number of entities in bucket. */ getAutomatic(): boolean;
/** * Get the dataset associated with this locator. * * @returns {vtkDataSet} The dataset associated with this locator. */ getDataSet(): vtkDataSet;
/** * Get the current level of the locator. * * @returns {Number} The current level of the locator. */ getLevel(): number;
/** * Get the maximum level of the locator. * * @returns {Number} The maximum level of the locator. */ getMaxLevel(): number;
/** * Get the tolerance used for the locator. * * @returns {Number} The tolerance value. */ getTolerance(): number;
/** * Get whether to use an existing search structure. * * @returns {Boolean} Whether an existing search structure is used. */ getUseExistingSearchStructure(): boolean;
/** * Set whether locator depth/resolution of locator is computed automatically * from average number of entities in bucket. * * @param {Boolean} automatic - The automatic flag. * @returns {Boolean} Whether the operation was successful. */ setAutomatic(automatic: boolean): boolean;
/** * Set the dataset associated with this locator. * * @param {vtkDataSet} dataSet - The dataset to associate with this locator. * @returns {Boolean} Whether the operation was successful. */ setDataSet(dataSet: vtkDataSet): boolean;
/** * Set the current level of the locator. * * @param {Number} level - The level to set. * @returns {Boolean} Whether the operation was successful. */ setLevel(level: number): boolean;
/** * Set the maximum level of the locator. * * @param {Number} maxLevel - The maximum level to set. * @returns {Boolean} Whether the operation was successful. */ setMaxLevel(maxLevel: number): boolean;
/** * Set the tolerance used for the locator. * * @param {Number} tolerance - The tolerance value to set. * @returns {Boolean} Whether the operation was successful. */ setTolerance(tolerance: number): boolean;
/** * Set whether to use an existing search structure. * * @param {Boolean} useExistingSearchStructure - Whether to use an existing search structure. * @returns {Boolean} Whether the operation was successful. */ setUseExistingSearchStructure(useExistingSearchStructure: boolean): boolean; }
// ---------------------------------------------------------------------------- // Static API // ----------------------------------------------------------------------------
/** * Method use to decorate a given object (publicAPI+model) with vtkLocator characteristics. * * @param publicAPI object on which methods will be bounds (public) * @param model object on which data structure will be bounds (protected) * @param {ILocatorInitialValues} [initialValues] (default: {}) */ exportfunctionextend( publicAPI: object, model: object, initialValues?: ILocatorInitialValues ): void;
/** * vtkLocator is an abstract base class for spatial search objects, or locators. * The principle behind locators is that they divide 3-space into small regions * (or "buckets") that can be quickly found in response to queries about point * location, line intersection, or object-object intersection. */ export declare constvtkLocator: { extend: typeof extend; };
exportdefault vtkLocator;
index.js
import macro from'vtk.js/Sources/macros';
functionvtkLocator(publicAPI, model) { // Set our className model.classHierarchy.push('vtkLocator'); }