Height field. More...
#include <xac_interface_scene_elements_doc.h>
Public Types | |
typedef Sample_info_height_field | Base_info_type |
Declaration of the height field type info. More... | |
Public Member Functions | |
bool | is_inside (const float3 &sample_position) const |
Check if a given sample position is within the height field bounding box. More... | |
bool | is_hole (float height) const |
Returns whether the given height value is a hole in the heightfield. More... | |
bool | has_compute_texture () const |
Check if the height field has an attached compute texture. More... | |
float | get_elevation_value (float px, float py, float &hf_u, float &hf_v) const |
Interpolate height value from heightfield uniforms (px,py are assumed to be given in scene space coordinates) More... | |
float2 | get_elevation_minmax_interval () const |
Get the height extents (minimum, maximum height) of the height field. More... | |
float3 | get_normal (const float3 &scene_position) const |
Retrieve the normal from the precomputed normal texture in heightfield uniforms for a given position in scene space coordinates. More... | |
const nv::index::cuda::Mat4x4f & | get_scene_to_object_transform () const |
Get the transformation matrix from scene space to object space coordinates. More... | |
const nv::index::cuda::Mat4x4f & | get_scene_to_object_transform_inverse () const |
Get the inverse transformation matrix from scene space to object space coordinates. More... | |
float2 | transform_scene_to_sample (const float3 &scene_pos) const |
Transform a given scene position into the sampling space of the height field. More... | |
float3 | transform_scene_to_sample_inverse (const float2 &sample_pos) const |
Transform a given sample position into the scene space of the height field. More... | |
uint | get_light_id () const |
Retrieve associated scene light id. More... | |
uint | get_material_id () const |
Retrieve associated scene material id. More... | |
xac::Colormap | get_colormap () const |
Get the colormap associated to the height field. More... | |
xac::Colormap | get_colormap_compute_texture () const |
Get the colormap associated to the compute texture of the height field. More... | |
xac::Compute_texture_tile | get_compute_texture () const |
Retrieve the compute texture associated to the current height field. More... | |
Height field.
Declaration of the height field type info.
xac::Colormap nv::index::xac::Height_field::get_colormap | ( | ) | const |
Get the colormap associated to the height field.
xac::Colormap nv::index::xac::Height_field::get_colormap_compute_texture | ( | ) | const |
Get the colormap associated to the compute texture of the height field.
xac::Compute_texture_tile nv::index::xac::Height_field::get_compute_texture | ( | ) | const |
Retrieve the compute texture associated to the current height field.
float2 nv::index::xac::Height_field::get_elevation_minmax_interval | ( | ) | const |
Get the height extents (minimum, maximum height) of the height field.
float nv::index::xac::Height_field::get_elevation_value | ( | float | px, |
float | py, | ||
float & | hf_u, | ||
float & | hf_v | ||
) | const |
Interpolate height value from heightfield uniforms (px,py are assumed to be given in scene space coordinates)
uint nv::index::xac::Height_field::get_light_id | ( | ) | const |
Retrieve associated scene light id.
uint nv::index::xac::Height_field::get_material_id | ( | ) | const |
Retrieve associated scene material id.
float3 nv::index::xac::Height_field::get_normal | ( | const float3 & | scene_position | ) | const |
Retrieve the normal from the precomputed normal texture in heightfield uniforms for a given position in scene space coordinates.
const nv::index::cuda::Mat4x4f & nv::index::xac::Height_field::get_scene_to_object_transform | ( | ) | const |
Get the transformation matrix from scene space to object space coordinates.
const nv::index::cuda::Mat4x4f & nv::index::xac::Height_field::get_scene_to_object_transform_inverse | ( | ) | const |
Get the inverse transformation matrix from scene space to object space coordinates.
bool nv::index::xac::Height_field::has_compute_texture | ( | ) | const |
Check if the height field has an attached compute texture.
bool nv::index::xac::Height_field::is_hole | ( | float | height | ) | const |
Returns whether the given height value is a hole in the heightfield.
bool nv::index::xac::Height_field::is_inside | ( | const float3 & | sample_position | ) | const |
Check if a given sample position is within the height field bounding box.
float2 nv::index::xac::Height_field::transform_scene_to_sample | ( | const float3 & | scene_pos | ) | const |
Transform a given scene position into the sampling space of the height field.
float3 nv::index::xac::Height_field::transform_scene_to_sample_inverse | ( | const float2 & | sample_pos | ) | const |
Transform a given sample position into the scene space of the height field.