- Main Page
- Classes
- Files

- File List

# src/CUDARayCasting/Logic.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
    00026 #ifndef _LOGIC_H_
    00027 #define _LOGIC_H_
    00028
    00029 #include "Vector3.h"
    00030 #include "Matrix4x4.h"
    00031 #include "boost/smart_ptr/shared_array.hpp"
    00032
    00033 #include "MouseState.h"
    00034
    00035 namespace CUDARayCasting
    00036 {
    00037
    00040 class Logic
    00041 {
    00042 public:
    00044         Logic(void);
    00045
    00047         ~Logic(void);
    00048
    00049         boost::shared_array<unsigned char> LoadVolumeData(void) const;
    00050
    00051         boost::shared_array<float> LoadTransferFunction(void);
    00052
    00053         void UpdateTransferFunction(float elpasedTime);
    00054
    00055         void IncreaseStep(void);
    00056
    00057         void DecreaseStep(void);
    00058
    00059         void IncreaseStepNumber(void);
    00060
    00061         void DecreaseStepNumber(void);
    00062
    00063         void IncreaseAnimationTime(void);
    00064
    00065         void DecreaseAnimationTime(void);
    00066
    00067         void Pause(void);
    00068
    00069         void Play(void);
    00070
    00071         float GetStep(void) const;
    00072
    00073         int GetStepNumber(void) const;
    00074
    00075         float GetAnimationTime(void) const;
    00076
    00077         bool IsStepIncreseable(void) const;
    00078
    00079         bool IsStepDecreseable(void) const;
    00080
    00081         bool IsStepNumberIncreseable(void) const;
    00082
    00083         bool IsStepNumberDecreseable(void) const;
    00084
    00085         bool IsAnimationTimeIncreseable(void) const;
    00086
    00087         bool IsAnimationTimeDecreseable(void) const;
    00088
    00089         bool IsPaused(void) const;
    00090
    00091         void ProcessMouse(const GlutWrapper::MouseState& mouseState, float elapsedTime);
    00092
    00093         const Matrix4x4& GetViewMatrix(void) const;
    00094
    00095         const Matrix4x4& GetVolumeMatrix(void) const;
    00096
    00097         int GetDensityWindowWidth(void) const;
    00098
    00099         int GetDensityWindowBegin(void) const;
    00100
    00101         int GetDensityWindowEnd(void) const;
    00102
    00103         const Vector3& GetBboxMin(void) const;
    00104
    00105         const Vector3& GetBboxMax(void) const;
    00106
    00107 private:
    00108         static const int m_colorElementsCount;
    00109         static const int m_tableColorsCount;
    00110         static const int m_tableSize;
    00111         static const Vector3 m_startColor;
    00112         static const Vector3 m_endColor;
    00113         static const float m_stepFixedAmount;
    00114         static const float m_maxStep;
    00115         static const float m_minStep;
    00116         static const int m_stepNumberFixedAmount;
    00117         static const int m_maxStepNumber;
    00118         static const int m_minStepNumber;
    00119         static const float m_animationTimeFixedAmount;
    00120         static const float m_maxAnimationTime;
    00121         static const float m_minAnimationTime;
    00122
    00123         boost::shared_array<float> m_transferFunctionPtr;
    00124
    00125         float m_totalElapsedTime;
    00126         float m_dir;
    00127         float m_step;
    00128         int m_stepNumber;
    00129         float m_animationTime;
    00130         bool m_paused;
    00131
    00132         Vector3 m_cameraPos;
    00133         Vector3 m_cameraTarget;
    00134         Vector3 m_cameraUp;
    00135         Vector3 m_transCameraPos;
    00136         Matrix4x4 m_viewMatrix;
    00137
    00138         Matrix4x4 m_volumeMatrix;
    00139
    00140         int m_densityWinWidth;
    00141         int m_densityWinBegin;
    00142         int m_densityWinEnd;
    00143
    00144         Vector3 m_bboxMin;
    00145         Vector3 m_bboxMax;
    00146
    00148         Logic(const Logic&);
    00149
    00151         Logic& operator=(const Logic&);
    00152 };
    00153
    00154 }
    00155
    00156 #endif