Namespace for XAC library functions. More...
Functions | |
float4 | gamma_correct (const float4 &color, float gamma_exp) |
Compute gamma correction of a given input color. More... | |
bool | is_inside_bounding_box (const float3 &box_min, const float3 &box_max, const float3 &position) |
Check if a given position inside an axis aligned bounding box. More... | |
uint2 | get_pixel_position (const xac::Scene &scene) |
Retrieve the pixel position for the current thread. More... | |
xac::Ray | transform_ray (const cuda::Mat4x4f &m, const xac::Ray &r) |
Transform a ray using the given matrix. More... | |
template<const xac::NV_IDX_volume_filter_types filter_type> | |
float3 | volume_gradient (const xac::Sparse_volume &volume, const float3 &sample_position, float dh=1.0f) |
Sample the gradient vector of a scalar volume using the reference volume. More... | |
template<const xac::Volume_filter_mode filter_mode, const xac::Volume_classification_mode classification_mode> | |
float3 | volume_gradient (const xac::Sparse_volume_sampler<float, filter_mode, classification_mode> &sampler, const float3 &sample_position, float dh=1.0f) |
Sample the gradient vector of a scalar volume using a given sampler reference (avoids sampler re-generation) More... | |
template<xac::Volume_filter_mode filter_mode, xac::Volume_classification_mode classification_mode> | |
NV_IDX_DEVICE_INLINE_MEMBER float3 | volume_gradient (const xac::Sparse_volume &sparse_volume, const xac::Sparse_volume_sample_context &sparse_volume_sample_context, const float3 &sample_position, unsigned sparse_volume_attrib_idx=0u, float dh=1.0f) |
Sample the gradient vector of a scalar volume with a given sample context (regenerates sampler) More... | |
float4 | headlight_shading (const xac::Scene &scene, const float3 &normal, const float3 &view_direction, const float4 &sample_color, const float4 &specular_color, const float diffuse_falloff=1.0f, const float shininess=100.0f, const float ambient_factor=0.f) |
Compute fixed headlight shading (light direction is view direction) More... | |
float4 | phong_shading (const xac::Scene &scene, const xac::Material_phong &material, const xac::Light &light, const float3 &view_direction, const float3 &normal, const bool two_sided=false) |
Compute Phong shaded color with predefined colors (ambient, diffuse, specular) More... | |
float4 | phong_shading (const xac::Scene &scene, const uint material_id, const uint light_id, const float3 &view_direction, const float3 &normal, const bool two_sided=false) |
Default Phong shading model. More... | |
bool | intersect_ray_plane (const xac::Ray &ray, const xac::Plane &plane, float &t_hit, float2 &tex_coord_hit) |
Ray-plane intersection. More... | |
bool | intersect_ray_box (const xac::Ray &ray, const float3 &box_min, const float3 &box_max, float &t_near, float &t_far) |
Ray-box intersection tests. More... | |
bool | intersect_ray_cylinder (const xac::Ray &ray, const xac::Cylinder &cylinder, float &t_hit, float3 &hit_normal) |
Ray-cylinder intersection tests. More... | |
bool | intersect_ray_ellipsoid (const xac::Ray &ray, const xac::Ellipsoid &ellipsoid, float &t_hit, float3 &hit_normal) |
Ray-cylinder intersection tests. More... | |
bool | intersect_ray_cone (const xac::Ray &ray, const xac::Cone &cone, float &t_hit, float3 &hit_normal) |
Ray-cylinder intersection tests. More... | |
template<typename TYPE> | |
const TYPE * | bind_device_buffer (uint slot_id, uint buffer_index) const |
Retrieve a CUDA buffer that has been assigned to the XAC program. More... | |
bool | device_buffer_available (uint slot_id) const |
Determines if a CUDA buffer that has been assigned to the XAC program. More... | |
Namespace for XAC library functions.