Ignore:
Timestamp:
Mar 12, 2012 11:14:24 AM (12 years ago)
Author:
ldelgass
Message:

Move declarations of dx volume loading functions to separate headers, remove
unused structs from nanovis.h and reorganize static NanoVis? class member
declarations.

Location:
trunk/packages/vizservers/nanovis
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/Command.cpp

    r2835 r2846  
    5757#include "PlaneRenderer.h"
    5858#endif
     59#ifdef USE_POINTSET_RENDERER
     60#include "PointSet.h"
     61#endif
     62#include "dxReader.h"
    5963#include "Grid.h"
    6064#include "HeightMap.h"
  • trunk/packages/vizservers/nanovis/Makefile.in

    r2841 r2846  
    307307CmdProc.o: CmdProc.cpp CmdProc.h
    308308Color.o: Color.cpp Color.h
    309 Command.o: Command.cpp
     309Command.o: Command.cpp dxReader.h
    310310ContourLineFilter.o: ContourLineFilter.cpp ContourLineFilter.h
    311311ConvexPolygon.o: ConvexPolygon.cpp ConvexPolygon.h Vector4.h Mat4x4.h Plane.h
  • trunk/packages/vizservers/nanovis/nanovis.h

    r2836 r2846  
    6767class FlowIterator;
    6868
    69 struct Vector2 {
    70     float x, y;
    71     float mag()
    72     {
    73         return sqrt(x*x + y*y);
    74     }
    75 };
    76 
    77 struct RegGrid2 {
    78     int width, height;
    79     Vector2 *field;
    80 
    81     RegGrid2(int w, int h)
    82     {
    83         width = w;
    84         height = h;
    85         field = new Vector2[w*h];
    86     }
    87 
    88     void put(Vector2& v, int x ,int y)
    89     {
    90         field[x+y*width] = v;
    91     }
    92    
    93     Vector2& get(int x, int y)
    94     {
    95         return field[x+y*width];
    96     }
    97 };
    98 
    9969class NanoVis
    10070{
     
    10676        MAP_HEIGHTMAPS = (1 << 3),
    10777    };
    108 
    109     static VolumeRenderer *vol_renderer;
    110     static NvFlowVisRenderer *flowVisRenderer;
    111     static VelocityArrowsSlice *velocityArrowsSlice;
    112     static NvLIC *licRenderer;
    113     static PlaneRenderer *plane_renderer;
    114 #if PLANE_CMD
    115     static Texture2D *plane[]; ///< Pointers to 2D planes
    116 #endif
    117 #ifdef USE_POINTSET_RENDERER
    118     static PointSetRenderer *pointset_renderer;
    119     static std::vector<PointSet *> pointSet;
    120 #endif
    121 
    122     static Texture2D *legendTexture;
    123     static NvColorTableRenderer *color_table_renderer;
    124 
    125     static graphics::RenderContext *renderContext;
    126     static std::vector<HeightMap *> heightMap;
    127     static unsigned char *screen_buffer;
    128     static Tcl_HashTable volumeTable;
    129     static Tcl_HashTable heightmapTable;
    130     static std::vector<NvVectorField *> flow;
    131     static Grid *grid;
    132     static R2Fonts *fonts;
    133     static int updir;
    134     static NvCamera *cam;
    135 
    136     static float lic_slice_x;
    137     static float lic_slice_y;
    138     static float lic_slice_z;
    139     static int lic_axis;        /* 0:x, 1:y, 2:z */
    140 
    141     static bool axis_on;
    142     static bool config_pending; // Indicates if the limits need to be recomputed.
    143     static int win_width;       //size of the render window
    144     static int win_height;      //size of the render window
    145     static int render_window;
    146 
    147     static bool debug_flag;
    148 
    149     static Tcl_Interp *interp;
    150     static Tcl_DString cmdbuffer;
    15178
    15279    static TransferFunction *get_transfunc(const char *name);
     
    192119#endif
    193120
    194     static FILE *stdin, *logfile, *recfile;
    195 
    196121    static void read_screen()
    197122    {
     
    203128        glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, _final_fbo);
    204129    }
    205 
    206     static unsigned int flags;
    207     static Tcl_HashTable flowTable;
    208     static double magMin, magMax;
    209     static float xMin, xMax, yMin, yMax, zMin, zMax, wMin, wMax;
    210     static float xOrigin, yOrigin, zOrigin;
    211130
    212131    static FlowCmd *FirstFlow(FlowIterator *iterPtr);
     
    225144    static void EventuallyRedraw(unsigned int flag = 0);
    226145    static void remove_volume(Volume *volPtr);
     146
     147    static FILE *stdin, *logfile, *recfile;
     148
     149    static unsigned int flags;
     150    static bool debug_flag;
     151    static bool axis_on;
     152    static bool config_pending; // Indicates if the limits need to be recomputed.
     153    static int win_width;       //size of the render window
     154    static int win_height;      //size of the render window
     155    static int render_window;
     156    static unsigned char *screen_buffer;
     157    static Grid *grid;
     158    static R2Fonts *fonts;
     159    static int updir;
     160    static NvCamera *cam;
     161    static graphics::RenderContext *renderContext;
     162
     163    static Tcl_HashTable volumeTable;
     164
     165    static std::vector<NvVectorField *> flow;
     166    static Tcl_HashTable flowTable;
     167    static double magMin, magMax;
     168    static float xMin, xMax, yMin, yMax, zMin, zMax, wMin, wMax;
     169    static float xOrigin, yOrigin, zOrigin;
     170
     171    static VolumeRenderer *vol_renderer;
     172    static NvFlowVisRenderer *flowVisRenderer;
     173    static VelocityArrowsSlice *velocityArrowsSlice;
     174    static NvLIC *licRenderer;
     175    static PlaneRenderer *plane_renderer;
     176#if PLANE_CMD
     177    static Texture2D *plane[]; ///< Pointers to 2D planes
     178#endif
     179#ifdef USE_POINTSET_RENDERER
     180    static PointSetRenderer *pointset_renderer;
     181    static std::vector<PointSet *> pointSet;
     182#endif
     183
    227184    static Tcl_HashTable tfTable;
     185    static Texture2D *legendTexture;
     186    static NvColorTableRenderer *color_table_renderer;
     187
     188    static std::vector<HeightMap *> heightMap;
     189    static Tcl_HashTable heightmapTable;
     190
     191    static float lic_slice_x;
     192    static float lic_slice_y;
     193    static float lic_slice_z;
     194    static int lic_axis;        /* 0:x, 1:y, 2:z */
     195
     196    static Tcl_Interp *interp;
     197    static Tcl_DString cmdbuffer;
    228198
    229199private:
     
    232202};
    233203
    234 extern Volume *load_volume_stream(Rappture::Outcome &status, const char *tag,
    235                                   std::iostream& fin);
    236 
    237 extern Volume *load_volume_stream_odx(Rappture::Outcome& status,
    238                                       const char *tag, const char *buf, int nBytes);
    239 
    240 extern Volume *load_volume_stream2(Rappture::Outcome & status, const char *tag,
    241                                    std::iostream& fin);
    242 
    243 extern Volume *load_vector_stream(Rappture::Outcome& result, const char *tag,
    244                                   size_t length, char *bytes);
    245 
    246 extern Volume *load_vector_stream2(Rappture::Outcome& result, const char *tag,
    247                                    size_t length, char *bytes);
    248 
    249 #endif
     204#endif
Note: See TracChangeset for help on using the changeset viewer.