/home/tetron/hack/vos/libs/vos/csplugin/vostexture.hh
Go to the documentation of this file.00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 $Id: vostexture.h,v 1.10 2005/12/19 04:27:00 tetron Exp $ 00003 00004 This file is part of Crystal Space Virtual Object System Abstract 00005 3D Layer plugin (csvosa3dl). 00006 00007 Copyright (C) 2004 Peter Amstutz 00008 00009 This program is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU Lesser General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 */ 00023 00024 #ifndef _VOSTEXTURE_H_ 00025 #define _VOSTEXTURE_H_ 00026 00027 #include <vos/vos/vos.hh> 00028 #include <vos/metaobjects/a3dl/a3dl.hh> 00029 #include "csvosa3dl.hh" 00030 00031 class ConstructTextureTask; 00032 struct iImageIO; 00033 00034 class csMetaTexture : 00035 public A3DL::Texture, 00036 public VOS::ChildChangeListener, 00037 public VOS::PropertyListener 00038 { 00039 private: 00040 iObjectRegistry* object_reg; 00041 csRef<iTextureWrapper> texturewrapper; 00042 bool alreadyLoaded; 00043 csVosA3DL* vosa3dl; 00044 bool needListener; 00045 00046 public: 00047 csMetaTexture(VOS::VobjectBase* superobject); 00048 virtual ~csMetaTexture(); 00049 00050 /** Fully load this object into Crystal Space */ 00051 virtual void Setup(csVosA3DL* va); 00052 00053 /** Return CS iTextureWrapper interface for this object */ 00054 csRef<iTextureWrapper> GetTextureWrapper(); 00055 00056 virtual void notifyPropertyChange(const VOS::PropertyEvent& event); 00057 virtual void notifyChildInserted(VOS::VobjectEvent& event); 00058 virtual void notifyChildReplaced(VOS::VobjectEvent& event); 00059 virtual void notifyChildRemoved(VOS::VobjectEvent& event); 00060 00061 static VOS::MetaObject* new_csMetaTexture(VOS::VobjectBase* superobject, 00062 const std::string& type); 00063 00064 friend class ConstructTextureTask; 00065 friend class ConstructMozTextureTask; 00066 }; 00067 00068 #endif