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

PSDisplayDevice.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2011 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: PSDisplayDevice.h,v $
00013  *      $Author: johns $       $Locker:  $             $State: Exp $
00014  *      $Revision: 1.38 $       $Date: 2010/12/16 04:08:29 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *
00019  *   Save the image to a Postscript file.
00020  *
00021  ***************************************************************************/
00022 
00023 #ifndef PSDISPLAYDEVICE_H
00024 #define PSDISPLAYDEVICE_h
00025 
00026 #include <stdio.h>
00027 #include "DepthSortObj.h"
00028 #include "DispCmds.h"
00029 #include "FileRenderer.h"
00030 #include "SortableArray.h"
00031 
00033 class PSDisplayDevice : public FileRenderer {
00034 private:
00035    SortableArray <DepthSortObject> depth_list;
00036    float scaledEyePos[3];
00037    float x_scale, y_scale;
00038    float x_offset, y_offset;
00039 
00041    int memerror;
00042 
00044    void process_depth_list(void);
00045 
00047    void set_sphere_res(int res);
00048 
00050 
00051 
00052    void sphere_approx(float *c, float r);
00053    void cylinder_approx(float *a, float *b, float r, int res, int filled);
00054    void cone_approx(float *a, float *b, float r);
00055    void decompose_mesh(DispCmdTriMesh *mesh);
00056    void decompose_tristrip(DispCmdTriStrips *strip);
00058 
00059    inline float compute_dist(float *c);
00060    float compute_light(float *a, float *b, float *c);
00061    float norm_light[3];
00062 
00064 
00065 
00066    int sph_iter;
00067    int sph_desired_iter;
00068    int sph_nverts;
00069    float *sph_verts;
00071 
00073 
00074    long memusage;
00075    long points;
00076    long objects;
00078 
00079 protected:
00080    virtual void comment(const char *s);
00081 
00082 public:
00083    PSDisplayDevice(void);
00084    ~PSDisplayDevice(void);
00085    virtual void write_header(void);
00086    virtual void write_trailer(void);
00087 
00092    virtual void render(const VMDDisplayList *display_list);
00093    virtual void render_done(void);
00094 };
00095 
00096 #endif
00097 

Generated on Mon May 21 01:51:13 2012 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002