#include <FileRenderer.h>
Inheritance diagram for FileRenderer:

Public Methods | |
| FileRenderer (const char *public_name, const char *default_file_name, const char *default_command_line) | |
| create the renderer; set the 'visible' name for the renderer list. More... | |
| virtual | ~FileRenderer (void) |
| const char * | visible_name (void) const |
| const char * | default_filename (void) const |
| const char * | default_exec_string (void) const |
| const char * | saved_exec_string (void) const |
| void | set_exec_string (const char *) |
| int | has_antialiasing () const |
| Supports anti-aliasing? More... | |
| int | set_aalevel (int newval) |
| Get/set the AA level; return the new value. Must be non-negative. More... | |
| int | has_imagesize () const |
| Supports arbitrary image size? More... | |
| int | set_imagesize (int *w, int *h) |
| Get/set the image size. Return success and places the current values in the passed-in pointers. May fail if the renderer is not able to specify the image size (e.g. snapshot). Passing 0,0 just returns the current values. More... | |
| float | set_aspectratio (float aspect) |
| Set the aspect ratio. Negative values ignored. Returns the new value. Also updates image size if it has been set. More... | |
| int | numformats () const |
| Number of output formats. More... | |
| const char * | format (int i) const |
| get/set formats. More... | |
| const char * | format () const |
| int | set_format (const char *format) |
| virtual void | set_background (const float *) |
| copy in the background color. More... | |
| virtual int | open_file (const char *filename) |
| open the file; don't write the header info return TRUE if opened okay if file already opened, complain, and close previous file this will also reset the state variables. More... | |
| virtual int | do_define_light (int n, float *color, float *position) |
| virtual routines to deal with light sources, return success/failure. More... | |
| virtual int | do_activate_light (int n, int turnon) |
| virtual int | prepare3D (int) |
| ready to draw 3D. More... | |
| virtual void | render (const VMDDisplayList *) |
| process list of draw commands. More... | |
| virtual void | update (int) |
| don't need to override this (unless you want to do so). More... | |
Protected Methods | |
| virtual void | update_exec_cmd () |
| Renderer-specific function to update execCmd based on the current state of aalevel, image size, etc. Default implementation is to do nothing. More... | |
| virtual void | do_use_colors () |
| virtual void | write_header (void) |
| write the header info. This is an alias for prepare3D. More... | |
| virtual void | write_trailer (void) |
| write any trailer info. This is called by update. More... | |
| virtual void | close_file (void) |
| close the file. This is called by update, and exists due to symmetry. Also, is called for case when open is called when a file was already open. More... | |
| void | super_load (float *cmdptr) |
| virtual void | load (const Matrix4 &) |
| void | super_multmatrix (const float *cmdptr) |
| virtual void | multmatrix (const Matrix4 &) |
| multiply transformation matrix. More... | |
| void | super_translate (float *cmdptr) |
| virtual void | translate (float, float, float) |
| void | super_rot (float *cmdptr) |
| virtual void | rot (float, char) |
| void | super_scale (float *cmdptr) |
| void | super_scale (float) |
| virtual void | scale (float, float, float) |
| float | scale_radius (float) |
| compute the current scaling factor. More... | |
| void | super_set_color (int index) |
| only calls set_color when index changes. More... | |
| virtual void | set_color (int) |
| set the color index. More... | |
| int | nearest_index (float r, float g, float b) const |
| compute nearest index in matData using given rgb value XXX We shouldn't be doing this; a better approach would be to store the new color in the matData color table and return the new index, rather than trying to match a 17 color palette. More... | |
| void | super_set_material (int index) |
| only call set_material on idx chg. More... | |
| virtual void | set_material (int) |
| change material index. More... | |
| virtual void | start_clipgroup () |
| emit clipping plane group. More... | |
| virtual void | end_clipgroup () |
| terminate clipping plane group. More... | |
| virtual void | set_line_width (int new_width) |
| virtual void | set_line_style (int) |
| called by super. More... | |
| virtual void | set_sphere_res (int) |
| called by super. More... | |
| virtual void | set_sphere_style (int) |
| called by super. More... | |
| void | super_materials (int on_or_off) |
| virtual void | activate_materials (void) |
| if previous is TRUE. More... | |
| virtual void | deactivate_materials (void) |
| if super is FALSE. More... | |
| virtual void | cone (float *xyz1, float *xyz2, float radius, int resolution) |
| virtual void | cone (float *, float *, float, float, int) |
| virtual void | cylinder (float *base, float *apex, float radius, int filled) |
| virtual void | line (float *a, float *b) |
| virtual void | point (float *xyz) |
| virtual void | sphere (float *xyzr) |
| virtual void | square (float *norm, float *a, float *b, float *c, float *d) |
| virtual void | triangle (const float *, const float *, const float *, const float *, const float *, const float *) |
| virtual 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) |
| virtual void | trimesh (int, float *cnv, int numfacets, int *facets) |
| virtual void | tristrip (int, const float *cnv, int numstrips, const int *vertsperstrip, const int *facets) |
| virtual void | define_volume_texture (int ID, int xs, int ys, int zs, const float *xplaneeq, const float *yplaneeq, const float *zplaneeq, unsigned char *texmap) |
| virtual void | volume_texture_on (int texmode) |
| virtual void | volume_texture_off (void) |
| virtual void | wiremesh (int, float *cnv, int numlines, int *lines) |
| virtual void | text (const char *) |
| virtual void | comment (const char *) |
| void | super_text_position (float x, float y, float z) |
| virtual void | text_position (float, float, float) |
| virtual void | pick_point (float *, int) |
| here for completeness, only VRML or 'token' renderers would likely use it. More... | |
Protected Attributes | |
| char * | publicName |
| char * | defaultFilename |
| char * | defaultCommandLine |
| char * | execCmd |
| current version of the post-render command. More... | |
| FILE * | outfile |
| the current file. More... | |
| int | isOpened |
| is the file opened correctly. More... | |
| char * | my_filename |
| the current filename. More... | |
| int | has_aa |
| supports antialiasing; off by default. More... | |
| int | aalevel |
| level of antialiasing; -1 if unsupported. More... | |
| int | has_imgsize |
| True if the renderer can produce an arbitrary-sized image; false by default. More... | |
| int | warningflags |
| If set, emit a warning message that this subclass doesn't support all of the render features in use by the current scene. More... | |
| int | imgwidth |
| int | imgheight |
| desired size of image. More... | |
| float | aspectratio |
| Desired aspect ratio. More... | |
| NameList< int > | formats |
| Output formats supported by this renderer. More... | |
| int | curformat |
| Currently selected format. More... | |
| LightState | lightState [DISP_LIGHTS] |
| state of all lights. More... | |
| float | matData [MAXCOLORS][3] |
| color state, copied into here when do_use_colors is called. More... | |
| float | backColor [3] |
| background color, copied into here with set_background is called. More... | |
| float * | dataBlock |
| pointer to data block (for indexed object types). More... | |
| Stack< Matrix4 > | transMat |
| current transformation matrix for the display (NOT the projection matrix). More... | |
| int | colorIndex |
| active color index. More... | |
| int | materialIndex |
| active material index. More... | |
| float | mat_ambient |
| active ambient value. More... | |
| float | mat_diffuse |
| active diffuse value. More... | |
| float | mat_specular |
| active specular value. More... | |
| float | mat_shininess |
| active shininess value. More... | |
| float | mat_opacity |
| active opacity value. More... | |
| float | clip_center [VMD_MAX_CLIP_PLANE][3] |
| clipping plane center. More... | |
| float | clip_normal [VMD_MAX_CLIP_PLANE][3] |
| clipping plane normal. More... | |
| float | clip_color [VMD_MAX_CLIP_PLANE][3] |
| clipping plane CSG color. More... | |
| int | clip_mode [VMD_MAX_CLIP_PLANE] |
| clipping plane mode. More... | |
| int | lineWidth |
| drawing characteristics ... line style, sphere resolution, etc. More... | |
| int | lineStyle |
| drawing characteristics ... line style, sphere resolution, etc. More... | |
| int | pointSize |
| int | sphereResolution |
| int | sphereStyle |
| int | materials_on |
| float | textpos [3] |
Definition at line 44 of file FileRenderer.h.
|
||||||||||||||||
|
create the renderer; set the 'visible' name for the renderer list.
Definition at line 35 of file FileRenderer.C. References aalevel, aspectratio, curformat, defaultCommandLine, defaultFilename, execCmd, FILERENDERER_NOWARNINGS, has_aa, has_imgsize, imgheight, imgwidth, isOpened, my_filename, NULL, outfile, publicName, stringdup, and warningflags. |
|
|
Definition at line 64 of file FileRenderer.C. References close_file, defaultCommandLine, defaultFilename, execCmd, my_filename, and publicName. |
|
|
if previous is TRUE.
Definition at line 268 of file FileRenderer.h. Referenced by super_materials. |
|
|
close the file. This is called by update, and exists due to symmetry. Also, is called for case when open is called when a file was already open.
Reimplemented in LibTachyonDisplayDevice. Definition at line 193 of file FileRenderer.C. References isOpened, my_filename, NULL, and outfile. Referenced by open_file, update, and ~FileRenderer. |
|
|
Reimplemented in ArtDisplayDevice. Definition at line 441 of file FileRenderer.h. Referenced by render. |
|
||||||||||||||||||||||||
|
Definition at line 738 of file FileRenderer.C. References cross_prod, CYLINDER_LEADINGCAP, CYLINDER_TRAILINGCAP, triangle, vec_add, vec_copy, vec_negate, vec_normalize, and VMD_TWOPI. |
|
||||||||||||||||||||
|
Definition at line 275 of file FileRenderer.h. Referenced by render. |
|
||||||||||||||||||||
|
Reimplemented in ArtDisplayDevice. Definition at line 867 of file FileRenderer.C. References cross_prod, CYLINDER_LEADINGCAP, CYLINDER_TRAILINGCAP, triangle, vec_add, vec_copy, vec_negate, vec_normalize, and VMD_TWOPI. Referenced by GelatoDisplayDevice::cylinder, LibGelatoDisplayDevice::line, line, and render. |
|
|
if super is FALSE.
Definition at line 269 of file FileRenderer.h. Referenced by super_materials. |
|
|
Definition at line 92 of file FileRenderer.h. References defaultCommandLine. Referenced by VMDApp::filerender_default_option. |
|
|
Definition at line 91 of file FileRenderer.h. References defaultFilename. Referenced by VMDApp::filerender_default_filename. |
|
||||||||||||||||||||||||||||||||||||
|
Reimplemented in TachyonDisplayDevice. Definition at line 395 of file FileRenderer.h. References FILERENDERER_NOTEXTURE, and warningflags. Referenced by render. |
|
||||||||||||
|
Reimplemented from DisplayDevice. Definition at line 85 of file FileRenderer.C. References lightState, and FileRenderer::LightState::on. Referenced by Scene::filedraw. |
|
||||||||||||||||
|
virtual routines to deal with light sources, return success/failure.
Reimplemented from DisplayDevice. Definition at line 77 of file FileRenderer.C. References FileRenderer::LightState::color, lightState, and FileRenderer::LightState::pos. Referenced by Scene::filedraw. |
|
|
Reimplemented from DisplayDevice. Definition at line 90 of file FileRenderer.C. References DisplayDevice::colorData, matData, and MAXCOLORS. |
|
|
terminate clipping plane group.
Reimplemented in LibTachyonDisplayDevice. Definition at line 252 of file FileRenderer.h. Referenced by render. |
|
|
Definition at line 127 of file FileRenderer.h. References curformat, and NameList::name. |
|
|
get/set formats.
Definition at line 126 of file FileRenderer.h. References NameList::name. Referenced by FileRenderList::format, and set_format. |
|
|
Supports anti-aliasing?
Definition at line 98 of file FileRenderer.h. References has_aa. Referenced by FileRenderList::has_antialiasing. |
|
|
Supports arbitrary image size?
Definition at line 110 of file FileRenderer.h. References has_imgsize. Referenced by FileRenderList::has_imagesize. |
|
||||||||||||
|
Reimplemented in ArtDisplayDevice. Definition at line 940 of file FileRenderer.C. References cylinder, lineStyle, lineWidth, vec_copy, vec_normalize, and vec_sub. |
|
|
Reimplemented in Vrml2DisplayDevice. Definition at line 212 of file FileRenderer.h. Referenced by super_load. |
|
|
multiply transformation matrix.
Reimplemented from DisplayDevice. Reimplemented in Vrml2DisplayDevice. Definition at line 214 of file FileRenderer.h. Referenced by super_multmatrix. |
|
||||||||||||||||
|
compute nearest index in matData using given rgb value XXX We shouldn't be doing this; a better approach would be to store the new color in the matData color table and return the new index, rather than trying to match a 17 color palette.
Definition at line 131 of file FileRenderer.C. References BEGREGCLRS, matData, and REGCLRS. Referenced by PSDisplayDevice::render, render, tricolor, and wiremesh. |
|
|
Number of output formats.
Definition at line 123 of file FileRenderer.h. References NameList::num. Referenced by FileRenderList::numformats. |
|
|
open the file; don't write the header info return TRUE if opened okay if file already opened, complain, and close previous file this will also reset the state variables.
Reimplemented in LibTachyonDisplayDevice. Definition at line 159 of file FileRenderer.C. References close_file, isOpened, my_filename, NULL, outfile, and stringdup. |
|
||||||||||||
|
here for completeness, only VRML or 'token' renderers would likely use it.
Definition at line 450 of file FileRenderer.h. Referenced by render. |
|
|
Reimplemented in ArtDisplayDevice. Definition at line 294 of file FileRenderer.h. References lineWidth, and vec_copy. Referenced by render. |
|
|
ready to draw 3D.
Reimplemented from DisplayDevice. Definition at line 204 of file FileRenderer.C. References DisplayDevice::eyeDir, DisplayDevice::eyePos, DisplayDevice::eyeSepDir, DisplayDevice::LEFTEYE, DisplayDevice::NOSTEREO, DisplayDevice::RIGHTEYE, and write_header. Referenced by Scene::filedraw. |
|
|
||||||||||||
|
Definition at line 218 of file FileRenderer.h. Referenced by super_rot. |
|
|
Definition at line 93 of file FileRenderer.h. References execCmd. Referenced by VMDApp::filerender_option. |
|
||||||||||||||||
|
Definition at line 221 of file FileRenderer.h. Referenced by super_scale, and R3dDisplayDevice::write_header. |
|
|
|
Get/set the AA level; return the new value. Must be non-negative.
Definition at line 101 of file FileRenderer.h. References aalevel, has_aa, and update_exec_cmd. Referenced by FileRenderList::aalevel. |
|
|
Set the aspect ratio. Negative values ignored. Returns the new value. Also updates image size if it has been set.
Definition at line 124 of file FileRenderer.C. References DisplayDevice::aspect, aspectratio, and set_imagesize. Referenced by FileRenderList::aspectratio. |
|
|
copy in the background color.
Reimplemented from DisplayDevice. Definition at line 151 of file FileRenderer.C. References backColor. Referenced by Scene::filedraw. |
|
|
set the color index.
Reimplemented in RadianceDisplayDevice. Definition at line 228 of file FileRenderer.h. Referenced by super_set_color. |
|
|
Definition at line 731 of file FileRenderer.C. References execCmd, and stringdup. Referenced by VMDApp::filerender_option, FileRenderList::set_render_option, and SnapshotDisplayDevice::SnapshotDisplayDevice. |
|
|
Definition at line 128 of file FileRenderer.h. References curformat, format, NameList::typecode, and update_exec_cmd. Referenced by FileRenderList::set_format. |
|
||||||||||||
|
Get/set the image size. Return success and places the current values in the passed-in pointers. May fail if the renderer is not able to specify the image size (e.g. snapshot). Passing 0,0 just returns the current values.
Definition at line 98 of file FileRenderer.C. References aspectratio, imgheight, imgwidth, and update_exec_cmd. Referenced by FileRenderList::imagesize, and set_aspectratio. |
|
|
called by super.
Definition at line 259 of file FileRenderer.h. Referenced by render. |
|
|
Reimplemented in POV3DisplayDevice. Definition at line 256 of file FileRenderer.h. References lineWidth. Referenced by render. |
|
|
change material index.
Definition at line 244 of file FileRenderer.h. Referenced by super_set_material. |
|
|
called by super.
Definition at line 263 of file FileRenderer.h. Referenced by PSDisplayDevice::render, and render. |
|
|
called by super.
Definition at line 264 of file FileRenderer.h. Referenced by render. |
|
|
Reimplemented in ArtDisplayDevice. Definition at line 971 of file FileRenderer.C. References NULL, sphereResolution, triangle, vec_copy, and vec_normalize. Referenced by render. |
|
||||||||||||||||||||||||
|
Reimplemented in ArtDisplayDevice. Definition at line 306 of file FileRenderer.h. References triangle. Referenced by render. |
|
|
emit clipping plane group.
Reimplemented in LibTachyonDisplayDevice. Definition at line 1152 of file FileRenderer.C. References clip_mode, FILERENDERER_NOCLIP, VMD_MAX_CLIP_PLANE, and warningflags. Referenced by render. |
|
|
Definition at line 661 of file FileRenderer.C. References load, Stack< Matrix4 >::top, and transMat. |
|
|
Definition at line 648 of file FileRenderer.C. References activate_materials, deactivate_materials, and materials_on. Referenced by render, super_set_color, and super_set_material. |
|
|
Definition at line 666 of file FileRenderer.C. References multmatrix, Stack< Matrix4 >::top, and transMat. Referenced by PSDisplayDevice::render, and render. |
|
|
Definition at line 677 of file FileRenderer.C. References rot, Stack< Matrix4 >::top, and transMat. |
|
|
Definition at line 687 of file FileRenderer.C. References scale, Matrix4::scale, Stack< Matrix4 >::top, and transMat. |
|
|
Definition at line 682 of file |