- Main Page
- Classes
- Files

- File List

# src/CUDARayCasting/Render.h

Go to the documentation of this file.

    00001
    00002
    00003
    00004
    00005
    00006
    00007
    00008
    00009
    00010
    00011
    00012
    00013
    00014
    00015
    00016
    00017
    00018
    00019
    00020
    00025 #ifndef _Render_H_
    00026 #define _Render_H_
    00027
    00028 #include <vector>
    00029 #include "boost/smart_ptr/shared_array.hpp"
    00030 #include "Vector3.h"
    00031 #include "Matrix4x4.h"
    00032
    00033 #include "PixelBuffer.h"
    00034 #include "driver_types.h"
    00035
    00036 namespace CUDARayCasting
    00037 {
    00038
    00047 class Render
    00048 {
    00049 public:
    00051         Render(int width, int height);
    00052
    00054         ~Render(void);
    00055
    00061         void Initialize(boost::shared_array<unsigned char> dataPtr,
    00062                                         int texWidth, int texHeight, int texDepth,
    00063                                         boost::shared_array<float> transferFunctionPtr,
    00064                                         int transferFunctionWidth, float step, int stepNumber,
    00065                                         const Matrix4x4& viewMatrix, const Matrix4x4& volumeMatrix,
    00066                                         const Vector3& bboxMin, const Vector3& bboxMax);
    00067
    00071         void Reshape(int width, int height);
    00072
    00074         void BeginFrame(void);
    00075
    00077         void EndFrame(void);
    00078
    00079         void DrawVolume(void);
    00080
    00081         void UpdateTransferFunction(void);
    00082
    00083         void SetStep(float step);
    00084
    00085         void SetStepNumber(int stepNumber);
    00086
    00087         void DrawString(const std::string& s, int x, int y, const Vector3& color);
    00088
    00089         void SetCamera(const Matrix4x4& viewMatrix);
    00090
    00091         void SetVolumeMatrix(const Matrix4x4& volumeMatrix);
    00092
    00093 private:
    00094         int m_width;
    00095         int m_height;
    00096
    00097         Matrix4x4 m_viewMatrix;
    00098         Matrix4x4 m_volumeMatrix;
    00099
    00100         boost::shared_array<float> m_transferFunctionPtr;
    00101
    00102         PixelBufferPtr m_pixelBuffer;
    00103
    00104         Vector3 m_bboxMin;
    00105         Vector3 m_bboxMax;
    00106
    00107         int m_steps;
    00108         float m_step;
    00109
    00110         int m_transferFunctionWidth;
    00111
    00113         Render(const Render&);
    00114
    00116         Render& operator=(const Render&);
    00117 };
    00118
    00119 }
    00120
    00121 #endif