#include <ANARIRenderer.h>
Public Types | |
enum | RtShadowMode { RT_SHADOWS_OFF = 0, RT_SHADOWS_ON = 1 } |
enum | FogMode { RT_FOG_NONE = 0, RT_FOG_LINEAR = 1, RT_FOG_EXP = 2, RT_FOG_EXP2 = 3 } |
enum | CameraProjection { RT_PERSPECTIVE = 0, RT_ORTHOGRAPHIC = 1 } |
enum | Verbosity { RT_VERB_MIN = 0, RT_VERB_TIMING = 1, RT_VERB_DEBUG = 2 } |
enum | BGMode { RT_BACKGROUND_TEXTURE_SOLID = 0, RT_BACKGROUND_TEXTURE_SKY_SPHERE = 1, RT_BACKGROUND_TEXTURE_SKY_ORTHO_PLANE = 2 } |
enum | Workarounds { ANARI_NONE = 0, ANARI_OSPRAY = 1, ANARI_OWL = 2, ANARI_NVGL = 3, ANARI_USD = 4 } |
enum | RenderMode { ANARI_SCIVIS = 0, ANARI_AO = 1, ANARI_PATHTRACER = 2, ANARI_DEFAULT = 3 } |
enum | MaterialClass { ANARI_MATTE = 0, ANARI_OBJ = 1, ANARI_OTHER = 2 } |
Public Methods | |
ANARIRender (void) | |
normal constructors and destructors. More... | |
~ANARIRender (void) | |
destructor. More... | |
void | check_verbose_env () |
check environment variables that modify verbose output. More... | |
void | setup_context (int width, int height) |
(re)configure the ANARI context. More... | |
void | repanr_context_stats (void) |
report various context statistics for memory leak debugging, etc. More... | |
void | shadows_on (int onoff) |
shadows. More... | |
void | set_aa_samples (int cnt) |
antialiasing (samples > 1 == on). More... | |
void | set_camera_projection (CameraProjection m) |
set the camera projection mode. More... | |
void | set_camera_zoom (float zoomfactor) |
set camera zoom factor. More... | |
void | set_camera_stereo_eyesep (float eyesep) |
set stereo eye separation. More... | |
void | set_camera_stereo_convergence_dist (float dist) |
set stereo convergence distance. More... | |
void | dof_on (int onoff) |
depth of field on/off. More... | |
void | set_camera_dof_focal_dist (float d) |
set depth of field focal plane distance. More... | |
void | set_camera_dof_fnumber (float n) |
set depth of field f/stop number. More... | |
void | set_ao_samples (int cnt) |
ambient occlusion (samples > 1 == on). More... | |
void | set_ao_ambient (float aoa) |
set AO ambient lighting factor. More... | |
void | set_ao_direct (float aod) |
set AO direct lighting factor. More... | |
void | set_bg_mode (BGMode m) |
void | set_bg_color (float *rgb) |
void | set_bg_color_grad_top (float *rgb) |
void | set_bg_color_grad_bot (float *rgb) |
void | set_bg_gradient (float *vec) |
void | set_bg_gradient_topval (float v) |
void | set_bg_gradient_botval (float v) |
void | set_cue_mode (FogMode mode, float start, float end, float density) |
void | init_materials () |
void | add_material (int matindex, float ambient, float diffuse, float specular, float shininess, float reflectivity, float opacity, float outline, float outlinewidth, int transmode) |
void | set_material (ANARISurface &surf, int matindex, float *uniform_color) |
void | attach_sphere_array (int numsp, int matindex, anr_sphere_array_color &sparray) |
void | attach_cylinder_array (int numcyl, int matindex, anr_cylinder_array_color &cylarray) |
void | attach_mesh (int numverts, int numfacets, int matindex, anr_trimesh_v3f_n3f_c3f &mesh) |
void | commit_rep () |
void | clear_all_lights () |
void | headlight_onoff (int onoff) |
void | add_directional_light (const float *dir, const float *color) |
void | add_positional_light (const float *pos, const float *color) |
void | update_rendering_state (int interactive) |
void | framebuffer_config (int fbwidth, int fbheight) |
void | framebuffer_resize (int fbwidth, int fbheight) |
void | framebuffer_destroy (void) |
void | render_compile_and_validate (void) |
void | render_to_file (const char *filename) |
void | destroy_scene (void) |
void | comment (const char *) |
Comment describing representation geometry. More... | |
void | cylinder_array (Matrix4 *wtrans, float rscale, float *uniform_color, int cylnum, float *points, int matindex) |
void | cylinder_array_color (Matrix4 &wtrans, float rscale, int cylnum, float *points, float *radii, float *colors, int matindex) |
void | sphere_array (Matrix4 *wtrans, float rscale, float *uniform_color, int spnum, float *centers, float *radii, int matindex) |
void | sphere_array_color (Matrix4 &wtrans, float rscale, int spnum, float *centers, float *radii, float *colors, int matindex) |
void | tricolor_list (Matrix4 &wtrans, int numtris, float *vnc, int matindex) |
void | trimesh_c4n3v3 (Matrix4 &wtrans, int numverts, float *cnv, int numfacets, int *facets, int matindex) |
void | trimesh_c4u_n3b_v3f (Matrix4 &wtrans, unsigned char *c, signed char *n, float *v, int numfacets, int matindex) |
void | trimesh_c4u_n3f_v3f (Matrix4 &wtrans, unsigned char *c, float *n, float *v, int numfacets, int matindex) |
void | trimesh_n3b_v3f (Matrix4 &wtrans, float *uniform_color, signed char *n, float *v, int numfacets, int matindex) |
void | trimesh_n3f_v3f (Matrix4 &wtrans, float *uniform_color, float *n, float *v, int numfacets, int matindex) |
void | tristrip (Matrix4 &wtrans, int numverts, const float *cnv, int numstrips, const int *vertsperstrip, const int *facets, int matindex) |
Static Public Methods | |
void | ANARI_Global_Init (void) |
global init, call ONCE. More... | |
void | ANARI_Global_Shutdown (void) |
global shutdown, call ONCE. More... |
|
Definition at line 149 of file ANARIRenderer.h. Referenced by set_bg_mode. |
|
Definition at line 140 of file ANARIRenderer.h. Referenced by set_camera_projection. |
|
Definition at line 139 of file ANARIRenderer.h. Referenced by set_cue_mode. |
|
Definition at line 166 of file ANARIRenderer.h. |
|
Definition at line 160 of file ANARIRenderer.h. |
|
Definition at line 136 of file ANARIRenderer.h. |
|
Definition at line 148 of file ANARIRenderer.h. |
|
Definition at line 153 of file ANARIRenderer.h. |
|
|
destructor.
Definition at line 461 of file ANARIRenderer.C. References ResizeArray< anr_positional_light >::clear, ResizeArray< anr_directional_light >::clear, ResizeArray< anr_material >::clear, DBG, destroy_scene, NULL, and wkf_timer_destroy. |
|
Definition at line 2719 of file ANARIRenderer.C. References ResizeArray< anr_directional_light >::append, anr_directional_light::color, DBG, anr_directional_light::dir, and vec_copy. |
|
|
Definition at line 2729 of file ANARIRenderer.C. References ResizeArray< anr_positional_light >::append, anr_positional_light::color, DBG, anr_positional_light::pos, and vec_copy. |
|
global init, call ONCE.
Definition at line 113 of file ANARIRenderer.C. Referenced by ANARIDisplayDevice::ANARI_Global_Init. |
|
global shutdown, call ONCE.
Definition at line 119 of file ANARIRenderer.C. Referenced by ANARIDisplayDevice::ANARI_Global_Shutdown. |
|
|
|
|
check environment variables that modify verbose output.
Definition at line 488 of file ANARIRenderer.C. References DBG, NULL, RT_VERB_DEBUG, RT_VERB_MIN, RT_VERB_TIMING, and strupcmp. Referenced by ANARIRender, and setup_context. |
|
Definition at line 387 of file ANARIRenderer.h. References ResizeArray::clear. |
|
Comment describing representation geometry.
Definition at line 2586 of file ANARIRenderer.C. References commit_rep. Referenced by ANARIDisplayDevice::comment. |
|
Definition at line 856 of file ANARIRenderer.C. References ANARI_USD, ResizeArray< ANARIInstance >::append, ResizeArray< ANARISurface * >::append, num, ResizeArray< anr_cylinder_array_color >::num, ResizeArray< anr_sphere_array_color >::num, ResizeArray< anr_trimesh_v3f_n3f_c3f >::num, and RT_VERB_DEBUG. Referenced by comment, and render_compile_and_validate. |
|
Definition at line 2739 of file ANARIRenderer.C. References attach_cylinder_array, anr_cylinder_array_color::colors, DBG, anr_cylinder_array_color::indices, Matrix4::multpoint3d, NULL, anr_cylinder_array_color::num, anr_cylinder_array_color::radii, RT_VERB_DEBUG, vec_copy, and anr_cylinder_array_color::verts. |
|
Definition at line 2782 of file ANARIRenderer.C. References attach_cylinder_array, anr_cylinder_array_color::colors, DBG, anr_cylinder_array_color::indices, Matrix4::multpoint3d, anr_cylinder_array_color::num, anr_cylinder_array_color::radii, RT_VERB_DEBUG, vec_copy, and anr_cylinder_array_color::verts. |
|
|
depth of field on/off.
Definition at line 340 of file ANARIRenderer.h. Referenced by ANARIDisplayDevice::write_header. |
|
Definition at line 792 of file ANARIRenderer.C. References DBG, framebuffer_resize, and RT_VERB_DEBUG. Referenced by render_compile_and_validate, and render_to_file. |
|
Definition at line 843 of file ANARIRenderer.C. References DBG. Referenced by destroy_scene, and framebuffer_resize. |
|
Definition at line 823 of file ANARIRenderer.C. References DBG, framebuffer_destroy, and RT_VERB_DEBUG. Referenced by framebuffer_config. |
|
Definition at line 392 of file ANARIRenderer.h. |
|
Definition at line 2595 of file ANARIRenderer.C. References ResizeArray< anr_material >::clear, DBG, and RT_VERB_DEBUG. Referenced by ANARIRender. |
|
|
Definition at line 2366 of file ANARIRenderer.C. References ANARI_USD, DBG, framebuffer_config, NULL, render_compile_and_validate, RT_VERB_DEBUG, RT_VERB_TIMING, update_rendering_state, wkf_timer_timenow, and write_image_file_rgb4u. Referenced by ANARIDisplayDevice::write_trailer. |
|
report various context statistics for memory leak debugging, etc.
|
|
antialiasing (samples > 1 == on).
Definition at line 323 of file ANARIRenderer.h. Referenced by ANARIDisplayDevice::write_header. |
|
set AO ambient lighting factor.
Definition at line 352 of file ANARIRenderer.h. Referenced by ANARIDisplayDevice::write_header. |
|
set AO direct lighting factor.
Definition at line 355 of file ANARIRenderer.h. Referenced by ANARIDisplayDevice::write_header. |
|
ambient occlusion (samples > 1 == on).
Definition at line 349 of file ANARIRenderer.h. Referenced by ANARIDisplayDevice::write_header. |
|
Definition at line 358 of file ANARIRenderer.h. |
|
Definition at line 360 of file ANARIRenderer.h. |
|
Definition at line 359 of file ANARIRenderer.h. |
|
Definition at line 361 of file ANARIRenderer.h. |
|
Definition at line 363 of file ANARIRenderer.h. |
|
Definition at line 362 of file ANARIRenderer.h. |
|
Definition at line 357 of file ANARIRenderer.h. References BGMode. |
|
set depth of field f/stop number.
Definition at line 346 of file ANARIRenderer.h. References n. Referenced by ANARIDisplayDevice::write_header. |
|
set depth of field focal plane distance.
Definition at line 343 of file ANARIRenderer.h. Referenced by ANARIDisplayDevice::write_header. |
|
set the camera projection mode.
Definition at line 326 of file ANARIRenderer.h. References CameraProjection. Referenced by ANARIDisplayDevice::write_trailer. |
|
set stereo convergence distance.
Definition at line 335 of file ANARIRenderer.h. Referenced by ANARIDisplayDevice::write_trailer. |
|
set stereo eye separation.
Definition at line 332 of file ANARIRenderer.h. Referenced by ANARIDisplayDevice::write_trailer. |
|
set camera zoom factor.
Definition at line 329 of file ANARIRenderer.h. Referenced by ANARIDisplayDevice::write_trailer. |
|
Definition at line 365 of file ANARIRenderer.h. References FogMode. Referenced by ANARIDisplayDevice::write_header. |
|
Definition at line 2603 of file ANARIRenderer.C. References mat, and RT_VERB_DEBUG. Referenced by attach_cylinder_array, attach_mesh, and attach_sphere_array. |
|
(re)configure the ANARI context.
Definition at line 508 of file ANARIRenderer.C. References check_verbose_env, DBG, and wkf_timer_timenow. Referenced by ANARIDisplayDevice::write_header. |
|
shadows.
Definition at line 320 of file ANARIRenderer.h. Referenced by ANARIDisplayDevice::write_header. |
|
Definition at line 2822 of file ANARIRenderer.C. References attach_sphere_array, anr_sphere_array_color::colors, DBG, Matrix4::multpoint3d, NULL, anr_sphere_array_color::num, anr_sphere_array_color::radii, RT_VERB_DEBUG, vec_copy, and anr_sphere_array_color::xyz. |
|
Definition at line 2879 of file ANARIRenderer.C. References attach_sphere_array, anr_sphere_array_color::colors, DBG, Matrix4::multpoint3d, anr_sphere_array_color::num, anr_sphere_array_color::radii, RT_VERB_DEBUG, vec_copy, and anr_sphere_array_color::xyz. Referenced by ANARIDisplayDevice::sphere_array. |
|
Definition at line 2907 of file ANARIRenderer.C. References attach_mesh, anr_trimesh_v3f_n3f_c3f::c, anr_trimesh_v3f_n3f_c3f::f, Matrix4::multnorm3d, Matrix4::multpoint3d, anr_trimesh_v3f_n3f_c3f::n, anr_trimesh_v3f_n3f_c3f::num, anr_trimesh_v3f_n3f_c3f::v, and vec_copy. Referenced by ANARIDisplayDevice::tricolor. |
|
Definition at line 2952 of file ANARIRenderer.C. References attach_mesh, anr_trimesh_v3f_n3f_c3f::c, anr_trimesh_v3f_n3f_c3f::f, Matrix4::multnorm3d, Matrix4::multpoint3d, anr_trimesh_v3f_n3f_c3f::n, anr_trimesh_v3f_n3f_c3f::num, RT_VERB_DEBUG, anr_trimesh_v3f_n3f_c3f::v, and vec_copy. Referenced by ANARIDisplayDevice::trimesh_c4n3v3. |
|
Definition at line 3009 of file ANARIRenderer.C. References attach_mesh, anr_trimesh_v3f_n3f_c3f::c, anr_trimesh_v3f_n3f_c3f::f, Matrix4::multnorm3d, Matrix4::multpoint3d, anr_trimesh_v3f_n3f_c3f::n, n, anr_trimesh_v3f_n3f_c3f::num, RT_VERB_DEBUG, anr_trimesh_v3f_n3f_c3f::v, and vec_copy. Referenced by ANARIDisplayDevice::trimesh_c4u_n3b_v3f. |
|
Definition at line 3089 of file ANARIRenderer.C. References attach_mesh, anr_trimesh_v3f_n3f_c3f::c, anr_trimesh_v3f_n3f_c3f::f, Matrix4::multnorm3d, Matrix4::multpoint3d, anr_trimesh_v3f_n3f_c3f::n, n, anr_trimesh_v3f_n3f_c3f::num, RT_VERB_DEBUG, anr_trimesh_v3f_n3f_c3f::v, and vec_copy. Referenced by ANARIDisplayDevice::trimesh_c4u_n3f_v3f. |
|
Definition at line 3152 of file ANARIRenderer.C. References attach_mesh, anr_trimesh_v3f_n3f_c3f::c, anr_trimesh_v3f_n3f_c3f::f, Matrix4::multnorm3d, Matrix4::multpoint3d, anr_trimesh_v3f_n3f_c3f::n, n, anr_trimesh_v3f_n3f_c3f::num, RT_VERB_DEBUG, anr_trimesh_v3f_n3f_c3f::v, and vec_copy. Referenced by ANARIDisplayDevice::trimesh_n3b_v3f. |
|
Definition at line 3218 of file ANARIRenderer.C. References attach_mesh, anr_trimesh_v3f_n3f_c3f::c, DBG, anr_trimesh_v3f_n3f_c3f::f, Matrix4::multnorm3d, Matrix4::multpoint3d, anr_trimesh_v3f_n3f_c3f::n, n, anr_trimesh_v3f_n3f_c3f::num, RT_VERB_DEBUG, anr_trimesh_v3f_n3f_c3f::v, and vec_copy. Referenced by ANARIDisplayDevice::send_triangle_buffer, and ANARIDisplayDevice::trimesh_n3f_v3f. |
|
Definition at line 3280 of file ANARIRenderer.C. References attach_mesh, anr_trimesh_v3f_n3f_c3f::c, anr_trimesh_v3f_n3f_c3f::f, Matrix4::multnorm3d, Matrix4::multpoint3d, anr_trimesh_v3f_n3f_c3f::n, anr_trimesh_v3f_n3f_c3f::num, RT_VERB_DEBUG, anr_trimesh_v3f_n3f_c3f::v, and vec_copy. Referenced by ANARIDisplayDevice::tristrip. |
|
Definition at line 650 of file ANARIRenderer.C. References DBG, ResizeArray< anr_positional_light >::num, ResizeArray< anr_directional_light >::num, RT_VERB_DEBUG, RT_VERB_TIMING, and wkf_timer_start. Referenced by render_to_file. |