OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OgreCommon.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2011 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __Common_H__
29 #define __Common_H__
30 // Common stuff
31 
32 #include "OgreString.h"
33 
34 #if defined ( OGRE_GCC_VISIBILITY )
35 # pragma GCC visibility push(default)
36 #endif
37 
38 #include <utility>
39 #include <sstream>
40 
41 #if defined ( OGRE_GCC_VISIBILITY )
42 # pragma GCC visibility pop
43 #endif
44 
45 namespace Ogre {
53  uint32 _OgreExport FastHash (const char * data, int len, uint32 hashSoFar = 0);
56  template <typename T>
57  uint32 HashCombine (uint32 hashSoFar, const T& data)
58  {
59  return FastHash((const char*)&data, sizeof(T), hashSoFar);
60  }
61 
62 
66  {
75  };
76 
80  {
89  };
90 
92  {
99  };
102  {
111  };
112 
115  {
119  };
120 
122  enum FogMode
123  {
132  };
133 
137  {
144  };
145 
152  {
159  };
160 
163  {
177  };
178 
181  {
188  };
189 
192  {
210 
231 
241 
274  };
275 
279  TVC_NONE = 0x0,
280  TVC_AMBIENT = 0x1,
281  TVC_DIFFUSE = 0x2,
284  };
285 
287  enum SortMode
288  {
293  };
294 
297  FBT_COLOUR = 0x1,
298  FBT_DEPTH = 0x2,
300  };
301 
302 
305  template <typename T>
307  {
308  public:
309  typedef std::vector<T, STLAllocator<T, GeneralAllocPolicy> > VectorImpl;
310  protected:
312  mutable uint32 mListHash;
313  mutable bool mListHashDirty;
314 
315  void addToHash(const T& newPtr) const
316  {
317  mListHash = FastHash((const char*)&newPtr, sizeof(T), mListHash);
318  }
319  void recalcHash() const
320  {
321  mListHash = 0;
322  for (const_iterator i = mList.begin(); i != mList.end(); ++i)
323  addToHash(*i);
324  mListHashDirty = false;
325 
326  }
327 
328  public:
329  typedef typename VectorImpl::value_type value_type;
330  typedef typename VectorImpl::pointer pointer;
331  typedef typename VectorImpl::reference reference;
332  typedef typename VectorImpl::const_reference const_reference;
333  typedef typename VectorImpl::size_type size_type;
334  typedef typename VectorImpl::difference_type difference_type;
335  typedef typename VectorImpl::iterator iterator;
336  typedef typename VectorImpl::const_iterator const_iterator;
337  typedef typename VectorImpl::reverse_iterator reverse_iterator;
338  typedef typename VectorImpl::const_reverse_iterator const_reverse_iterator;
339 
340  void dirtyHash()
341  {
342  mListHashDirty = true;
343  }
344  bool isHashDirty() const
345  {
346  return mListHashDirty;
347  }
348 
350  {
351  // we have to assume that hash needs recalculating on non-const
352  dirtyHash();
353  return mList.begin();
354  }
355  iterator end() { return mList.end(); }
356  const_iterator begin() const { return mList.begin(); }
357  const_iterator end() const { return mList.end(); }
359  {
360  // we have to assume that hash needs recalculating on non-const
361  dirtyHash();
362  return mList.rbegin();
363  }
364  reverse_iterator rend() { return mList.rend(); }
365  const_reverse_iterator rbegin() const { return mList.rbegin(); }
366  const_reverse_iterator rend() const { return mList.rend(); }
367  size_type size() const { return mList.size(); }
368  size_type max_size() const { return mList.max_size(); }
369  size_type capacity() const { return mList.capacity(); }
370  bool empty() const { return mList.empty(); }
372  {
373  // we have to assume that hash needs recalculating on non-const
374  dirtyHash();
375  return mList[n];
376  }
377  const_reference operator[](size_type n) const { return mList[n]; }
379  {
380  // we have to assume that hash needs recalculating on non-const
381  dirtyHash();
382  return mList.const_iterator(n);
383  }
384  const_reference at(size_type n) const { return mList.at(n); }
387  HashedVector(size_type n, const T& t) : mList(n, t), mListHash(0), mListHashDirty(n > 0) {}
390 
391  template <class InputIterator>
392  HashedVector(InputIterator a, InputIterator b)
393  : mList(a, b), mListHashDirty(false)
394  {
395  dirtyHash();
396  }
397 
400  {
401  mList = rhs.mList;
402  mListHash = rhs.mListHash;
404  return *this;
405  }
406 
407  void reserve(size_t t) { mList.reserve(t); }
409  {
410  // we have to assume that hash needs recalculating on non-const
411  dirtyHash();
412  return mList.front();
413  }
414  const_reference front() const { return mList.front(); }
416  {
417  // we have to assume that hash needs recalculating on non-const
418  dirtyHash();
419  return mList.back();
420  }
421  const_reference back() const { return mList.back(); }
422  void push_back(const T& t)
423  {
424  mList.push_back(t);
425  // Quick progressive hash add
426  if (!isHashDirty())
427  addToHash(t);
428  }
429  void pop_back()
430  {
431  mList.pop_back();
432  dirtyHash();
433  }
435  {
436  mList.swap(rhs.mList);
437  dirtyHash();
438  }
439  iterator insert(iterator pos, const T& t)
440  {
441  bool recalc = (pos != end());
442  iterator ret = mList.insert(pos, t);
443  if (recalc)
444  dirtyHash();
445  else
446  addToHash(t);
447  return ret;
448  }
449 
450  template <class InputIterator>
451  void insert(iterator pos,
452  InputIterator f, InputIterator l)
453  {
454  mList.insert(pos, f, l);
455  dirtyHash();
456  }
457 
458  void insert(iterator pos, size_type n, const T& x)
459  {
460  mList.insert(pos, n, x);
461  dirtyHash();
462  }
463 
465  {
466  iterator ret = mList.erase(pos);
467  dirtyHash();
468  return ret;
469  }
471  {
472  iterator ret = mList.erase(first, last);
473  dirtyHash();
474  return ret;
475  }
476  void clear()
477  {
478  mList.clear();
479  mListHash = 0;
480  mListHashDirty = false;
481  }
482 
483  void resize(size_type n, const T& t = T())
484  {
485  bool recalc = false;
486  if (n != size())
487  recalc = true;
488 
489  mList.resize(n, t);
490  if (recalc)
491  dirtyHash();
492  }
493 
495  { return mListHash == b.mListHash; }
496 
497  bool operator<(const HashedVector<T>& b)
498  { return mListHash < b.mListHash; }
499 
500 
502  uint32 getHash() const
503  {
504  if (isHashDirty())
505  recalcHash();
506 
507  return mListHash;
508  }
509  public:
510 
511 
512 
513  };
514 
515  class Light;
517 
518 
519 
522 
525 
528 
529  template< typename T > struct TRect
530  {
532  TRect() : left(0), top(0), right(0), bottom(0) {}
533  TRect( T const & l, T const & t, T const & r, T const & b )
534  : left( l ), top( t ), right( r ), bottom( b )
535  {
536  }
537  TRect( TRect const & o )
538  : left( o.left ), top( o.top ), right( o.right ), bottom( o.bottom )
539  {
540  }
541  TRect & operator=( TRect const & o )
542  {
543  left = o.left;
544  top = o.top;
545  right = o.right;
546  bottom = o.bottom;
547  return *this;
548  }
549  T width() const
550  {
551  return right - left;
552  }
553  T height() const
554  {
555  return bottom - top;
556  }
557  bool isNull() const
558  {
559  return width() == 0 || height() == 0;
560  }
561  void setNull()
562  {
563  left = right = top = bottom = 0;
564  }
565  TRect & merge(const TRect& rhs)
566  {
567  if (isNull())
568  {
569  *this = rhs;
570  }
571  else if (!rhs.isNull())
572  {
573  left = std::min(left, rhs.left);
574  right = std::max(right, rhs.right);
575  top = std::min(top, rhs.top);
576  bottom = std::max(bottom, rhs.bottom);
577  }
578 
579  return *this;
580 
581  }
582  TRect intersect(const TRect& rhs) const
583  {
584  TRect ret;
585  if (isNull() || rhs.isNull())
586  {
587  // empty
588  return ret;
589  }
590  else
591  {
592  ret.left = std::max(left, rhs.left);
593  ret.right = std::min(right, rhs.right);
594  ret.top = std::max(top, rhs.top);
595  ret.bottom = std::min(bottom, rhs.bottom);
596  }
597 
598  if (ret.left > ret.right || ret.top > ret.bottom)
599  {
600  // no intersection, return empty
601  ret.left = ret.top = ret.right = ret.bottom = 0;
602  }
603 
604  return ret;
605 
606  }
607 
608  };
609  template<typename T>
610  std::ostream& operator<<(std::ostream& o, const TRect<T>& r)
611  {
612  o << "TRect<>(l:" << r.left << ", t:" << r.top << ", r:" << r.right << ", b:" << r.bottom << ")";
613  return o;
614  }
615 
619 
624 
628 
633  struct Box
634  {
635  size_t left, top, right, bottom, front, back;
637  Box()
638  : left(0), top(0), right(1), bottom(1), front(0), back(1)
639  {
640  }
650  Box( size_t l, size_t t, size_t r, size_t b ):
651  left(l),
652  top(t),
653  right(r),
654  bottom(b),
655  front(0),
656  back(1)
657  {
658  assert(right >= left && bottom >= top && back >= front);
659  }
671  Box( size_t l, size_t t, size_t ff, size_t r, size_t b, size_t bb ):
672  left(l),
673  top(t),
674  right(r),
675  bottom(b),
676  front(ff),
677  back(bb)
678  {
679  assert(right >= left && bottom >= top && back >= front);
680  }
681 
683  bool contains(const Box &def) const
684  {
685  return (def.left >= left && def.top >= top && def.front >= front &&
686  def.right <= right && def.bottom <= bottom && def.back <= back);
687  }
688 
690  size_t getWidth() const { return right-left; }
692  size_t getHeight() const { return bottom-top; }
694  size_t getDepth() const { return back-front; }
695  };
696 
697 
698 
710  int _OgreExport findCommandLineOpts(int numargs, char** argv, UnaryOptionList& unaryOptList,
711  BinaryOptionList& binOptList);
712 
715  {
722  };
723 
726  {
728  unsigned int width;
729  unsigned int height;
732  };
733 
736 
739 
742  {
743  protected:
745  unsigned long long int mNext;
747  public:
749  : mPrefix(rhs.mPrefix), mNext(rhs.mNext) {}
750 
751  NameGenerator(const String& prefix) : mPrefix(prefix), mNext(1) {}
752 
755  {
757  std::ostringstream s;
758  s << mPrefix << mNext++;
759  return s.str();
760  }
761 
763  void reset()
764  {
766  mNext = 1ULL;
767  }
768 
770  void setNext(unsigned long long int val)
771  {
773  mNext = val;
774  }
775 
777  unsigned long long int getNext() const
778  {
779  // lock even on get because 64-bit may not be atomic read
781  return mNext;
782  }
783 
784 
785 
786 
787  };
788 
791  template <typename T>
792  class Pool
793  {
794  protected:
795  typedef typename list<T>::type ItemList;
798  public:
799  Pool() {}
800  virtual ~Pool() {}
801 
805  virtual std::pair<bool, T> removeItem()
806  {
808  std::pair<bool, T> ret;
809  if (mItems.empty())
810  {
811  ret.first = false;
812  }
813  else
814  {
815  ret.first = true;
816  ret.second = mItems.front();
817  mItems.pop_front();
818  }
819  return ret;
820  }
821 
824  virtual void addItem(const T& i)
825  {
827  mItems.push_front(i);
828  }
830  virtual void clear()
831  {
833  mItems.clear();
834  }
835 
836 
837 
838  };
841 }
842 
843 #endif
HashedVector(const HashedVector< T > &rhs)
Definition: OgreCommon.h:388
VectorImpl::const_reference const_reference
Definition: OgreCommon.h:332
iterator erase(iterator first, iterator last)
Definition: OgreCommon.h:470
TRect & operator=(TRect const &o)
Definition: OgreCommon.h:541
const_iterator end() const
Definition: OgreCommon.h:357
#define OGRE_AUTO_MUTEX
uint32 _OgreExport FastHash(const char *data, int len, uint32 hashSoFar=0)
Fast general hashing algorithm.
bool operator==(const HashedVector< T > &b)
Definition: OgreCommon.h:494
Pulse Width Modulation.
Definition: OgreCommon.h:176
ManualCullingMode
Manual culling modes based on vertex normals.
Definition: OgreCommon.h:151
iterator end()
Definition: OgreCommon.h:355
unsigned int uint32
Definition: OgrePlatform.h:246
#define _OgreExport
Definition: OgrePlatform.h:203
Stencil shadow technique which renders all shadow volumes as a modulation after all the non-transpare...
Definition: OgreCommon.h:217
HashedVector< Light * > LightList
Definition: OgreCommon.h:515
std::vector< T, A > type
Stencil shadow technique which renders each light as a separate additive pass to the scene...
Definition: OgreCommon.h:225
Utility class to generate a sequentially numbered series of names.
Definition: OgreCommon.h:741
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: OgreCommon.h:257
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:524
FogMode
Fog modes.
Definition: OgreCommon.h:122
T height() const
Definition: OgreCommon.h:553
A hashed vector.
Definition: OgreCommon.h:306
bool isHashDirty() const
Definition: OgreCommon.h:344
TrackVertexColourEnum
Definition: OgreCommon.h:278
WaveformType
Enumerates the wave types usable with the Ogre engine.
Definition: OgreCommon.h:162
size_t getHeight() const
Get the height of this box.
Definition: OgreCommon.h:692
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: OgreCommon.h:240
Mask for additive shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:197
size_t getWidth() const
Get the width of this box.
Definition: OgreCommon.h:690
Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_POINT.
Definition: OgreCommon.h:84
size_t back
Definition: OgreCommon.h:635
Texture-based shadow technique which involves a monochrome render-to-texture of the shadow caster and...
Definition: OgreCommon.h:230
void resize(size_type n, const T &t=T())
Definition: OgreCommon.h:483
The filter used when magnifying a texture.
Definition: OgreCommon.h:96
Similar to FO_LINEAR, but compensates for the angle of the texture plane.
Definition: OgreCommon.h:110
TRect(TRect const &o)
Definition: OgreCommon.h:537
Equal to: min=FO_POINT, mag=FO_POINT, mip=FO_NONE.
Definition: OgreCommon.h:82
VectorImpl::size_type size_type
Definition: OgreCommon.h:333
Render window creation parameters.
Definition: OgreCommon.h:725
NameGenerator(const String &prefix)
Definition: OgreCommon.h:751
FilterType
Definition: OgreCommon.h:91
An angular wave with a constant increase / decrease speed with pointed peaks.
Definition: OgreCommon.h:167
The filter used when determining the mipmap.
Definition: OgreCommon.h:98
HashedVector(size_type n)
Definition: OgreCommon.h:386
bool contains(const Box &def) const
Return true if the other box is a part of this one.
Definition: OgreCommon.h:683
TRect(T const &l, T const &t, T const &r, T const &b)
Definition: OgreCommon.h:533
Fog density increases linearly between the start and end distances.
Definition: OgreCommon.h:131
Hardware culls triangles whose vertices are listed anticlockwise in the view.
Definition: OgreCommon.h:143
Average of a 2x2 pixel area, denotes bilinear for MIN and MAG, trilinear for MIP. ...
Definition: OgreCommon.h:108
size_type size() const
Definition: OgreCommon.h:367
VectorImpl::reference reference
Definition: OgreCommon.h:331
T width() const
Definition: OgreCommon.h:549
reference at(size_type n)
Definition: OgreCommon.h:378
HashedVector(size_type n, const T &t)
Definition: OgreCommon.h:387
Box()
Parameterless constructor for setting the members manually.
Definition: OgreCommon.h:637
virtual void clear()
Clear the pool.
Definition: OgreCommon.h:830
void insert(iterator pos, InputIterator f, InputIterator l)
Definition: OgreCommon.h:451
iterator erase(iterator pos)
Definition: OgreCommon.h:464
const_reverse_iterator rend() const
Definition: OgreCommon.h:366
void swap(HashedVector< T > &rhs)
Definition: OgreCommon.h:434
VectorImpl::iterator iterator
Definition: OgreCommon.h:335
size_type max_size() const
Definition: OgreCommon.h:368
Equal to: min=FO_ANISOTROPIC, max=FO_ANISOTROPIC, mip=FO_LINEAR.
Definition: OgreCommon.h:88
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:136
iterator begin()
Definition: OgreCommon.h:349
TRect< Real > RealRect
Structure used to define a rectangle in a 2-D floating point space, subject to double / single floati...
Definition: OgreCommon.h:623
No fog. Duh.
Definition: OgreCommon.h:125
TRect< long > Rect
Structure used to define a rectangle in a 2-D integer space.
Definition: OgreCommon.h:627
reference operator[](size_type n)
Definition: OgreCommon.h:371
HashedVector(InputIterator a, InputIterator b)
Definition: OgreCommon.h:392
vector< RenderWindow * >::type RenderWindowList
Render window container.
Definition: OgreCommon.h:738
Box(size_t l, size_t t, size_t r, size_t b)
Define a box from left, top, right and bottom coordinates This box will have depth one (front=0 and b...
Definition: OgreCommon.h:650
size_t right
Definition: OgreCommon.h:635
Representation of a dynamic light source in the scene.
Definition: OgreLight.h:72
Structure used to define a box in a 3-D integer space.
Definition: OgreCommon.h:633
void setNull()
Definition: OgreCommon.h:561
VectorImpl::const_reverse_iterator const_reverse_iterator
Definition: OgreCommon.h:338
Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_LINEAR.
Definition: OgreCommon.h:86
Mask for integrated shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:203
No filtering, used for FILT_MIP to turn off mipmapping.
Definition: OgreCommon.h:104
ShadowTechnique
An enumeration of broad shadow techniques.
Definition: OgreCommon.h:191
map< String, String >::type BinaryOptionList
Definition: OgreCommon.h:521
Half of the time is spent at the min, half at the max with instant transition between.
Definition: OgreCommon.h:169
bool empty() const
Definition: OgreCommon.h:370
bool isNull() const
Definition: OgreCommon.h:557
Cull triangles whose normal is pointing away from the camera (default).
Definition: OgreCommon.h:156
reference back()
Definition: OgreCommon.h:415
map< String, bool >::type UnaryOptionList
Definition: OgreCommon.h:520
Mask for texture shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:209
const_reverse_iterator rbegin() const
Definition: OgreCommon.h:365
ShadeOptions
Light shading modes.
Definition: OgreCommon.h:114
Template class describing a simple pool of items.
Definition: OgreCommon.h:792
reference front()
Definition: OgreCommon.h:408
Solid polygons are rendered.
Definition: OgreCommon.h:187
Gradual steady decrease from max to min over the period, with an instant return to max at the end...
Definition: OgreCommon.h:173
Mask for stencil shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:206
virtual std::pair< bool, T > removeItem()
Get the next item from the pool.
Definition: OgreCommon.h:805
VectorImpl::difference_type difference_type
Definition: OgreCommon.h:334
void push_back(const T &t)
Definition: OgreCommon.h:422
reverse_iterator rend()
Definition: OgreCommon.h:364
uint32 getHash() const
Get the hash value.
Definition: OgreCommon.h:502
void insert(iterator pos, size_type n, const T &x)
Definition: OgreCommon.h:458
SortMode
Sort mode for billboard-set and particle-system.
Definition: OgreCommon.h:287
Sort by direction of the camera.
Definition: OgreCommon.h:290
#define OGRE_LOCK_AUTO_MUTEX
std::vector< T, STLAllocator< T, GeneralAllocPolicy > > VectorImpl
Definition: OgreCommon.h:309
const_iterator begin() const
Definition: OgreCommon.h:356
Sort by distance from the camera.
Definition: OgreCommon.h:292
Only points are rendered.
Definition: OgreCommon.h:183
FrameBufferType
Defines the frame buffer types.
Definition: OgreCommon.h:296
Box(size_t l, size_t t, size_t ff, size_t r, size_t b, size_t bb)
Define a box from left, top, front, right, bottom and back coordinates.
Definition: OgreCommon.h:671
Standard sine wave which smoothly changes from low to high and back again.
Definition: OgreCommon.h:165
const_reference operator[](size_type n) const
Definition: OgreCommon.h:377
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: OgreCommon.h:273
void reserve(size_t t)
Definition: OgreCommon.h:407
Mask for modulative shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:200
unsigned long long int getNext() const
Get the internal counter.
Definition: OgreCommon.h:777
Gradual steady increase from min to max over the period with an instant return to min at the end...
Definition: OgreCommon.h:171
iterator insert(iterator pos, const T &t)
Definition: OgreCommon.h:439
NameValuePairList miscParams
Definition: OgreCommon.h:731
VectorImpl::reverse_iterator reverse_iterator
Definition: OgreCommon.h:337
uint32 HashCombine(uint32 hashSoFar, const T &data)
Combine hashes with same style as boost::hash_combine.
Definition: OgreCommon.h:57
HashedVector< T > & operator=(const HashedVector< T > &rhs)
Definition: OgreCommon.h:399
VectorImpl::const_iterator const_iterator
Definition: OgreCommon.h:336
Fog density increases exponentially from the camera (fog = 1/e^(distance * density)) ...
Definition: OgreCommon.h:127
Hardware culls triangles whose vertices are listed clockwise in the view (default).
Definition: OgreCommon.h:141
const_reference back() const
Definition: OgreCommon.h:421
The filter used when shrinking a texture.
Definition: OgreCommon.h:94
unsigned long long int mNext
Definition: OgreCommon.h:745
list< T >::type ItemList
Definition: OgreCommon.h:795
size_t getDepth() const
Get the depth of this box.
Definition: OgreCommon.h:694
Use the closest pixel.
Definition: OgreCommon.h:106
ItemList mItems
Definition: OgreCommon.h:796
No culling so everything is sent to the hardware.
Definition: OgreCommon.h:154
const_reference front() const
Definition: OgreCommon.h:414
size_type capacity() const
Definition: OgreCommon.h:369
VectorImpl::pointer pointer
Definition: OgreCommon.h:330
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:180
size_t front
Definition: OgreCommon.h:635
size_t left
Definition: OgreCommon.h:635
size_t top
Definition: OgreCommon.h:635
TRect intersect(const TRect &rhs) const
Definition: OgreCommon.h:582
void recalcHash() const
Definition: OgreCommon.h:319
Fog density increases at the square of FOG_EXP, i.e. even quicker (fog = 1/e^(distance * density)^2) ...
Definition: OgreCommon.h:129
TRect & merge(const TRect &rhs)
Definition: OgreCommon.h:565
reverse_iterator rbegin()
Definition: OgreCommon.h:358
ClipResult
Generic result of clipping.
Definition: OgreCommon.h:714
_StringBase String
Wireframe models are rendered.
Definition: OgreCommon.h:185
vector< RenderWindowDescription >::type RenderWindowDescriptionList
Render window creation parameters container.
Definition: OgreCommon.h:735
void reset()
Reset the internal counter.
Definition: OgreCommon.h:763
TRect< float > FloatRect
Structure used to define a rectangle in a 2-D floating point space.
Definition: OgreCommon.h:618
const_reference at(size_type n) const
Definition: OgreCommon.h:384
FilterOptions
Filtering options for textures / mipmaps.
Definition: OgreCommon.h:101
Hardware never culls triangles and renders everything it receives.
Definition: OgreCommon.h:139
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
Definition: OgreCommon.h:527
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:65
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Definition: OgreCommon.h:277
Cull triangles whose normal is pointing towards the camera.
Definition: OgreCommon.h:158
int _OgreExport findCommandLineOpts(int numargs, char **argv, UnaryOptionList &unaryOptList, BinaryOptionList &binOptList)
Locate command-line options of the unary form '-blah' and of the binary form '-blah foo'...
VectorImpl mList
Definition: OgreCommon.h:311
Partially clipped.
Definition: OgreCommon.h:719
NameGenerator(const NameGenerator &rhs)
Definition: OgreCommon.h:748
virtual void addItem(const T &i)
Add a new item to the pool.
Definition: OgreCommon.h:824
void addToHash(const T &newPtr) const
Definition: OgreCommon.h:315
virtual ~Pool()
Definition: OgreCommon.h:800
VectorImpl::value_type value_type
Definition: OgreCommon.h:329
Everything was clipped away.
Definition: OgreCommon.h:721
String generate()
Generate a new name.
Definition: OgreCommon.h:754
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
Definition: OgreCommon.h:79
void setNext(unsigned long long int val)
Manually set the internal counter (use caution)
Definition: OgreCommon.h:770
size_t bottom
Definition: OgreCommon.h:635
Nothing was clipped.
Definition: OgreCommon.h:717