OGRE  1.8
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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-2013 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 #include "OgreHeaderPrefix.h"
46 
47 namespace Ogre {
55  uint32 _OgreExport FastHash (const char * data, int len, uint32 hashSoFar = 0);
58  template <typename T>
59  uint32 HashCombine (uint32 hashSoFar, const T& data)
60  {
61  return FastHash((const char*)&data, sizeof(T), hashSoFar);
62  }
63 
64 
68  {
77  };
78 
82  {
91  };
92 
94  {
101  };
104  {
113  };
114 
117  {
121  };
122 
124  enum FogMode
125  {
134  };
135 
139  {
146  };
147 
154  {
161  };
162 
165  {
179  };
180 
183  {
190  };
191 
194  {
212 
233 
243 
276  };
277 
281  TVC_NONE = 0x0,
282  TVC_AMBIENT = 0x1,
283  TVC_DIFFUSE = 0x2,
286  };
287 
289  enum SortMode
290  {
295  };
296 
299  FBT_COLOUR = 0x1,
300  FBT_DEPTH = 0x2,
302  };
303 
306  {
310  IM_USE16BIT = 0x0001,
311 
314  IM_VTFBESTFIT = 0x0002,
315 
319 
321 
323  IM_USEONEWEIGHT = 0x0010,
324 
327 
329  };
330 
331 
334  template <typename T>
336  {
337  public:
338  typedef std::vector<T, STLAllocator<T, GeneralAllocPolicy> > VectorImpl;
339  protected:
341  mutable uint32 mListHash;
342  mutable bool mListHashDirty;
343 
344  void addToHash(const T& newPtr) const
345  {
346  mListHash = FastHash((const char*)&newPtr, sizeof(T), mListHash);
347  }
348  void recalcHash() const
349  {
350  mListHash = 0;
351  for (const_iterator i = mList.begin(); i != mList.end(); ++i)
352  addToHash(*i);
353  mListHashDirty = false;
354 
355  }
356 
357  public:
358  typedef typename VectorImpl::value_type value_type;
359  typedef typename VectorImpl::pointer pointer;
360  typedef typename VectorImpl::reference reference;
361  typedef typename VectorImpl::const_reference const_reference;
362  typedef typename VectorImpl::size_type size_type;
363  typedef typename VectorImpl::difference_type difference_type;
364  typedef typename VectorImpl::iterator iterator;
365  typedef typename VectorImpl::const_iterator const_iterator;
366  typedef typename VectorImpl::reverse_iterator reverse_iterator;
367  typedef typename VectorImpl::const_reverse_iterator const_reverse_iterator;
368 
369  void dirtyHash()
370  {
371  mListHashDirty = true;
372  }
373  bool isHashDirty() const
374  {
375  return mListHashDirty;
376  }
377 
379  {
380  // we have to assume that hash needs recalculating on non-const
381  dirtyHash();
382  return mList.begin();
383  }
384  iterator end() { return mList.end(); }
385  const_iterator begin() const { return mList.begin(); }
386  const_iterator end() const { return mList.end(); }
388  {
389  // we have to assume that hash needs recalculating on non-const
390  dirtyHash();
391  return mList.rbegin();
392  }
393  reverse_iterator rend() { return mList.rend(); }
394  const_reverse_iterator rbegin() const { return mList.rbegin(); }
395  const_reverse_iterator rend() const { return mList.rend(); }
396  size_type size() const { return mList.size(); }
397  size_type max_size() const { return mList.max_size(); }
398  size_type capacity() const { return mList.capacity(); }
399  bool empty() const { return mList.empty(); }
401  {
402  // we have to assume that hash needs recalculating on non-const
403  dirtyHash();
404  return mList[n];
405  }
406  const_reference operator[](size_type n) const { return mList[n]; }
408  {
409  // we have to assume that hash needs recalculating on non-const
410  dirtyHash();
411  return mList.const_iterator(n);
412  }
413  const_reference at(size_type n) const { return mList.at(n); }
416  HashedVector(size_type n, const T& t) : mList(n, t), mListHash(0), mListHashDirty(n > 0) {}
419 
420  template <class InputIterator>
421  HashedVector(InputIterator a, InputIterator b)
422  : mList(a, b), mListHashDirty(false)
423  {
424  dirtyHash();
425  }
426 
429  {
430  mList = rhs.mList;
431  mListHash = rhs.mListHash;
433  return *this;
434  }
435 
436  void reserve(size_t t) { mList.reserve(t); }
438  {
439  // we have to assume that hash needs recalculating on non-const
440  dirtyHash();
441  return mList.front();
442  }
443  const_reference front() const { return mList.front(); }
445  {
446  // we have to assume that hash needs recalculating on non-const
447  dirtyHash();
448  return mList.back();
449  }
450  const_reference back() const { return mList.back(); }
451  void push_back(const T& t)
452  {
453  mList.push_back(t);
454  // Quick progressive hash add
455  if (!isHashDirty())
456  addToHash(t);
457  }
458  void pop_back()
459  {
460  mList.pop_back();
461  dirtyHash();
462  }
464  {
465  mList.swap(rhs.mList);
466  dirtyHash();
467  }
468  iterator insert(iterator pos, const T& t)
469  {
470  bool recalc = (pos != end());
471  iterator ret = mList.insert(pos, t);
472  if (recalc)
473  dirtyHash();
474  else
475  addToHash(t);
476  return ret;
477  }
478 
479  template <class InputIterator>
480  void insert(iterator pos,
481  InputIterator f, InputIterator l)
482  {
483  mList.insert(pos, f, l);
484  dirtyHash();
485  }
486 
487  void insert(iterator pos, size_type n, const T& x)
488  {
489  mList.insert(pos, n, x);
490  dirtyHash();
491  }
492 
494  {
495  iterator ret = mList.erase(pos);
496  dirtyHash();
497  return ret;
498  }
500  {
501  iterator ret = mList.erase(first, last);
502  dirtyHash();
503  return ret;
504  }
505  void clear()
506  {
507  mList.clear();
508  mListHash = 0;
509  mListHashDirty = false;
510  }
511 
512  void resize(size_type n, const T& t = T())
513  {
514  bool recalc = false;
515  if (n != size())
516  recalc = true;
517 
518  mList.resize(n, t);
519  if (recalc)
520  dirtyHash();
521  }
522 
524  { return mListHash == b.mListHash; }
525 
526  bool operator<(const HashedVector<T>& b)
527  { return mListHash < b.mListHash; }
528 
529 
531  uint32 getHash() const
532  {
533  if (isHashDirty())
534  recalcHash();
535 
536  return mListHash;
537  }
538  public:
539 
540 
541 
542  };
543 
544  class Light;
546 
547 
548 
551 
554 
557 
558  template< typename T > struct TRect
559  {
561  TRect() : left(0), top(0), right(0), bottom(0) {}
562  TRect( T const & l, T const & t, T const & r, T const & b )
563  : left( l ), top( t ), right( r ), bottom( b )
564  {
565  }
566  TRect( TRect const & o )
567  : left( o.left ), top( o.top ), right( o.right ), bottom( o.bottom )
568  {
569  }
570  TRect & operator=( TRect const & o )
571  {
572  left = o.left;
573  top = o.top;
574  right = o.right;
575  bottom = o.bottom;
576  return *this;
577  }
578  T width() const
579  {
580  return right - left;
581  }
582  T height() const
583  {
584  return bottom - top;
585  }
586  bool isNull() const
587  {
588  return width() == 0 || height() == 0;
589  }
590  void setNull()
591  {
592  left = right = top = bottom = 0;
593  }
594  TRect & merge(const TRect& rhs)
595  {
596  if (isNull())
597  {
598  *this = rhs;
599  }
600  else if (!rhs.isNull())
601  {
602  left = std::min(left, rhs.left);
603  right = std::max(right, rhs.right);
604  top = std::min(top, rhs.top);
605  bottom = std::max(bottom, rhs.bottom);
606  }
607 
608  return *this;
609 
610  }
611  TRect intersect(const TRect& rhs) const
612  {
613  TRect ret;
614  if (isNull() || rhs.isNull())
615  {
616  // empty
617  return ret;
618  }
619  else
620  {
621  ret.left = std::max(left, rhs.left);
622  ret.right = std::min(right, rhs.right);
623  ret.top = std::max(top, rhs.top);
624  ret.bottom = std::min(bottom, rhs.bottom);
625  }
626 
627  if (ret.left > ret.right || ret.top > ret.bottom)
628  {
629  // no intersection, return empty
630  ret.left = ret.top = ret.right = ret.bottom = 0;
631  }
632 
633  return ret;
634 
635  }
636 
637  };
638  template<typename T>
639  std::ostream& operator<<(std::ostream& o, const TRect<T>& r)
640  {
641  o << "TRect<>(l:" << r.left << ", t:" << r.top << ", r:" << r.right << ", b:" << r.bottom << ")";
642  return o;
643  }
644 
648 
653 
657 
662  struct Box
663  {
664  size_t left, top, right, bottom, front, back;
666  Box()
667  : left(0), top(0), right(1), bottom(1), front(0), back(1)
668  {
669  }
679  Box( size_t l, size_t t, size_t r, size_t b ):
680  left(l),
681  top(t),
682  right(r),
683  bottom(b),
684  front(0),
685  back(1)
686  {
687  assert(right >= left && bottom >= top && back >= front);
688  }
700  Box( size_t l, size_t t, size_t ff, size_t r, size_t b, size_t bb ):
701  left(l),
702  top(t),
703  right(r),
704  bottom(b),
705  front(ff),
706  back(bb)
707  {
708  assert(right >= left && bottom >= top && back >= front);
709  }
710 
712  bool contains(const Box &def) const
713  {
714  return (def.left >= left && def.top >= top && def.front >= front &&
715  def.right <= right && def.bottom <= bottom && def.back <= back);
716  }
717 
719  size_t getWidth() const { return right-left; }
721  size_t getHeight() const { return bottom-top; }
723  size_t getDepth() const { return back-front; }
724  };
725 
726 
727 
739  int _OgreExport findCommandLineOpts(int numargs, char** argv, UnaryOptionList& unaryOptList,
740  BinaryOptionList& binOptList);
741 
744  {
751  };
752 
755  {
757  unsigned int width;
758  unsigned int height;
761  };
762 
765 
768 
771  {
772  protected:
774  unsigned long long int mNext;
776  public:
778  : mPrefix(rhs.mPrefix), mNext(rhs.mNext) {}
779 
780  NameGenerator(const String& prefix) : mPrefix(prefix), mNext(1) {}
781 
784  {
786  std::ostringstream s;
787  s << mPrefix << mNext++;
788  return s.str();
789  }
790 
792  void reset()
793  {
795  mNext = 1ULL;
796  }
797 
799  void setNext(unsigned long long int val)
800  {
802  mNext = val;
803  }
804 
806  unsigned long long int getNext() const
807  {
808  // lock even on get because 64-bit may not be atomic read
810  return mNext;
811  }
812 
813 
814 
815 
816  };
817 
820  template <typename T>
821  class Pool
822  {
823  protected:
824  typedef typename list<T>::type ItemList;
827  public:
828  Pool() {}
829  virtual ~Pool() {}
830 
834  virtual std::pair<bool, T> removeItem()
835  {
837  std::pair<bool, T> ret;
838  if (mItems.empty())
839  {
840  ret.first = false;
841  }
842  else
843  {
844  ret.first = true;
845  ret.second = mItems.front();
846  mItems.pop_front();
847  }
848  return ret;
849  }
850 
853  virtual void addItem(const T& i)
854  {
856  mItems.push_front(i);
857  }
859  virtual void clear()
860  {
862  mItems.clear();
863  }
864 
865 
866 
867  };
870 }
871 
872 #include "OgreHeaderSuffix.h"
873 
874 #endif
HashedVector(const HashedVector< T > &rhs)
Definition: OgreCommon.h:417
VectorImpl::const_reference const_reference
Definition: OgreCommon.h:361
iterator erase(iterator first, iterator last)
Definition: OgreCommon.h:499
TRect & operator=(TRect const &o)
Definition: OgreCommon.h:570
const_iterator end() const
Definition: OgreCommon.h:386
#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:523
Pulse Width Modulation.
Definition: OgreCommon.h:178
ManualCullingMode
Manual culling modes based on vertex normals.
Definition: OgreCommon.h:153
iterator end()
Definition: OgreCommon.h:384
unsigned int uint32
Definition: OgrePlatform.h:270
#define _OgreExport
Definition: OgrePlatform.h:233
Stencil shadow technique which renders all shadow volumes as a modulation after all the non-transpare...
Definition: OgreCommon.h:219
HashedVector< Light * > LightList
Definition: OgreCommon.h:544
std::vector< T, A > type
Stencil shadow technique which renders each light as a separate additive pass to the scene...
Definition: OgreCommon.h:227
Utility class to generate a sequentially numbered series of names.
Definition: OgreCommon.h:770
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: OgreCommon.h:259
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:553
FogMode
Fog modes.
Definition: OgreCommon.h:124
T height() const
Definition: OgreCommon.h:582
A hashed vector.
Definition: OgreCommon.h:335
bool isHashDirty() const
Definition: OgreCommon.h:373
TrackVertexColourEnum
Definition: OgreCommon.h:280
WaveformType
Enumerates the wave types usable with the Ogre engine.
Definition: OgreCommon.h:164
size_t getHeight() const
Get the height of this box.
Definition: OgreCommon.h:721
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: OgreCommon.h:242
Mask for additive shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:199
size_t getWidth() const
Get the width of this box.
Definition: OgreCommon.h:719
Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_POINT.
Definition: OgreCommon.h:86
size_t back
Definition: OgreCommon.h:664
Texture-based shadow technique which involves a monochrome render-to-texture of the shadow caster and...
Definition: OgreCommon.h:232
void resize(size_type n, const T &t=T())
Definition: OgreCommon.h:512
The filter used when magnifying a texture.
Definition: OgreCommon.h:98
Similar to FO_LINEAR, but compensates for the angle of the texture plane.
Definition: OgreCommon.h:112
TRect(TRect const &o)
Definition: OgreCommon.h:566
Equal to: min=FO_POINT, mag=FO_POINT, mip=FO_NONE.
Definition: OgreCommon.h:84
VectorImpl::size_type size_type
Definition: OgreCommon.h:362
Render window creation parameters.
Definition: OgreCommon.h:754
NameGenerator(const String &prefix)
Definition: OgreCommon.h:780
FilterType
Definition: OgreCommon.h:93
An angular wave with a constant increase / decrease speed with pointed peaks.
Definition: OgreCommon.h:169
The filter used when determining the mipmap.
Definition: OgreCommon.h:100
HashedVector(size_type n)
Definition: OgreCommon.h:415
bool contains(const Box &def) const
Return true if the other box is a part of this one.
Definition: OgreCommon.h:712
TRect(T const &l, T const &t, T const &r, T const &b)
Definition: OgreCommon.h:562
Fog density increases linearly between the start and end distances.
Definition: OgreCommon.h:133
Hardware culls triangles whose vertices are listed anticlockwise in the view.
Definition: OgreCommon.h:145
Average of a 2x2 pixel area, denotes bilinear for MIN and MAG, trilinear for MIP. ...
Definition: OgreCommon.h:110
size_type size() const
Definition: OgreCommon.h:396
VectorImpl::reference reference
Definition: OgreCommon.h:360
T width() const
Definition: OgreCommon.h:578
reference at(size_type n)
Definition: OgreCommon.h:407
HashedVector(size_type n, const T &t)
Definition: OgreCommon.h:416
Box()
Parameterless constructor for setting the members manually.
Definition: OgreCommon.h:666
virtual void clear()
Clear the pool.
Definition: OgreCommon.h:859
void insert(iterator pos, InputIterator f, InputIterator l)
Definition: OgreCommon.h:480
iterator erase(iterator pos)
Definition: OgreCommon.h:493
const_reverse_iterator rend() const
Definition: OgreCommon.h:395
void swap(HashedVector< T > &rhs)
Definition: OgreCommon.h:463
VectorImpl::iterator iterator
Definition: OgreCommon.h:364
size_type max_size() const
Definition: OgreCommon.h:397
Equal to: min=FO_ANISOTROPIC, max=FO_ANISOTROPIC, mip=FO_LINEAR.
Definition: OgreCommon.h:90
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:138
iterator begin()
Definition: OgreCommon.h:378
TRect< Real > RealRect
Structure used to define a rectangle in a 2-D floating point space, subject to double / single floati...
Definition: OgreCommon.h:652
No fog. Duh.
Definition: OgreCommon.h:127
TRect< long > Rect
Structure used to define a rectangle in a 2-D integer space.
Definition: OgreCommon.h:656
reference operator[](size_type n)
Definition: OgreCommon.h:400
HashedVector(InputIterator a, InputIterator b)
Definition: OgreCommon.h:421
Use one weight per vertex when recommended (i.e.
Definition: OgreCommon.h:323
vector< RenderWindow * >::type RenderWindowList
Render window container.
Definition: OgreCommon.h:767
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:679
size_t right
Definition: OgreCommon.h:664
Representation of a dynamic light source in the scene.
Definition: OgreLight.h:73
Structure used to define a box in a 3-D integer space.
Definition: OgreCommon.h:662
void setNull()
Definition: OgreCommon.h:590
VectorImpl::const_reverse_iterator const_reverse_iterator
Definition: OgreCommon.h:367
Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_LINEAR.
Definition: OgreCommon.h:88
Mask for integrated shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:205
No filtering, used for FILT_MIP to turn off mipmapping.
Definition: OgreCommon.h:106
ShadowTechnique
An enumeration of broad shadow techniques.
Definition: OgreCommon.h:193
map< String, String >::type BinaryOptionList
Definition: OgreCommon.h:550
Half of the time is spent at the min, half at the max with instant transition between.
Definition: OgreCommon.h:171
bool empty() const
Definition: OgreCommon.h:399
bool isNull() const
Definition: OgreCommon.h:586
Cull triangles whose normal is pointing away from the camera (default).
Definition: OgreCommon.h:158
reference back()
Definition: OgreCommon.h:444
map< String, bool >::type UnaryOptionList
Definition: OgreCommon.h:549
Mask for texture shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:211
const_reverse_iterator rbegin() const
Definition: OgreCommon.h:394
ShadeOptions
Light shading modes.
Definition: OgreCommon.h:116
Template class describing a simple pool of items.
Definition: OgreCommon.h:821
reference front()
Definition: OgreCommon.h:437
Solid polygons are rendered.
Definition: OgreCommon.h:189
Gradual steady decrease from max to min over the period, with an instant return to max at the end...
Definition: OgreCommon.h:175
Mask for stencil shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:208
virtual std::pair< bool, T > removeItem()
Get the next item from the pool.
Definition: OgreCommon.h:834
VectorImpl::difference_type difference_type
Definition: OgreCommon.h:363
void push_back(const T &t)
Definition: OgreCommon.h:451
reverse_iterator rend()
Definition: OgreCommon.h:393
uint32 getHash() const
Get the hash value.
Definition: OgreCommon.h:531
void insert(iterator pos, size_type n, const T &x)
Definition: OgreCommon.h:487
SortMode
Sort mode for billboard-set and particle-system.
Definition: OgreCommon.h:289
Sort by direction of the camera.
Definition: OgreCommon.h:292
#define OGRE_LOCK_AUTO_MUTEX
std::vector< T, STLAllocator< T, GeneralAllocPolicy > > VectorImpl
Definition: OgreCommon.h:338
const_iterator begin() const
Definition: OgreCommon.h:385
Sort by distance from the camera.
Definition: OgreCommon.h:294
Only points are rendered.
Definition: OgreCommon.h:185
FrameBufferType
Defines the frame buffer types.
Definition: OgreCommon.h:298
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:700
Standard sine wave which smoothly changes from low to high and back again.
Definition: OgreCommon.h:167
const_reference operator[](size_type n) const
Definition: OgreCommon.h:406
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: OgreCommon.h:275
void reserve(size_t t)
Definition: OgreCommon.h:436
Mask for modulative shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:202
Forces an amount of instances per batch low enough so that vertices * numInst < 65535 since usually i...
Definition: OgreCommon.h:310
unsigned long long int getNext() const
Get the internal counter.
Definition: OgreCommon.h:806
Gradual steady increase from min to max over the period with an instant return to min at the end...
Definition: OgreCommon.h:173
iterator insert(iterator pos, const T &t)
Definition: OgreCommon.h:468
NameValuePairList miscParams
Definition: OgreCommon.h:760
VectorImpl::reverse_iterator reverse_iterator
Definition: OgreCommon.h:366
uint32 HashCombine(uint32 hashSoFar, const T &data)
Combine hashes with same style as boost::hash_combine.
Definition: OgreCommon.h:59
HashedVector< T > & operator=(const HashedVector< T > &rhs)
Definition: OgreCommon.h:428
InstanceManagerFlags
Flags for the Instance Manager when calculating ideal number of instances per batch.
Definition: OgreCommon.h:305
std::map< K, V, P, A > type
Use a limited number of skeleton animations shared among all instances.
Definition: OgreCommon.h:318
VectorImpl::const_iterator const_iterator
Definition: OgreCommon.h:365
Fog density increases exponentially from the camera (fog = 1/e^(distance * density)) ...
Definition: OgreCommon.h:129
Hardware culls triangles whose vertices are listed clockwise in the view (default).
Definition: OgreCommon.h:143
const_reference back() const
Definition: OgreCommon.h:450
The filter used when shrinking a texture.
Definition: OgreCommon.h:96
unsigned long long int mNext
Definition: OgreCommon.h:774
list< T >::type ItemList
Definition: OgreCommon.h:824
size_t getDepth() const
Get the depth of this box.
Definition: OgreCommon.h:723
Use the closest pixel.
Definition: OgreCommon.h:108
ItemList mItems
Definition: OgreCommon.h:825
No culling so everything is sent to the hardware.
Definition: OgreCommon.h:156
All techniques are forced to one weight per vertex.
Definition: OgreCommon.h:326
const_reference front() const
Definition: OgreCommon.h:443
size_type capacity() const
Definition: OgreCommon.h:398
VectorImpl::pointer pointer
Definition: OgreCommon.h:359
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:182
size_t front
Definition: OgreCommon.h:664
size_t left
Definition: OgreCommon.h:664
size_t top
Definition: OgreCommon.h:664
TRect intersect(const TRect &rhs) const
Definition: OgreCommon.h:611
void recalcHash() const
Definition: OgreCommon.h:348
Fog density increases at the square of FOG_EXP, i.e. even quicker (fog = 1/e^(distance * density)^2) ...
Definition: OgreCommon.h:131
TRect & merge(const TRect &rhs)
Definition: OgreCommon.h:594
reverse_iterator rbegin()
Definition: OgreCommon.h:387
ClipResult
Generic result of clipping.
Definition: OgreCommon.h:743
_StringBase String
Wireframe models are rendered.
Definition: OgreCommon.h:187
vector< RenderWindowDescription >::type RenderWindowDescriptionList
Render window creation parameters container.
Definition: OgreCommon.h:764
void reset()
Reset the internal counter.
Definition: OgreCommon.h:792
TRect< float > FloatRect
Structure used to define a rectangle in a 2-D floating point space.
Definition: OgreCommon.h:647
const_reference at(size_type n) const
Definition: OgreCommon.h:413
FilterOptions
Filtering options for textures / mipmaps.
Definition: OgreCommon.h:103
Hardware never culls triangles and renders everything it receives.
Definition: OgreCommon.h:141
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
Definition: OgreCommon.h:556
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:67
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Definition: OgreCommon.h:279
Cull triangles whose normal is pointing towards the camera.
Definition: OgreCommon.h:160
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:340
Partially clipped.
Definition: OgreCommon.h:748
NameGenerator(const NameGenerator &rhs)
Definition: OgreCommon.h:777
virtual void addItem(const T &i)
Add a new item to the pool.
Definition: OgreCommon.h:853
void addToHash(const T &newPtr) const
Definition: OgreCommon.h:344
virtual ~Pool()
Definition: OgreCommon.h:829
VectorImpl::value_type value_type
Definition: OgreCommon.h:358
Everything was clipped away.
Definition: OgreCommon.h:750
String generate()
Generate a new name.
Definition: OgreCommon.h:783
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
Definition: OgreCommon.h:81
void setNext(unsigned long long int val)
Manually set the internal counter (use caution)
Definition: OgreCommon.h:799
size_t bottom
Definition: OgreCommon.h:664
Nothing was clipped.
Definition: OgreCommon.h:746