- Main Page
- Classes
- Files

- File List

# SlicedRenderer.h

    00001 #ifndef __sliced_renderer_header
    00002 #define __sliced_renderer_header
    00003
    00004 #include <QObject>
    00005 #include <QtOpenGL>
    00006
    00007 /*
    00008  This class is for rendering slices and gets called by the Visualizer class
    00009  */
    00010
    00011 class SlicedRenderer : public QObject
    00012 {
    00013     Q_OBJECT
    00014
    00015 private:
    00016
    00018
    00019
    00021     enum TAxis
    00022     {
    00023         Z_AXIS = 0,
    00024         X_AXIS = 1,
    00025         Y_AXIS = 2
    00026     };
    00027
    00028     enum TMode
    00029     {
    00030         SINGLE_SLICE = 0,
    00031         SINGLE_SLICE_LOOPED = 1,
    00032         ALL_SLICES = 2
    00033     };
    00034
    00036
    00037
    00040     TAxis           m_tAxis;        //which axis should be sliced?
    00041     TMode           m_tMode;        //which rendermode?
    00042     unsigned int    m_nSlice;       //which slide should be rendered?
    00043     unsigned int    m_nLoopCount;
    00044
    00045     QGLShaderProgram m_qShader;
    00047
    00050
    00051         void ItlRenderAllSlices();
    00052         void ItlRenderSingleSlice();
    00053
    00054         void ItlRenderSingleSliceX();
    00055         void ItlRenderSingleSliceY();
    00056         void ItlRenderSingleSliceZ();
    00058 public:
    00059
    00061
    00062     static SlicedRenderer *instance();
    00063
    00064     void initialize();
    00065     void render();
    00066
    00067     //constructor
    00068     SlicedRenderer();
    00069
    00070 public slots:
    00073     void setMode(int iMode);
    00074     void setSlice(int iSlice);
    00075     void setAxis(int iAxis);
    00077 };
    00078
    00079 #endif //__sliced_renderer_header