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

WavefrontDisplayDevice Class Reference

FileRenderer subclass to export VMD scenes to Wavefront "OBJ" format. More...

#include <WavefrontDisplayDevice.h>

Inheritance diagram for WavefrontDisplayDevice:

FileRenderer DisplayDevice List of all members.

Public Methods

 WavefrontDisplayDevice (void)
virtual ~WavefrontDisplayDevice (void)
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 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 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...


Protected Methods

void beginrepgeomgroup (const char *)
 start a new representation geometry group, used to preserve some of the original scene hierarchy when loading VMD scenes into tools like Maya, 3DS Max, etc. More...

void comment (const char *)
 Comment describing representation geometry. More...

void line (float *xyz1, float *xyz2)
 draw a single line. More...

void point (float *xyz)
 draw an unlit point. More...

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

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

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

virtual 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 export VMD scenes to Wavefront "OBJ" format.

Definition at line 39 of file WavefrontDisplayDevice.h.


Constructor & Destructor Documentation

WavefrontDisplayDevice::WavefrontDisplayDevice void   
 

Definition at line 93 of file WavefrontDisplayDevice.C.

WavefrontDisplayDevice::~WavefrontDisplayDevice void    [virtual]
 

Definition at line 97 of file WavefrontDisplayDevice.C.


Member Function Documentation

void WavefrontDisplayDevice::beginrepgeomgroup const char *    s [protected, virtual]
 

start a new representation geometry group, used to preserve some of the original scene hierarchy when loading VMD scenes into tools like Maya, 3DS Max, etc.

Reimplemented from FileRenderer.

Definition at line 100 of file WavefrontDisplayDevice.C.

References FileRenderer::outfile.

void WavefrontDisplayDevice::close_file void    [virtual]
 

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 from FileRenderer.

Definition at line 434 of file WavefrontDisplayDevice.C.

References FileRenderer::isOpened, FileRenderer::my_filename, NULL, and FileRenderer::outfile.

Referenced by open_file.

void WavefrontDisplayDevice::comment const char *    s [protected, virtual]
 

Comment describing representation geometry.

Reimplemented from FileRenderer.

Definition at line 105 of file WavefrontDisplayDevice.C.

References FileRenderer::outfile.

void WavefrontDisplayDevice::line float *    xyz1,
float *    xyz2
[protected, virtual]
 

draw a single line.

Reimplemented from FileRenderer.

Definition at line 121 of file WavefrontDisplayDevice.C.

References DASH_LENGTH, FileRenderer::lineStyle, FileRenderer::outfile, Stack< Matrix4 >::top, and FileRenderer::transMat.

int WavefrontDisplayDevice::open_file const char *    filename [virtual]
 

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 from FileRenderer.

Definition at line 402 of file WavefrontDisplayDevice.C.

References close_file, FileRenderer::isOpened, FileRenderer::my_filename, NULL, FileRenderer::outfile, replacefileextension, FileRenderer::reset_state, and stringdup.

void WavefrontDisplayDevice::point float *    spdata [protected, virtual]
 

draw an unlit point.

Reimplemented from FileRenderer.

Definition at line 110 of file WavefrontDisplayDevice.C.

References FileRenderer::outfile, Stack< Matrix4 >::top, and FileRenderer::transMat.

void WavefrontDisplayDevice::triangle const float *    v1,
const float *    v2,
const float *    v3,
const float *    n1,
const float *    n2,
const float *    n3
[protected, virtual]
 

single color triangle with interpolated surface normals.

Reimplemented from FileRenderer.

Definition at line 180 of file WavefrontDisplayDevice.C.

References FileRenderer::colorIndex, FileRenderer::materialIndex, FileRenderer::outfile, Stack< Matrix4 >::top, and FileRenderer::transMat.

void WavefrontDisplayDevice::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 213 of file WavefrontDisplayDevice.C.

References FileRenderer::materialIndex, FileRenderer::nearest_index, FileRenderer::outfile, Stack< Matrix4 >::top, and FileRenderer::transMat.

void WavefrontDisplayDevice::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 264 of file WavefrontDisplayDevice.C.

References FileRenderer::materialIndex, n, FileRenderer::nearest_index, FileRenderer::outfile, Stack< Matrix4 >::top, and FileRenderer::transMat.

void WavefrontDisplayDevice::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 342 of file WavefrontDisplayDevice.C.

References FileRenderer::materialIndex, FileRenderer::nearest_index, FileRenderer::outfile, Stack< Matrix4 >::top, and FileRenderer::transMat.

void WavefrontDisplayDevice::write_header void    [virtual]
 

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

Reimplemented from FileRenderer.

Definition at line 454 of file WavefrontDisplayDevice.C.

References NULL, FileRenderer::outfile, and stripleadingfilepath.

void WavefrontDisplayDevice::write_trailer void    [virtual]
 

write any trailer info. This is called by update.

Reimplemented from FileRenderer.

Definition at line 540 of file WavefrontDisplayDevice.C.


The documentation for this class was generated from the following files:
Generated on Sat Apr 20 02:45:40 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002