00001 /* 00002 ----------------------------------------------------------------------------- 00003 This source file is part of OGRE 00004 (Object-oriented Graphics Rendering Engine) 00005 For the latest info, see http://www.ogre3d.org/ 00006 00007 Copyright (c) 2000-2005 The OGRE Team 00008 Also see acknowledgements in Readme.html 00009 00010 This program is free software; you can redistribute it and/or modify it under 00011 the terms of the GNU Lesser General Public License as published by the Free Software 00012 Foundation; either version 2 of the License, or (at your option) any later 00013 version. 00014 00015 This program is distributed in the hope that it will be useful, but WITHOUT 00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License along with 00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to 00022 http://www.gnu.org/copyleft/lesser.txt. 00023 ----------------------------------------------------------------------------- 00024 */ 00025 #ifndef __Common_H__ 00026 #define __Common_H__ 00027 // Common stuff 00028 00029 #include <utility> 00030 00031 namespace Ogre { 00032 00033 00036 enum CompareFunction 00037 { 00038 CMPF_ALWAYS_FAIL, 00039 CMPF_ALWAYS_PASS, 00040 CMPF_LESS, 00041 CMPF_LESS_EQUAL, 00042 CMPF_EQUAL, 00043 CMPF_NOT_EQUAL, 00044 CMPF_GREATER_EQUAL, 00045 CMPF_GREATER 00046 }; 00047 00050 enum TextureFilterOptions 00051 { 00053 TFO_NONE, 00055 TFO_BILINEAR, 00057 TFO_TRILINEAR, 00059 TFO_ANISOTROPIC 00060 }; 00061 00062 enum FilterType 00063 { 00065 FT_MIN, 00067 FT_MAG, 00069 FT_MIP 00070 }; 00072 enum FilterOptions 00073 { 00075 FO_NONE, 00077 FO_POINT, 00079 FO_LINEAR, 00081 FO_ANISOTROPIC 00082 }; 00083 00085 enum ShadeOptions 00086 { 00087 SO_FLAT, 00088 SO_GOURAUD, 00089 SO_PHONG 00090 }; 00091 00093 enum FogMode 00094 { 00096 FOG_NONE, 00098 FOG_EXP, 00100 FOG_EXP2, 00102 FOG_LINEAR 00103 }; 00104 00107 enum CullingMode 00108 { 00110 CULL_NONE = 1, 00112 CULL_CLOCKWISE = 2, 00114 CULL_ANTICLOCKWISE = 3 00115 }; 00116 00122 enum ManualCullingMode 00123 { 00125 MANUAL_CULL_NONE = 1, 00127 MANUAL_CULL_BACK = 2, 00129 MANUAL_CULL_FRONT = 3 00130 }; 00131 00133 enum WaveformType 00134 { 00136 WFT_SINE, 00138 WFT_TRIANGLE, 00140 WFT_SQUARE, 00142 WFT_SAWTOOTH, 00144 WFT_INVERSE_SAWTOOTH 00145 }; 00146 00148 enum SceneDetailLevel 00149 { 00151 SDL_POINTS = 1, 00153 SDL_WIREFRAME = 2, 00155 SDL_SOLID = 3 00156 }; 00157 00159 enum ShadowTechnique 00160 { 00162 SHADOWTYPE_NONE, 00169 SHADOWTYPE_STENCIL_MODULATIVE, 00177 SHADOWTYPE_STENCIL_ADDITIVE, 00182 SHADOWTYPE_TEXTURE_MODULATIVE 00183 }; 00184 00186 typedef int TrackVertexColourType; 00187 enum TrackVertexColourEnum { 00188 TVC_NONE = 0x0, 00189 TVC_AMBIENT = 0x1, 00190 TVC_DIFFUSE = 0x2, 00191 TVC_SPECULAR = 0x4, 00192 TVC_EMISSIVE = 0x8 00193 }; 00194 00195 typedef std::vector<Light*> LightList; 00196 00197 typedef std::map<String, bool> UnaryOptionList; 00198 typedef std::map<String, String> BinaryOptionList; 00199 00201 typedef std::map<String, String> NameValuePairList; 00202 00205 struct Rect 00206 { 00207 long left, top, right, bottom; 00208 00209 Rect() 00210 { 00211 } 00212 Rect( long l, long t, long r, long b ) 00213 { 00214 left = l; 00215 top = t; 00216 right = r; 00217 bottom = b; 00218 } 00219 Rect& operator = ( const Rect& other ) 00220 { 00221 left = other.left; 00222 top = other.top; 00223 right = other.right; 00224 bottom = other.bottom; 00225 00226 return *this; 00227 } 00228 }; 00229 00234 struct Box 00235 { 00236 size_t left, top, right, bottom, front, back; 00238 Box() 00239 { 00240 } 00250 Box( size_t l, size_t t, size_t r, size_t b ): 00251 left(l), 00252 top(t), 00253 right(r), 00254 bottom(b), 00255 front(0), 00256 back(1) 00257 { 00258 assert(right >= left && bottom >= top && back >= front); 00259 } 00271 Box( size_t l, size_t t, size_t ff, size_t r, size_t b, size_t bb ): 00272 left(l), 00273 top(t), 00274 right(r), 00275 bottom(b), 00276 front(ff), 00277 back(bb) 00278 { 00279 assert(right >= left && bottom >= top && back >= front); 00280 } 00281 00283 bool contains(const Box &def) const 00284 { 00285 return (def.left >= left && def.top >= top && def.front >= front && 00286 def.right <= right && def.bottom <= bottom && def.back <= back); 00287 } 00288 00290 size_t getWidth() const { return right-left; } 00292 size_t getHeight() const { return bottom-top; } 00294 size_t getDepth() const { return back-front; } 00295 }; 00296 00297 00298 00310 int _OgreExport findCommandLineOpts(int numargs, char** argv, UnaryOptionList& unaryOptList, 00311 BinaryOptionList& binOptList); 00312 00313 } 00314 00315 #endif
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 12:59:42 2006