Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSPRayDisplayDevice Class Reference

FileRenderer subclass to exports VMD scenes to OSPRay. More...

#include <OSPRayDisplayDevice.h>

Inheritance diagram for OSPRayDisplayDevice:

FileRenderer DisplayDevice List of all members.

Public Methods

 OSPRayDisplayDevice (VMDApp *, int interactive)
 constructor ... initialize some variables. More...

virtual ~OSPRayDisplayDevice (void)
 destructor. More...

void write_header (void)
 write the header info. This is an alias for prepare3D. More...

void write_trailer (void)
 write any trailer info. This is called by update. More...


Static Public Methods

int OSPRay_Global_Init (void)
 global init, call ONCE. More...

void OSPRay_Global_Shutdown (void)
 global shutdown, call ONCE. More...


Protected Methods

void send_cylinder_buffer (void)
void cylinder (float *, float *, float rad, int filled)
 draw a cylinder, with optional caps. More...

void text (float *pos, float size, float thickness, const char *str)
 draw text at specified location. More...

void sphere_array (int num, int res, float *centers, float *radii, float *colors)
 draw a sphere array. More...

void send_triangle_buffer (void)
void triangle (const float *, const float *, const float *, const float *, const float *, const float *)
 single color triangle with interpolated surface normals. More...

void tricolor (const float *xyz1, const float *xyz2, const float *xyz3, const float *n1, const float *n2, const float *n3, const float *c1, const float *c2, const float *c3)
 triangle with interpolated surface normals and vertex colors. More...

void trimesh_c4u_n3b_v3f (unsigned char *c, signed char *n, float *v, int numfacets)
 triangle mesh built from a vertex array. More...

void trimesh_c4u_n3f_v3f (unsigned char *c, float *n, float *v, int numfacets)
 triangle mesh built from a vertex array. More...

void trimesh_c4n3v3 (int numverts, float *cnv, int numfacets, int *facets)
 triangle mesh built from a vertex array and facet vertex index arrays. More...

void trimesh_n3b_v3f (signed char *n, float *v, int numfacets)
void trimesh_n3f_v3f (float *n, float *v, int numfacets)
 triangle mesh built from a vertex array. More...

void tristrip (int numverts, const float *cnv, int numstrips, const int *vertsperstrip, const int *facets)
 triangle strips built from a vertex array and vertex index arrays. More...


Detailed Description

FileRenderer subclass to exports VMD scenes to OSPRay.

Definition at line 50 of file OSPRayDisplayDevice.h.


Constructor & Destructor Documentation

OSPRayDisplayDevice::OSPRayDisplayDevice VMDApp  ,
int    interactive
 

constructor ... initialize some variables.

Definition at line 70 of file OSPRayDisplayDevice.C.

References FileRenderer::aasamples, NameList< int >::add_name, FileRenderer::aosamples, FileRenderer::curformat, FileRenderer::formats, FileRenderer::has_aa, DisplayDevice::vmdapp, and wkf_timer_create.

OSPRayDisplayDevice::~OSPRayDisplayDevice void    [virtual]
 

destructor.

Definition at line 98 of file OSPRayDisplayDevice.C.

References wkf_timer_destroy.


Member Function Documentation

void OSPRayDisplayDevice::cylinder float *   ,
float *   ,
float    rad,
int    filled
[protected, virtual]
 

draw a cylinder, with optional caps.

Reimplemented from FileRenderer.

Definition at line 153 of file OSPRayDisplayDevice.C.

References ResizeArray< float >::append, ResizeArray< float >::append2, ResizeArray< float >::append2x3, ResizeArray< float >::append3, FileRenderer::colorIndex, CYLINDER_LEADINGCAP, CYLINDER_TRAILINGCAP, Matrix4::mat, FileRenderer::matData, FileRenderer::materialIndex, NULL, FileRenderer::scale_factor, send_cylinder_buffer, Stack< Matrix4 >::top, and FileRenderer::transMat.

int OSPRayDisplayDevice::OSPRay_Global_Init void    [static]
 

global init, call ONCE.

Definition at line 59 of file OSPRayDisplayDevice.C.

References OSPRayRenderer::OSPRay_Global_Init.

Referenced by FileRenderList::FileRenderList.

void OSPRayDisplayDevice::OSPRay_Global_Shutdown void    [static]
 

global shutdown, call ONCE.

Definition at line 64 of file OSPRayDisplayDevice.C.

References OSPRayRenderer::OSPRay_Global_Shutdown.

Referenced by FileRenderList::~FileRenderList.

void OSPRayDisplayDevice::send_cylinder_buffer void    [protected]
 

Definition at line 120 of file OSPRayDisplayDevice.C.

References OSPRayRenderer::cylinder_array_color, NULL, and ResizeArray< float >::num.

Referenced by cylinder, and write_trailer.

void OSPRayDisplayDevice::send_triangle_buffer void    [protected]
 

Definition at line 298 of file OSPRayDisplayDevice.C.

References FileRenderer::matData, NULL, ResizeArray< float >::num, and OSPRayRenderer::trimesh_n3f_v3f.

Referenced by triangle, and write_trailer.

void OSPRayDisplayDevice::sphere_array int    num,
int    res,
float *    centers,
float *    radii,
float *    colors
[protected, virtual]
 

draw a sphere array.

Reimplemented from FileRenderer.

Definition at line 211 of file OSPRayDisplayDevice.C.

References FileRenderer::materialIndex, FileRenderer::nearest_index, FileRenderer::scale_factor, OSPRayRenderer::sphere_array_color, FileRenderer::super_set_color, Stack< Matrix4 >::top, and FileRenderer::transMat.

void OSPRayDisplayDevice::text float *    pos,
float    size,
float    thickness,
const char *    str
[protected, virtual]
 

draw text at specified location.

Reimplemented from FileRenderer.

Definition at line 228 of file OSPRayDisplayDevice.C.

References ResizeArray::append2x3, ResizeArray::append3, FileRenderer::colorIndex, OSPRayRenderer::cylinder_array, DEFAULT_RADIUS, hersheyDrawInitLetter, hersheyDrawNextLine, FileRenderer::matData, FileRenderer::materialIndex, NULL, ResizeArray::num, size, OSPRayRenderer::sphere_array, Stack< Matrix4 >::top, FileRenderer::transMat, DisplayDevice::x, and DisplayDevice::y.

void OSPRayDisplayDevice::triangle const float *    a,
const float *    b,
const float *    c,
const float *    n1,
const float *    n2,
const float *    n3
[protected, virtual]
 

single color triangle with interpolated surface normals.

Reimplemented from FileRenderer.

Definition at line 314 of file OSPRayDisplayDevice.C.

References ResizeArray< float >::append3x3, FileRenderer::colorIndex, Matrix4::mat, FileRenderer::materialIndex, NULL, send_triangle_buffer, Stack< Matrix4 >::top, and FileRenderer::transMat.

void OSPRayDisplayDevice::tricolor const float *    a,
const float *    b,
const float *    c,
const float *    n1,
const float *    n2,
const float *    n3,
const float *    c1,
const float *    c2,
const float *    c3
[protected, virtual]
 

triangle with interpolated surface normals and vertex colors.

Reimplemented from FileRenderer.

Definition at line 339 of file OSPRayDisplayDevice.C.

References FileRenderer::materialIndex, Stack< Matrix4 >::top, FileRenderer::transMat, OSPRayRenderer::tricolor_list, and vec_copy.

void OSPRayDisplayDevice::trimesh_c4n3v3 int    numverts,
float *    cnv,
int    numfacets,
int *    facets
[protected, virtual]
 

triangle mesh built from a vertex array and facet vertex index arrays.

Reimplemented from FileRenderer.

Definition at line 374 of file OSPRayDisplayDevice.C.

References FileRenderer::materialIndex, Stack< Matrix4 >::top, FileRenderer::transMat, and OSPRayRenderer::trimesh_c4n3v3.

void OSPRayDisplayDevice::trimesh_c4u_n3b_v3f unsigned char *    c,
signed char *    n,
float *    v,
int    numfacets
[protected, virtual]
 

triangle mesh built from a vertex array.

Reimplemented from FileRenderer.

Definition at line 361 of file OSPRayDisplayDevice.C.

References FileRenderer::materialIndex, n, Stack< Matrix4 >::top, FileRenderer::transMat, and OSPRayRenderer::trimesh_c4u_n3b_v3f.

void OSPRayDisplayDevice::trimesh_c4u_n3f_v3f unsigned char *    c,
float *    n,
float *    v,
int    numfacets
[protected, virtual]
 

triangle mesh built from a vertex array.

Reimplemented from FileRenderer.

Definition at line 368 of file OSPRayDisplayDevice.C.

References FileRenderer::materialIndex, n, Stack< Matrix4 >::top, FileRenderer::transMat, and OSPRayRenderer::trimesh_c4u_n3f_v3f.

void OSPRayDisplayDevice::trimesh_n3b_v3f signed char *    n,
float *    v,
int    numfacets
[protected, virtual]
 

Reimplemented from FileRenderer.

Definition at line 381 of file OSPRayDisplayDevice.C.

References FileRenderer::colorIndex, FileRenderer::matData, FileRenderer::materialIndex, n, Stack< Matrix4 >::top, FileRenderer::transMat, and OSPRayRenderer::trimesh_n3b_v3f.

void OSPRayDisplayDevice::trimesh_n3f_v3f float *    n,
float *    v,
int    numfacets
[protected, virtual]
 

triangle mesh built from a vertex array.

Reimplemented from FileRenderer.

Definition at line 386 of file OSPRayDisplayDevice.C.

References FileRenderer::colorIndex, FileRenderer::matData, FileRenderer::materialIndex, n, Stack< Matrix4 >::top, FileRenderer::transMat, and OSPRayRenderer::trimesh_n3f_v3f.

void OSPRayDisplayDevice::tristrip int    numverts,
const float *    cnv,
int    numstrips,
const int *    vertsperstrip,
const int *    facets
[protected, virtual]
 

triangle strips built from a vertex array and vertex index arrays.

Reimplemented from FileRenderer.

Definition at line 400 of file OSPRayDisplayDevice.C.

References FileRenderer::materialIndex, Stack< Matrix4 >::top, FileRenderer::transMat, and OSPRayRenderer::tristrip.

void OSPRayDisplayDevice::write_header void    [virtual]
 

write the header info. This is an alias for prepare3D.

Reimplemented from FileRenderer.

Definition at line 521 of file OSPRayDisplayDevice.C.

References FileRenderer::aasamples, DisplayDevice::ao_enabled, FileRenderer::aosamples, DisplayDevice::CUE_EXP, DisplayDevice::CUE_EXP2, DisplayDevice::CUE_LINEAR, DisplayDevice::dof_enabled, OSPRayRenderer::dof_on, DisplayDevice::get_ao_ambient, DisplayDevice::get_ao_direct, DisplayDevice::get_cue_density, DisplayDevice::get_cue_end, DisplayDevice::get_cue_start, DisplayDevice::get_dof_fnumber, DisplayDevice::get_dof_focal_dist, DisplayDevice::NUM_CUE_MODES, OSPRayRenderer::RT_FOG_EXP, OSPRayRenderer::RT_FOG_EXP2, OSPRayRenderer::RT_FOG_LINEAR, OSPRayRenderer::RT_FOG_NONE, OSPRayRenderer::set_aa_samples, OSPRayRenderer::set_ao_ambient, OSPRayRenderer::set_ao_direct, OSPRayRenderer::set_ao_samples, OSPRayRenderer::set_camera_dof_fnumber, OSPRayRenderer::set_camera_dof_focal_dist, OSPRayRenderer::set_cue_mode, OSPRayRenderer::setup_context, DisplayDevice::shadows_enabled, OSPRayRenderer::shadows_on, wkf_timer_start, DisplayDevice::xSize, and DisplayDevice::ySize.

void OSPRayDisplayDevice::write_trailer void    [virtual]
 

write any trailer info. This is called by update.

Reimplemented from FileRenderer.

Definition at line 592 of file OSPRayDisplayDevice.C.

References OSPRayRenderer::destroy_scene, DisplayDevice::eyeDist, DisplayDevice::eyePos, DisplayDevice::eyeSep, FileRenderer::my_filename, NULL, DisplayDevice::ORTHOGRAPHIC, DisplayDevice::PERSPECTIVE, DisplayDevice::projection, OSPRayRenderer::render_to_file, OSPRayRenderer::RT_ORTHOGRAPHIC, OSPRayRenderer::RT_PERSPECTIVE, send_cylinder_buffer, send_triangle_buffer, OSPRayRenderer::set_camera_projection, OSPRayRenderer::set_camera_stereo_convergence_dist, OSPRayRenderer::set_camera_stereo_eyesep, OSPRayRenderer::set_camera_zoom, strupcmp, DisplayDevice::vSize, wkf_timer_stop, wkf_timer_time, wkf_timer_timenow, and DisplayDevice::zDist.


The documentation for this class was generated from the following files:
Generated on Fri Nov 8 02:47:16 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002