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

Scene attribute to control the rendering of embedded heightfield geometry. More...

#include <iregular_heightfield.h>

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

Public Types

enum  Geometry_type {
  TYPE_NONE = 0 ,
  TYPE_ISOLATED_POINTS = 1 ,
  TYPE_CONNECTING_LINES = 2 ,
  TYPE_SEED_POINTS = 4 ,
  TYPE_SEED_LINES = 8 ,
  TYPE_ALL = 0xFF
}
 Types of geometry to which this attribute should apply. More...
 
enum  Color_mode {
  MODE_FIXED = 0 ,
  MODE_MATERIAL = 1 ,
  MODE_VOLUME_TEXTURE = 2 ,
  MODE_COMPUTED_TEXTURE = 3
}
 Which colors should be mapped onto the geometry. More...
 
enum  Render_mode {
  RENDER_DEFAULT = 0 ,
  RENDER_Z_AXIS_ALIGNED = 1 ,
  RENDER_SCREEN_ALIGNED = 2 ,
  RENDER_RASTERIZED = 3 ,
  RENDER_NONE = 4
}
 How the geometry should be rendered. More...
 

Public Member Functions

virtual void set_type_mask (mi::Uint32 type_mask)=0
 Controls which types of embedded geometry this attribute should apply to. More...
 
virtual mi::Uint32 get_type_mask () const =0
 Returns which types of embedded geometry this attribute should apply to. More...
 
virtual void set_visible (bool visible)=0
 Controls whether the selected types of geometry should be shown. More...
 
virtual bool get_visible () const =0
 Controls whether the selected types of geometry should be shown. More...
 
virtual void set_color (const mi::math::Color_struct &color)=0
 Sets the fixed color used for rendering. More...
 
virtual const mi::math::Color_struct & get_color () const =0
 Returns the fixed color used for rendering. More...
 
virtual void set_color_mode (Color_mode color_mode)=0
 Sets the color mode for embedded geometry. More...
 
virtual Color_mode get_color_mode () const =0
 Returns the color mode for embedded geometry. More...
 
virtual void set_render_mode (Render_mode render_mode)=0
 Sets the rendering mode for embedded geometry. More...
 
virtual Render_mode get_render_mode () const =0
 Returns the rendering mode for embedded geometry. More...
 
virtual void set_geometry_size (mi::Float32 size)=0
 Controls the size of the geometry elements. More...
 
virtual mi::Float32 get_geometry_size () const =0
 Returns the size of the geometry elements. More...
 
virtual void set_opacity_ramp_distances (const mi::math::Vector_struct< mi::Float32, 2 > &distances)=0
 Controls how geometry far away from the camera should be faded out. More...
 
virtual const mi::math::Vector_struct< mi::Float32, 2 > & get_opacity_ramp_distances () const =0
 Returns the parameters of how geometry far away from the camera should be faded out. More...
 
virtual void set_render_offset (mi::Float32 offset)=0
 Controls the offset that is added to the geometry in the RENDER_Z_AXIS_ALIGNED mode, to prevent z-fighting with the heightfield. More...
 
virtual mi::Float32 get_render_offset () const =0
 Returns the offset between the geometry and the heightfield used in the RENDER_Z_AXIS_ALIGNED mode. More...
 

Detailed Description

Scene attribute to control the rendering of embedded heightfield geometry.

The embedded geometry is closely associated with the heightfield, but rendered separately. This attribute allows to control which of the different types of embedded geometry should be shown and how they should be visualized.

Member Enumeration Documentation

 Color_mode

Which colors should be mapped onto the geometry.

Enumerator
MODE_FIXED 

Use the fixed color specified by set_color()

MODE_MATERIAL 

Apply the heightfield material and multiply the result with the fixed color.

MODE_VOLUME_TEXTURE 

Sample the active volume at the position of each geometry object and multiply the result with the fixed color.

MODE_COMPUTED_TEXTURE 

Sample the active computed heightfield texture at the position of each geometry object and multiply the result with the fixed color.

 Geometry_type

Types of geometry to which this attribute should apply.

Enumerator
TYPE_NONE 

Attribute will be ignored.

TYPE_ISOLATED_POINTS 

Isolated points.

TYPE_CONNECTING_LINES 

Connecting lines.

TYPE_SEED_POINTS 

User-defined points.

TYPE_SEED_LINES 

User-defined lines.

TYPE_ALL 

Apply to all geometry types.

 Render_mode

How the geometry should be rendered.

Enumerator
RENDER_DEFAULT 

Use the default rendering mode of each geometry type.

RENDER_Z_AXIS_ALIGNED 

Render points as discs and lines as quads, with the normal aligned to the z-axis.

This is the default for TYPE_ISOLATED_POINTS and TYPE_CONNECTING_LINES.

RENDER_SCREEN_ALIGNED 

Render points as discs and lines as quads, with the normal aligned to to screen, i.e.

the inverse viewing direction.

RENDER_RASTERIZED 

Render rasterized points and lines.

This is the default for TYPE_SEED_POINTS and TYPE_SEED_LINES.

RENDER_NONE 

Do not render the geometry.

It can still be shown indirectly by IIntersection_highlighting.

Member Function Documentation

 get_color()

virtual const mi::math::Color_struct & nv::index::IHeightfield_geometry_settings::get_color ( ) const
pure virtual

Returns the fixed color used for rendering.

Returns
Fixed color

 get_color_mode()

virtual Color_mode nv::index::IHeightfield_geometry_settings::get_color_mode ( ) const
pure virtual

Returns the color mode for embedded geometry.

Returns
Color mode

 get_geometry_size()

virtual mi::Float32 nv::index::IHeightfield_geometry_settings::get_geometry_size ( ) const
pure virtual

Returns the size of the geometry elements.

Returns
Radius or line width, depending on geometry type.

 get_opacity_ramp_distances()

virtual const mi::math::Vector_struct< mi::Float32, 2 > & nv::index::IHeightfield_geometry_settings::get_opacity_ramp_distances ( ) const
pure virtual

Returns the parameters of how geometry far away from the camera should be faded out.

Returns
Start and end distances of the ramp function, or 0.0 for both if disabled.

 get_render_mode()

virtual Render_mode nv::index::IHeightfield_geometry_settings::get_render_mode ( ) const
pure virtual

Returns the rendering mode for embedded geometry.

Returns
Render mode

 get_render_offset()

virtual mi::Float32 nv::index::IHeightfield_geometry_settings::get_render_offset ( ) const
pure virtual

Returns the offset between the geometry and the heightfield used in the RENDER_Z_AXIS_ALIGNED mode.

Returns
Distance in object space

 get_type_mask()

virtual mi::Uint32 nv::index::IHeightfield_geometry_settings::get_type_mask ( ) const
pure virtual

Returns which types of embedded geometry this attribute should apply to.

Returns
Bit mask of Geometry_type.

 get_visible()

virtual bool nv::index::IHeightfield_geometry_settings::get_visible ( ) const
pure virtual

Controls whether the selected types of geometry should be shown.

Returns
Visibility

 set_color()

virtual void nv::index::IHeightfield_geometry_settings::set_color ( const mi::math::Color_struct &  color)
pure virtual

Sets the fixed color used for rendering.

Parameters
[in]colorThe color is used directly with MODE_FIXED, and modulated to the result for other color modes.

 set_color_mode()

virtual void nv::index::IHeightfield_geometry_settings::set_color_mode ( Color_mode  color_mode)
pure virtual

Sets the color mode for embedded geometry.

Parameters
color_modeMode with which the selected geometry types should be rendered.

 set_geometry_size()

virtual void nv::index::IHeightfield_geometry_settings::set_geometry_size ( mi::Float32  size)
pure virtual

Controls the size of the geometry elements.

Note
In mode RENDER_RASTERIZED the radius and line width used for rendering is fixed. This setting will still be used by the picking, creating an invisible border around the geometry where picks will be detected.
Parameters
sizeRadius or line width, depending on geometry type. Should be less than 1.0 to prevent overlap between adjacent geometry. For RENDER_RASTERIZED a value of 2.0 typically gives good picking results.

 set_opacity_ramp_distances()

virtual void nv::index::IHeightfield_geometry_settings::set_opacity_ramp_distances ( const mi::math::Vector_struct< mi::Float32, 2 > &  distances)
pure virtual

Controls how geometry far away from the camera should be faded out.

When the feature is enabled, embedded geometry with a distance to the camera origin larger than the end distance will not be rendered. The opacity of geometry closer than the end distance but further away than the start distance will be linearly interpolated from fully opaque to fully transparent (using a ramp function).

Parameters
distancesstart and end distance of the ramp function. To disable (the default), set both values to 0.0.

 set_render_mode()

virtual void nv::index::IHeightfield_geometry_settings::set_render_mode ( Render_mode  render_mode)
pure virtual

Sets the rendering mode for embedded geometry.

Parameters
render_modeMode with which the selected geometry types should be rendered.

 set_render_offset()

virtual void nv::index::IHeightfield_geometry_settings::set_render_offset ( mi::Float32  offset)
pure virtual

Controls the offset that is added to the geometry in the RENDER_Z_AXIS_ALIGNED mode, to prevent z-fighting with the heightfield.

Parameters
offsetdistance in object space

 set_type_mask()

virtual void nv::index::IHeightfield_geometry_settings::set_type_mask ( mi::Uint32  type_mask)
pure virtual

Controls which types of embedded geometry this attribute should apply to.

Parameters
type_maskBit mask of values from Geometry_type.

Example: To select both isolated points and connecting lines use

virtual void set_type_mask(mi::Uint32 type_mask)=0
Controls which types of embedded geometry this attribute should apply to.
@ TYPE_ISOLATED_POINTS
Isolated points.
Definition: iregular_heightfield.h:39
@ TYPE_CONNECTING_LINES
Connecting lines.
Definition: iregular_heightfield.h:41

 set_visible()

virtual void nv::index::IHeightfield_geometry_settings::set_visible ( bool  visible)
pure virtual

Controls whether the selected types of geometry should be shown.

Parameters
visibleIf true, the selected types will be rendered.

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