00001 /* 00002 spacegameengine is a portable easy to use game engine written in C++. 00003 Copyright (C) 2006-2007 Carl Philipp Reh (sefi@s-e-f-i.de) 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public License 00007 as published by the Free Software Foundation; either version 2 00008 of the License, or (at your option) any later version. 00009 00010 This program 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 00013 GNU Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 */ 00019 00020 00021 #ifndef SGE_TEXTURE_PART_HPP_INCLUDED 00022 #define SGE_TEXTURE_PART_HPP_INCLUDED 00023 00024 #include "../shared_ptr.hpp" 00025 #include "../export.hpp" 00026 #include "../renderer/texture.hpp" 00027 #include "../renderer/image_view.hpp" 00028 #include "../renderer/types.hpp" 00029 #include <boost/noncopyable.hpp> 00030 00031 namespace sge 00032 { 00033 namespace texture 00034 { 00035 00036 class fragmented; 00037 00038 class part : boost::noncopyable { 00039 public: 00040 SGE_SYMBOL virtual ~part(); 00041 00042 SGE_SYMBOL const math::rect area_texc( 00043 space_unit repeat = 1) const; 00044 00045 SGE_SYMBOL const renderer::tex_pos translate( 00046 const renderer::tex_pos &local_coords, 00047 space_unit repeat = 1) const; 00048 00049 virtual void data( 00050 renderer::const_image_view const &src) = 0; 00051 00052 virtual renderer::lock_rect const &area() const = 0; 00053 00054 virtual renderer::texture_ptr const my_texture() = 0; 00055 00056 virtual renderer::const_texture_ptr const my_texture() const = 0; 00057 00058 virtual bool repeatable() const = 0; 00059 }; 00060 00061 typedef shared_ptr<part> part_ptr; 00062 typedef shared_ptr<const part> const_part_ptr; 00063 00064 } 00065 } 00066 00067 #endif
1.5.5