Enables the highlighting of an intersection with another shape on the surface of the current shape.
More...
#include <iintersection_highlighting.h>
Inherits mi::base::Interface_declare< 0x249cc579, ... >.
|
virtual void | set_intersection_shape (mi::neuraylib::Tag_struct shape_tag)=0 |
| Sets the intersecting scene element. More...
|
|
virtual mi::neuraylib::Tag_struct | get_intersection_shape () const =0 |
| Returns the intersecting scene element. More...
|
|
virtual void | set_color (const mi::math::Color_struct &color)=0 |
| Sets the color used for highlighting the intersection. More...
|
|
virtual const mi::math::Color_struct & | get_color () const =0 |
| Returns the color used for highlighting the intersection. More...
|
|
virtual void | set_width (mi::Float32 width)=0 |
| Sets the width used for highlighting the intersection. More...
|
|
virtual mi::Float32 | get_width () const =0 |
| Returns the width used for highlighting the intersection. More...
|
|
virtual void | set_smoothness (mi::Float32 smoothness)=0 |
| Controls how much the intersection should be smoothed. More...
|
|
virtual mi::Float32 | get_smoothness () const =0 |
| Returns how much the intersection should be smoothed. More...
|
|
virtual void | set_discontinuity_limit (mi::Float32 discontinuity_limit)=0 |
| Controls how discontinuities in intersecting heightfields should be handled. More...
|
|
virtual mi::Float32 | get_discontinuity_limit () const =0 |
| Returns how discontinuities in intersecting heightfields should be handled. More...
|
|
Enables the highlighting of an intersection with another shape on the surface of the current shape.
For example, when this attribute is applied to an IPlane shape and the intersection shape is set to an IRegular_heightfield, then the intersection between the plane and the heightfield will be shown on the surface of the plane.
Multiple instances of this attribute can be active at the same time to show the intersection with multiple shapes. The intersection will be drawn in the same order the attributes are defined in the scene description, i.e. the highlight for the attribute defined last will be rendered on top of the others.
- Note
- Currently this attribute is only evaluated by IPlane. Only IRegular_heightfield and ITriangle_mesh_scene_element are supported as intersection shapes.
◆ get_color()
virtual const mi::math::Color_struct & nv::index::IIntersection_highlighting::get_color |
( |
| ) |
const |
|
pure virtual |
Returns the color used for highlighting the intersection.
- Returns
- RGB color.
◆ get_discontinuity_limit()
virtual mi::Float32 nv::index::IIntersection_highlighting::get_discontinuity_limit |
( |
| ) |
const |
|
pure virtual |
Returns how discontinuities in intersecting heightfields should be handled.
- Returns
- Discontinuity limit relative to the highlighting width. A value of 0.0 means that the discontinuity detection is disabled.
◆ get_intersection_shape()
virtual mi::neuraylib::Tag_struct nv::index::IIntersection_highlighting::get_intersection_shape |
( |
| ) |
const |
|
pure virtual |
Returns the intersecting scene element.
- Returns
- Tag of an IScene_element.
◆ get_smoothness()
virtual mi::Float32 nv::index::IIntersection_highlighting::get_smoothness |
( |
| ) |
const |
|
pure virtual |
Returns how much the intersection should be smoothed.
- Returns
- Amount of smoothing applied.
◆ get_width()
virtual mi::Float32 nv::index::IIntersection_highlighting::get_width |
( |
| ) |
const |
|
pure virtual |
Returns the width used for highlighting the intersection.
- Returns
- Width relative to the object-space z-axis.
◆ set_color()
virtual void nv::index::IIntersection_highlighting::set_color |
( |
const mi::math::Color_struct & |
color | ) |
|
|
pure virtual |
Sets the color used for highlighting the intersection.
- Parameters
-
[in] | color | RGB color, alpha component is ignored. |
◆ set_discontinuity_limit()
virtual void nv::index::IIntersection_highlighting::set_discontinuity_limit |
( |
mi::Float32 |
discontinuity_limit | ) |
|
|
pure virtual |
Controls how discontinuities in intersecting heightfields should be handled.
The discontinuity limit defines how large the height value difference between adjacent cells must be so that it is considered as a discontinuity. The connection between the cells will not be highlighted in that case.
The limit is specified relative to the highlighting width controlled by set_width(): If the adjacent height values differ by more than the highlighting width multiplied by the limit, then a discontinuity is assumed.
- Note
- This setting only affects intersections with IRegular_heightfield elements.
-
The discontinuity detection only considers height values. For intersection planes that are mostly co-planar to the heightfield it should be disabled.
- Parameters
-
[in] | discontinuity_limit | Discontinuity limit relative to the highlighting width, typically 1.0. A value of 0.0 disables the discontinuity detection, which is the default. |
◆ set_intersection_shape()
virtual void nv::index::IIntersection_highlighting::set_intersection_shape |
( |
mi::neuraylib::Tag_struct |
shape_tag | ) |
|
|
pure virtual |
Sets the intersecting scene element.
- Parameters
-
◆ set_smoothness()
virtual void nv::index::IIntersection_highlighting::set_smoothness |
( |
mi::Float32 |
smoothness | ) |
|
|
pure virtual |
Controls how much the intersection should be smoothed.
- Parameters
-
[in] | smoothness | Amount of smoothing applied: 0.0 means no smoothing, 1.0 means maximum smoothing. |
◆ set_width()
virtual void nv::index::IIntersection_highlighting::set_width |
( |
mi::Float32 |
width | ) |
|
|
pure virtual |
Sets the width used for highlighting the intersection.
To accommodate for the global scene transformation, the width is defined relative to the object-space z-axis. For example, with a global scaling of [2 2 3] a width value of 1 will correspond to 3 in world space, independent of the direction. This ensures that the highlights are not distorted by the scene transformation and that width values can be chosen independent of the scene transformation.
- Note
- Choosing a large width value that results in high screen coverage can lead to performance degradation.
- Parameters
-
[in] | width | Width relative to the object-space z-axis. |
The documentation for this class was generated from the following file: