00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020 #ifndef SHIMAGE3D_HPP
00021 #define SHIMAGE3D_HPP
00022
00023 #include <string>
00024 #include "ShDllExport.hpp"
00025 #include "ShRefCount.hpp"
00026 #include "ShMemory.hpp"
00027
00028 namespace SH {
00029
00036 class
00037 SH_DLLEXPORT ShImage3D : public ShRefCountable {
00038 public:
00039 ShImage3D();
00040 ShImage3D(int width, int height, int depth, int elements);
00041
00042 ShImage3D(const ShImage3D& other);
00043
00044 ~ShImage3D();
00045
00046 ShImage3D& operator=(const ShImage3D& other);
00047
00048
00049 int width() const;
00050 int height() const;
00051 int depth() const;
00052 int elements() const;
00053
00054
00055 float operator()(int x, int y, int z, int i) const;
00056
00057
00058 float& operator()(int x, int y, int z, int i);
00059
00060
00061
00062 const float* data() const;
00063 float* data();
00064
00065 ShMemoryPtr memory();
00066 ShPointer<const ShMemory> memory() const;
00067
00068 private:
00069 int m_width, m_height, m_depth;
00070 int m_elements;
00071 ShHostMemoryPtr m_memory;
00072 };
00073
00074 }
00075
00076 #endif