NVIDIA IndeX API nvidia_logo_transpbg.gif Up
nv::index::IRegular_heightfield_compute_task Class Referenceabstract

Heightfield data specific compute tasks that operate on the values of a heightfield's patch. More...

#include <idistributed_data_edit.h>

Inherits mi::base::Interface_declare< 0xe236fc25, ... >.

Public Member Functions

virtual void get_region_of_interest_for_compute (mi::math::Bbox_struct< mi::Sint32, 2 > &roi) const =0
 The region of interest defines the 2D area in which the compute operation shall take place. More...
 
virtual bool compute (const mi::math::Bbox_struct< mi::Sint32, 2 > &ij_patch_range, mi::Float32 *elevation_values, mi::neuraylib::IDice_transaction *dice_transaction) const =0
 Apply user-defined operations on the heightfield data set's elevation values. More...
 
virtual bool compute (const mi::math::Bbox_struct< mi::Sint32, 2 > &ij_patch_range, mi::Float32 *elevation_values, mi::math::Vector_struct< mi::Float32, 3 > *normal_values, mi::neuraylib::IDice_transaction *dice_transaction) const
 This compute method enables user-defined operations on both the height field's 'elevation and the normal values. More...
 
virtual bool user_defined_normal_computation () const
 The compute tasks allows for user-defined elevation modifications for both user-defined elevation and user-defined normal modifications. More...
 

Detailed Description

Heightfield data specific compute tasks that operate on the values of a heightfield's patch.

Derived implementations of the interface class IRegular_heightfield_compute_task can be applied to the IRegular_heightfield scene elements. Derived class need to implement the interface methods compute() to operate on elevation and normal values of the height field, user_defined_normal_computation to tell the NVIDIA INdeX system if normal values have been modified, and get_region_of_interest_for_compute to define the 2D area of interest that the compute task may operate in.

Passing an instance of an user-defined implementation of this class to the interface class IRegular_heightfield_data_edit::edit() executes the compute task on the heightfield patch stored locally on a cluster machine.

Deprecated:
Once the former IRegular_heightfield is replaced by the newer tile based IHeight_field_scene_element, then this class becomes obsolete and will be removed from the NVIDIA IndeX API.

Member Function Documentation

 compute() [1/2]

virtual bool nv::index::IRegular_heightfield_compute_task::compute ( const mi::math::Bbox_struct< mi::Sint32, 2 > &  ij_patch_range,
mi::Float32 *  elevation_values,
mi::math::Vector_struct< mi::Float32, 3 > *  normal_values,
mi::neuraylib::IDice_transaction *  dice_transaction 
) const
inlinevirtual

This compute method enables user-defined operations on both the height field's 'elevation and the normal values.

Parameters
[in]ij_patch_rangeThe range in which the elevation values of the heightfield patch are defined. The patch range is given in the height field's local space and includes an additional patch boundary, which enables, for instance, rendering interpolated normals.
[in,out]elevation_valuesThe elevation values defined in the given patch range. The elevation values are given by a continuous array whose layout corresponds to the given patch range to efficiently process the values. That is, the grid point of an elevation in the height field's local space can be computed easily based on the array index and the given patch range. The array values may be changed to modify the heightfield's elevation at the IJ grid points.
[in,out]normal_valuesThe normal values defined in the given patch range. The normal values are given by a continuous array whose layout corresponds to the given patch range to efficiently process the values. That is, the grid point of a normal in the height field's local space can be computed easily based on the array index and the given patch range. The array values may be changed to modify the heightfield's normal at the ij grid points.
[in]dice_transactionThe DiCE transaction to use for the operation.
Returns
Shall return true if modifications to the heightfield patch's elevation values have been applied and false otherwise.

 compute() [2/2]

virtual bool nv::index::IRegular_heightfield_compute_task::compute ( const mi::math::Bbox_struct< mi::Sint32, 2 > &  ij_patch_range,
mi::Float32 *  elevation_values,
mi::neuraylib::IDice_transaction *  dice_transaction 
) const
pure virtual

Apply user-defined operations on the heightfield data set's elevation values.

A re-computation of the normal values is not triggered automatically.

Parameters
[in]ij_patch_rangeThe range in which the elevation values of the heightfield patch are defined. The patch range is given in the height field's local space and includes an additional patch boundary, which enables, for instance, rendering interpolated normals.
[in,out]elevation_valuesThe elevation values defined in the given patch range. The elevation values are given by a continuous array whose layout corresponds to the given patch range to efficiently process the values. That is, the grid point of an elevation in the height field's local space can be computed easily based on the array index and the given patch range. The array values may be changed to modify the height field's elevation at the IJ grid points.
[in]dice_transactionThe DiCE transaction to use for the operation.
Returns
Shall return true if modifications to the height field's elevation values have been applied and false otherwise.

 get_region_of_interest_for_compute()

virtual void nv::index::IRegular_heightfield_compute_task::get_region_of_interest_for_compute ( mi::math::Bbox_struct< mi::Sint32, 2 > &  roi) const
pure virtual

The region of interest defines the 2D area in which the compute operation shall take place.

The region of interest is defined in the height field's local space. Based on the returned bounding patch, the NVIDIA IndeX system can determine which heightfield patches need to be considered by the compute task.

Parameters
[out]roiReturns the region of interest in which the heightfield modifications shall take place. The roi is defined in the height field's local space.

 user_defined_normal_computation()

virtual bool nv::index::IRegular_heightfield_compute_task::user_defined_normal_computation ( ) const
inlinevirtual

The compute tasks allows for user-defined elevation modifications for both user-defined elevation and user-defined normal modifications.

The compute tasks need to inform the library which variant to choose

Returns
Tells the library which compute interface to use, i.e., the compute() call that merely allows changing the elevation values or the compute() call that allows changing both the elevation and the normal values.

The documentation for this class was generated from the following file: