ivaria/decal.h
Go to the documentation of this file.00001 /* 00002 Crystal Space 3D engine 00003 Copyright (C) 2000 by Jorrit Tyberghein 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 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 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 #ifndef __CS_IGEOM_DECAL_H__ 00020 #define __CS_IGEOM_DECAL_H__ 00021 00022 #include <csutil/scf.h> 00023 #include <ivideo/graph3d.h> 00024 00025 struct iSector; 00026 struct iMaterialWrapper; 00027 class csVector3; 00028 class csVector2; 00029 class csPoly3D; 00030 class csColor4; 00031 00045 struct iDecal 00046 { 00047 }; 00048 00053 struct iDecalTemplate : public virtual iBase 00054 { 00055 SCF_INTERFACE(iDecalTemplate, 1, 2, 0); 00056 00062 virtual float GetTimeToLive() const = 0; 00063 00068 virtual iMaterialWrapper* GetMaterialWrapper() = 0; 00069 00074 virtual long GetRenderPriority() const = 0; 00075 00080 virtual csZBufMode GetZBufMode() const = 0; 00081 00094 virtual float GetPolygonNormalThreshold() const = 0; 00095 00105 virtual float GetDecalOffset() const = 0; 00106 00112 virtual bool HasTopClipping() const = 0; 00113 00119 virtual float GetTopClippingScale() const = 0; 00120 00126 virtual bool HasBottomClipping() const = 0; 00127 00133 virtual float GetBottomClippingScale() const = 0; 00134 00140 virtual const csVector2 & GetMinTexCoord() const = 0; 00141 00146 virtual const csColor4 & GetMainColor() const = 0; 00147 00154 virtual const csColor4 & GetTopColor() const = 0; 00155 00162 virtual const csColor4 & GetBottomColor() const = 0; 00163 00169 virtual const csVector2 & GetMaxTexCoord() const = 0; 00170 00175 virtual const uint GetMixMode() const = 0; 00176 00183 virtual float GetPerpendicularFaceThreshold() const = 0; 00184 00192 virtual float GetPerpendicularFaceOffset() const = 0; 00193 00199 virtual void SetTimeToLive(float timeToLive) = 0; 00200 00205 virtual void SetMaterialWrapper(iMaterialWrapper* material) = 0; 00206 00211 virtual void SetRenderPriority(long renderPriority) = 0; 00212 00217 virtual void SetZBufMode(csZBufMode mode) = 0; 00218 00231 virtual void SetPolygonNormalThreshold(float polygonNormalThreshold) = 0; 00232 00242 virtual void SetDecalOffset(float decalOffset) = 0; 00243 00249 virtual void SetTopClipping(bool enabled, float topPlaneScale=0.0f) = 0; 00250 00256 virtual void SetBottomClipping(bool enabled, float bottomPlaneScale) = 0; 00257 00264 virtual void SetTexCoords(const csVector2 & min, const csVector2 & max) = 0; 00265 00270 virtual void SetMixMode(uint mixMode) = 0; 00271 00278 virtual void SetPerpendicularFaceThreshold(float threshold) = 0; 00279 00287 virtual void SetPerpendicularFaceOffset(float offset) = 0; 00288 00293 virtual void SetMainColor(const csColor4 & color) = 0; 00294 00301 virtual void SetTopColor(const csColor4 & color) = 0; 00302 00309 virtual void SetBottomColor(const csColor4 & color) = 0; 00310 }; 00311 00316 struct iDecalBuilder 00317 { 00318 virtual ~iDecalBuilder() {} 00319 00326 virtual void AddStaticPoly(const csPoly3D & p) = 0; 00327 00328 }; 00329 00339 struct iDecalManager : public virtual iBase 00340 { 00341 SCF_INTERFACE(iDecalManager, 1, 0, 0); 00342 00355 virtual iDecal * CreateDecal(iDecalTemplate * decalTemplate, 00356 iSector * sector, const csVector3 & pos, const csVector3 & up, 00357 const csVector3 & normal, float width=1.0f, float height=1.0f, 00358 iDecal * oldDecal = 0) = 0; 00359 00365 virtual csRef<iDecalTemplate> CreateDecalTemplate( 00366 iMaterialWrapper* material) = 0; 00367 00372 virtual void DeleteDecal(const iDecal * decal) = 0; 00373 00378 virtual size_t GetDecalCount() const = 0; 00379 00385 virtual iDecal * GetDecal(size_t idx) const = 0; 00386 }; 00391 #endif // __CS_IGEOM_DECAL_H__
Generated for Crystal Space 1.2.1 by doxygen 1.5.3