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... | |
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.
Which colors should be mapped onto the geometry.
Enumerator | |
---|---|
MODE_FIXED | Use the fixed color specified by |
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. |
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 |
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 |
RENDER_NONE | Do not render the geometry. It can still be shown indirectly by |
|
pure virtual |
Returns the fixed color used for rendering.
|
pure virtual |
Returns the color mode for embedded geometry.
|
pure virtual |
Returns the size of the geometry elements.
|
pure virtual |
Returns the parameters of how geometry far away from the camera should be faded out.
|
pure virtual |
Returns the rendering mode for embedded geometry.
|
pure virtual |
Returns the offset between the geometry and the heightfield used in the RENDER_Z_AXIS_ALIGNED
mode.
|
pure virtual |
Returns which types of embedded geometry this attribute should apply to.
Geometry_type
.
|
pure virtual |
Controls whether the selected types of geometry should be shown.
|
pure virtual |
Sets the fixed color used for rendering.
[in] | color | The color is used directly with MODE_FIXED , and modulated to the result for other color modes. |
|
pure virtual |
Sets the color mode for embedded geometry.
color_mode | Mode with which the selected geometry types should be rendered. |
|
pure virtual |
Controls the size of the geometry elements.
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.size | Radius 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. |
|
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).
distances | start and end distance of the ramp function. To disable (the default), set both values to 0.0. |
|
pure virtual |
Sets the rendering mode for embedded geometry.
render_mode | Mode with which the selected geometry types should be rendered. |
|
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.
offset | distance in object space |
|
pure virtual |
Controls which types of embedded geometry this attribute should apply to.
type_mask | Bit mask of values from Geometry_type . |
Example: To select both isolated points and connecting lines use
|
pure virtual |
Controls whether the selected types of geometry should be shown.
visible | If true, the selected types will be rendered. |