Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ShImage3D.hpp

00001 // Sh: A GPU metaprogramming language.
00002 //
00003 // Copyright 2003-2005 Serious Hack Inc.
00004 // 
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
00018 // MA  02110-1301, USA
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

Generated on Thu Jul 28 17:33:02 2005 for Sh by  doxygen 1.4.3-20050530