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 #if defined ( OGRE_GCC_VISIBILITY )
39 # pragma GCC visibility pop
40 #endif
41 
42 #include "OgreHeaderPrefix.h"
43 
44 namespace Ogre {
52  uint32 _OgreExport FastHash (const char * data, int len, uint32 hashSoFar = 0);
55  template <typename T>
56  uint32 HashCombine (uint32 hashSoFar, const T& data)
57  {
58  return FastHash((const char*)&data, sizeof(T), hashSoFar);
59  }
60 
61 
65  {
74  };
75 
79  {
88  };
89 
91  {
97  FT_MIP
98  };
101  {
110  };
111 
114  {
117  SO_PHONG
118  };
119 
121  enum FogMode
122  {
130  FOG_LINEAR
131  };
132 
136  {
143  };
144 
151  {
158  };
159 
162  {
175  WFT_PWM
176  };
177 
180  {
186  PM_SOLID = 3
187  };
188 
191  {
209 
230 
240 
273  };
274 
278  TVC_NONE = 0x0,
279  TVC_AMBIENT = 0x1,
280  TVC_DIFFUSE = 0x2,
282  TVC_EMISSIVE = 0x8
283  };
284 
286  enum SortMode
287  {
292  };
293 
296  FBT_COLOUR = 0x1,
297  FBT_DEPTH = 0x2,
298  FBT_STENCIL = 0x4
299  };
300 
303  {
307  IM_USE16BIT = 0x0001,
308 
311  IM_VTFBESTFIT = 0x0002,
312 
316 
318 
320  IM_USEONEWEIGHT = 0x0010,
321 
324 
326  };
327 
328 
331  template <typename T>
333  {
334  public:
335  typedef std::vector<T, STLAllocator<T, GeneralAllocPolicy> > VectorImpl;
336  protected:
338  mutable uint32 mListHash;
339  mutable bool mListHashDirty;
340 
341  void addToHash(const T& newPtr) const
342  {
343  mListHash = FastHash((const char*)&newPtr, sizeof(T), mListHash);
344  }
345  void recalcHash() const
346  {
347  mListHash = 0;
348  for (const_iterator i = mList.begin(); i != mList.end(); ++i)
349  addToHash(*i);
350  mListHashDirty = false;
351 
352  }
353 
354  public:
355  typedef typename VectorImpl::value_type value_type;
356  typedef typename VectorImpl::pointer pointer;
357  typedef typename VectorImpl::reference reference;
358  typedef typename VectorImpl::const_reference const_reference;
359  typedef typename VectorImpl::size_type size_type;
360  typedef typename VectorImpl::difference_type difference_type;
361  typedef typename VectorImpl::iterator iterator;
362  typedef typename VectorImpl::const_iterator const_iterator;
363  typedef typename VectorImpl::reverse_iterator reverse_iterator;
364  typedef typename VectorImpl::const_reverse_iterator const_reverse_iterator;
365 
366  void dirtyHash()
367  {
368  mListHashDirty = true;
369  }
370  bool isHashDirty() const
371  {
372  return mListHashDirty;
373  }
374 
376  {
377  // we have to assume that hash needs recalculating on non-const
378  dirtyHash();
379  return mList.begin();
380  }
381  iterator end() { return mList.end(); }
382  const_iterator begin() const { return mList.begin(); }
383  const_iterator end() const { return mList.end(); }
385  {
386  // we have to assume that hash needs recalculating on non-const
387  dirtyHash();
388  return mList.rbegin();
389  }
390  reverse_iterator rend() { return mList.rend(); }
391  const_reverse_iterator rbegin() const { return mList.rbegin(); }
392  const_reverse_iterator rend() const { return mList.rend(); }
393  size_type size() const { return mList.size(); }
394  size_type max_size() const { return mList.max_size(); }
395  size_type capacity() const { return mList.capacity(); }
396  bool empty() const { return mList.empty(); }
398  {
399  // we have to assume that hash needs recalculating on non-const
400  dirtyHash();
401  return mList[n];
402  }
403  const_reference operator[](size_type n) const { return mList[n]; }
405  {
406  // we have to assume that hash needs recalculating on non-const
407  dirtyHash();
408  return mList.const_iterator(n);
409  }
410  const_reference at(size_type n) const { return mList.at(n); }
413  HashedVector(size_type n, const T& t) : mList(n, t), mListHash(0), mListHashDirty(n > 0) {}
416 
417  template <class InputIterator>
418  HashedVector(InputIterator a, InputIterator b)
419  : mList(a, b), mListHashDirty(false)
420  {
421  dirtyHash();
422  }
423 
426  {
427  mList = rhs.mList;
428  mListHash = rhs.mListHash;
430  return *this;
431  }
432 
433  void reserve(size_t t) { mList.reserve(t); }
435  {
436  // we have to assume that hash needs recalculating on non-const
437  dirtyHash();
438  return mList.front();
439  }
440  const_reference front() const { return mList.front(); }
442  {
443  // we have to assume that hash needs recalculating on non-const
444  dirtyHash();
445  return mList.back();
446  }
447  const_reference back() const { return mList.back(); }
448  void push_back(const T& t)
449  {
450  mList.push_back(t);
451  // Quick progressive hash add
452  if (!isHashDirty())
453  addToHash(t);
454  }
455  void pop_back()
456  {
457  mList.pop_back();
458  dirtyHash();
459  }
461  {
462  mList.swap(rhs.mList);
463  dirtyHash();
464  }
465  iterator insert(iterator pos, const T& t)
466  {
467  bool recalc = (pos != end());
468  iterator ret = mList.insert(pos, t);
469  if (recalc)
470  dirtyHash();
471  else
472  addToHash(t);
473  return ret;
474  }
475 
476  template <class InputIterator>
477  void insert(iterator pos,
478  InputIterator f, InputIterator l)
479  {
480  mList.insert(pos, f, l);
481  dirtyHash();
482  }
483 
484  void insert(iterator pos, size_type n, const T& x)
485  {
486  mList.insert(pos, n, x);
487  dirtyHash();
488  }
489 
491  {
492  iterator ret = mList.erase(pos);
493  dirtyHash();
494  return ret;
495  }
497  {
498  iterator ret = mList.erase(first, last);
499  dirtyHash();
500  return ret;
501  }
502  void clear()
503  {
504  mList.clear();
505  mListHash = 0;
506  mListHashDirty = false;
507  }
508 
509  void resize(size_type n, const T& t = T())
510  {
511  bool recalc = false;
512  if (n != size())
513  recalc = true;
514 
515  mList.resize(n, t);
516  if (recalc)
517  dirtyHash();
518  }
519 
521  { return mListHash == b.mListHash; }
522 
523  bool operator<(const HashedVector<T>& b)
524  { return mListHash < b.mListHash; }
525 
526 
528  uint32 getHash() const
529  {
530  if (isHashDirty())
531  recalcHash();
532 
533  return mListHash;
534  }
535  public:
536 
537 
538 
539  };
540 
541  class Light;
543 
544 
545 
548 
551 
554 
555  template< typename T > struct TRect
556  {
558  TRect() : left(0), top(0), right(0), bottom(0) {}
559  TRect( T const & l, T const & t, T const & r, T const & b )
560  : left( l ), top( t ), right( r ), bottom( b )
561  {
562  }
563  TRect( TRect const & o )
564  : left( o.left ), top( o.top ), right( o.right ), bottom( o.bottom )
565  {
566  }
567  TRect & operator=( TRect const & o )
568  {
569  left = o.left;
570  top = o.top;
571  right = o.right;
572  bottom = o.bottom;
573  return *this;
574  }
575  T width() const
576  {
577  return right - left;
578  }
579  T height() const
580  {
581  return bottom - top;
582  }
583  bool isNull() const
584  {
585  return width() == 0 || height() == 0;
586  }
587  void setNull()
588  {
589  left = right = top = bottom = 0;
590  }
591  TRect & merge(const TRect& rhs)
592  {
593  if (isNull())
594  {
595  *this = rhs;
596  }
597  else if (!rhs.isNull())
598  {
599  left = std::min(left, rhs.left);
600  right = std::max(right, rhs.right);
601  top = std::min(top, rhs.top);
602  bottom = std::max(bottom, rhs.bottom);
603  }
604 
605  return *this;
606 
607  }
608  TRect intersect(const TRect& rhs) const
609  {
610  TRect ret;
611  if (isNull() || rhs.isNull())
612  {
613  // empty
614  return ret;
615  }
616  else
617  {
618  ret.left = std::max(left, rhs.left);
619  ret.right = std::min(right, rhs.right);
620  ret.top = std::max(top, rhs.top);
621  ret.bottom = std::min(bottom, rhs.bottom);
622  }
623 
624  if (ret.left > ret.right || ret.top > ret.bottom)
625  {
626  // no intersection, return empty
627  ret.left = ret.top = ret.right = ret.bottom = 0;
628  }
629 
630  return ret;
631 
632  }
633 
634  };
635  template<typename T>
636  std::ostream& operator<<(std::ostream& o, const TRect<T>& r)
637  {
638  o << "TRect<>(l:" << r.left << ", t:" << r.top << ", r:" << r.right << ", b:" << r.bottom << ")";
639  return o;
640  }
641 
645 
650 
654 
659  struct Box
660  {
663  Box()
664  : left(0), top(0), right(1), bottom(1), front(0), back(1)
665  {
666  }
676  Box( uint32 l, uint32 t, uint32 r, uint32 b ):
677  left(l),
678  top(t),
679  right(r),
680  bottom(b),
681  front(0),
682  back(1)
683  {
684  assert(right >= left && bottom >= top && back >= front);
685  }
697  Box( uint32 l, uint32 t, uint32 ff, uint32 r, uint32 b, uint32 bb ):
698  left(l),
699  top(t),
700  right(r),
701  bottom(b),
702  front(ff),
703  back(bb)
704  {
705  assert(right >= left && bottom >= top && back >= front);
706  }
707 
709  bool contains(const Box &def) const
710  {
711  return (def.left >= left && def.top >= top && def.front >= front &&
712  def.right <= right && def.bottom <= bottom && def.back <= back);
713  }
714 
716  uint32 getWidth() const { return right-left; }
718  uint32 getHeight() const { return bottom-top; }
720  uint32 getDepth() const { return back-front; }
721  };
722 
723 
724 
736  int _OgreExport findCommandLineOpts(int numargs, char** argv, UnaryOptionList& unaryOptList,
737  BinaryOptionList& binOptList);
738 
741  {
747  CLIPPED_ALL = 2
748  };
749 
752  {
754  unsigned int width;
755  unsigned int height;
758  };
759 
762 
765 
768 }
769 
770 #include "OgreHeaderSuffix.h"
771 
772 #endif
OgreHeaderSuffix.h
Ogre::HashedVector
A hashed vector.
Definition: OgreCommon.h:333
Ogre::HashCombine
uint32 HashCombine(uint32 hashSoFar, const T &data)
Combine hashes with same style as boost::hash_combine.
Definition: OgreCommon.h:56
Ogre::RenderWindowDescription::name
String name
Definition: OgreCommon.h:753
Ogre::HashedVector::back
const_reference back() const
Definition: OgreCommon.h:447
Ogre::Box::right
uint32 right
Definition: OgreCommon.h:661
Ogre::HashedVector::const_reference
VectorImpl::const_reference const_reference
Definition: OgreCommon.h:358
Ogre::RenderWindowDescription::width
unsigned int width
Definition: OgreCommon.h:754
Ogre::Box::Box
Box(uint32 l, uint32 t, uint32 r, uint32 b)
Define a box from left, top, right and bottom coordinates This box will have depth one (front=0 and b...
Definition: OgreCommon.h:676
Ogre::SM_DISTANCE
@ SM_DISTANCE
Sort by distance from the camera.
Definition: OgreCommon.h:291
Ogre::FT_MIP
@ FT_MIP
The filter used when determining the mipmap.
Definition: OgreCommon.h:97
Ogre::HashedVector::getHash
uint32 getHash() const
Get the hash value.
Definition: OgreCommon.h:528
Ogre::UnaryOptionList
map< String, bool >::type UnaryOptionList
Definition: OgreCommon.h:546
Ogre::TFO_NONE
@ TFO_NONE
Equal to: min=FO_POINT, mag=FO_POINT, mip=FO_NONE.
Definition: OgreCommon.h:81
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::TVC_DIFFUSE
@ TVC_DIFFUSE
Definition: OgreCommon.h:280
Ogre::HashedVector::operator[]
reference operator[](size_type n)
Definition: OgreCommon.h:397
Ogre::HashedVector::size
size_type size() const
Definition: OgreCommon.h:393
Ogre::HashedVector::at
const_reference at(size_type n) const
Definition: OgreCommon.h:410
Ogre::CMPF_ALWAYS_FAIL
@ CMPF_ALWAYS_FAIL
Definition: OgreCommon.h:66
Ogre::TRect::TRect
TRect(T const &l, T const &t, T const &r, T const &b)
Definition: OgreCommon.h:559
Ogre::TVC_NONE
@ TVC_NONE
Definition: OgreCommon.h:278
Ogre::HashedVector::size_type
VectorImpl::size_type size_type
Definition: OgreCommon.h:359
Ogre::TRect::width
T width() const
Definition: OgreCommon.h:575
Ogre::map
Definition: OgrePrerequisites.h:534
Ogre::SHADOWTYPE_STENCIL_MODULATIVE
@ SHADOWTYPE_STENCIL_MODULATIVE
Stencil shadow technique which renders all shadow volumes as a modulation after all the non-transpare...
Definition: OgreCommon.h:216
Ogre::SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED
@ SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: OgreCommon.h:256
Ogre::FloatRect
TRect< float > FloatRect
Structure used to define a rectangle in a 2-D floating point space.
Definition: OgreCommon.h:644
Ogre::HashedVector::begin
const_iterator begin() const
Definition: OgreCommon.h:382
Ogre::SHADOWTYPE_TEXTURE_MODULATIVE
@ SHADOWTYPE_TEXTURE_MODULATIVE
Texture-based shadow technique which involves a monochrome render-to-texture of the shadow caster and...
Definition: OgreCommon.h:229
Ogre::HashedVector::mListHashDirty
bool mListHashDirty
Definition: OgreCommon.h:339
Ogre::findCommandLineOpts
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',...
Ogre::SO_FLAT
@ SO_FLAT
Definition: OgreCommon.h:115
Ogre::HashedVector::end
iterator end()
Definition: OgreCommon.h:381
Ogre::RenderWindowDescriptionList
vector< RenderWindowDescription >::type RenderWindowDescriptionList
Render window creation parameters container.
Definition: OgreCommon.h:761
Ogre::CMPF_NOT_EQUAL
@ CMPF_NOT_EQUAL
Definition: OgreCommon.h:71
Ogre::ClipResult
ClipResult
Generic result of clipping.
Definition: OgreCommon.h:741
Ogre::TFO_BILINEAR
@ TFO_BILINEAR
Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_POINT.
Definition: OgreCommon.h:83
Ogre::TRect::setNull
void setNull()
Definition: OgreCommon.h:587
Ogre::TRect
Definition: OgreCommon.h:556
Ogre::FT_MAG
@ FT_MAG
The filter used when magnifying a texture.
Definition: OgreCommon.h:95
Ogre::ShadowTechnique
ShadowTechnique
An enumeration of broad shadow techniques.
Definition: OgreCommon.h:191
Ogre::FBT_DEPTH
@ FBT_DEPTH
Definition: OgreCommon.h:297
Ogre::FogMode
FogMode
Fog modes.
Definition: OgreCommon.h:122
Ogre::CMPF_ALWAYS_PASS
@ CMPF_ALWAYS_PASS
Definition: OgreCommon.h:67
Ogre::HashedVector::reserve
void reserve(size_t t)
Definition: OgreCommon.h:433
Ogre::TRect::merge
TRect & merge(const TRect &rhs)
Definition: OgreCommon.h:591
Ogre::MANUAL_CULL_BACK
@ MANUAL_CULL_BACK
Cull triangles whose normal is pointing away from the camera (default).
Definition: OgreCommon.h:155
Ogre::HashedVector::erase
iterator erase(iterator pos)
Definition: OgreCommon.h:490
Ogre::Box::getWidth
uint32 getWidth() const
Get the width of this box.
Definition: OgreCommon.h:716
Ogre::CMPF_GREATER
@ CMPF_GREATER
Definition: OgreCommon.h:73
Ogre::Box::getHeight
uint32 getHeight() const
Get the height of this box.
Definition: OgreCommon.h:718
Ogre::HashedVector::insert
void insert(iterator pos, InputIterator f, InputIterator l)
Definition: OgreCommon.h:477
Ogre::TextureFilterOptions
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
Definition: OgreCommon.h:79
Ogre::TRect::right
T right
Definition: OgreCommon.h:557
Ogre::HashedVector::operator=
HashedVector< T > & operator=(const HashedVector< T > &rhs)
Definition: OgreCommon.h:425
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
Ogre::WaveformType
WaveformType
Enumerates the wave types usable with the Ogre engine.
Definition: OgreCommon.h:162
Ogre::TRect::isNull
bool isNull() const
Definition: OgreCommon.h:583
Ogre::HashedVector::operator<
bool operator<(const HashedVector< T > &b)
Definition: OgreCommon.h:523
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::RealRect
TRect< Real > RealRect
Structure used to define a rectangle in a 2-D floating point space, subject to double / single floati...
Definition: OgreCommon.h:649
Ogre::HashedVector::mList
VectorImpl mList
Definition: OgreCommon.h:337
Ogre::SortMode
SortMode
Sort mode for billboard-set and particle-system.
Definition: OgreCommon.h:287
Ogre::Box::top
uint32 top
Definition: OgreCommon.h:661
Ogre::HashedVector::erase
iterator erase(iterator first, iterator last)
Definition: OgreCommon.h:496
Ogre::HashedVector::reverse_iterator
VectorImpl::reverse_iterator reverse_iterator
Definition: OgreCommon.h:363
Ogre::SHADOWTYPE_NONE
@ SHADOWTYPE_NONE
No shadows.
Definition: OgreCommon.h:193
Ogre::TRect::left
T left
Definition: OgreCommon.h:557
Ogre::HashedVector::rbegin
reverse_iterator rbegin()
Definition: OgreCommon.h:384
Ogre::NameValuePairList
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
Ogre::WFT_SINE
@ WFT_SINE
Standard sine wave which smoothly changes from low to high and back again.
Definition: OgreCommon.h:164
Ogre::HashedVector::front
reference front()
Definition: OgreCommon.h:434
Ogre::HashedVector::capacity
size_type capacity() const
Definition: OgreCommon.h:395
Ogre::CompareFunction
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:65
Ogre::PM_SOLID
@ PM_SOLID
Solid polygons are rendered.
Definition: OgreCommon.h:186
Ogre::HashedVector::~HashedVector
~HashedVector()
Definition: OgreCommon.h:424
Ogre::TFO_ANISOTROPIC
@ TFO_ANISOTROPIC
Equal to: min=FO_ANISOTROPIC, max=FO_ANISOTROPIC, mip=FO_LINEAR.
Definition: OgreCommon.h:87
Ogre::RenderWindowDescription::useFullScreen
bool useFullScreen
Definition: OgreCommon.h:756
Ogre::CULL_CLOCKWISE
@ CULL_CLOCKWISE
Hardware culls triangles whose vertices are listed clockwise in the view (default).
Definition: OgreCommon.h:140
Ogre::Rect
TRect< long > Rect
Structure used to define a rectangle in a 2-D integer space.
Definition: OgreCommon.h:653
Ogre::Box::Box
Box(uint32 l, uint32 t, uint32 ff, uint32 r, uint32 b, uint32 bb)
Define a box from left, top, front, right, bottom and back coordinates.
Definition: OgreCommon.h:697
Ogre::HashedVector::operator==
bool operator==(const HashedVector< T > &b)
Definition: OgreCommon.h:520
Ogre::Box::contains
bool contains(const Box &def) const
Return true if the other box is a part of this one.
Definition: OgreCommon.h:709
Ogre::HashedVector::pointer
VectorImpl::pointer pointer
Definition: OgreCommon.h:356
Ogre::HashedVector::addToHash
void addToHash(const T &newPtr) const
Definition: OgreCommon.h:341
Ogre::PM_POINTS
@ PM_POINTS
Only points are rendered.
Definition: OgreCommon.h:182
Ogre::vector::type
std::vector< T, A > type
Definition: OgrePrerequisites.h:494
Ogre::FT_MIN
@ FT_MIN
The filter used when shrinking a texture.
Definition: OgreCommon.h:93
Ogre::MANUAL_CULL_NONE
@ MANUAL_CULL_NONE
No culling so everything is sent to the hardware.
Definition: OgreCommon.h:153
Ogre::operator<<
std::ostream & operator<<(std::ostream &o, const TRect< T > &r)
Definition: OgreCommon.h:636
Ogre::TVC_SPECULAR
@ TVC_SPECULAR
Definition: OgreCommon.h:281
Ogre::FO_ANISOTROPIC
@ FO_ANISOTROPIC
Similar to FO_LINEAR, but compensates for the angle of the texture plane.
Definition: OgreCommon.h:109
Ogre::TRect::height
T height() const
Definition: OgreCommon.h:579
OgreHeaderPrefix.h
Ogre::HashedVector::insert
iterator insert(iterator pos, const T &t)
Definition: OgreCommon.h:465
Ogre::HashedVector::VectorImpl
std::vector< T, STLAllocator< T, GeneralAllocPolicy > > VectorImpl
Definition: OgreCommon.h:335
Ogre::HashedVector::HashedVector
HashedVector(size_type n)
Definition: OgreCommon.h:412
Ogre::RenderWindowDescription
Render window creation parameters.
Definition: OgreCommon.h:752
Ogre::FOG_EXP2
@ FOG_EXP2
Fog density increases at the square of FOG_EXP, i.e. even quicker (fog = 1/e^(distance * density)^2)
Definition: OgreCommon.h:128
Ogre::CLIPPED_NONE
@ CLIPPED_NONE
Nothing was clipped.
Definition: OgreCommon.h:743
Ogre::TRect::top
T top
Definition: OgreCommon.h:557
Ogre::SHADOWTYPE_TEXTURE_ADDITIVE
@ SHADOWTYPE_TEXTURE_ADDITIVE
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: OgreCommon.h:239
Ogre::SHADOWTYPE_STENCIL_ADDITIVE
@ SHADOWTYPE_STENCIL_ADDITIVE
Stencil shadow technique which renders each light as a separate additive pass to the scene.
Definition: OgreCommon.h:224
Ogre::IM_VTFBESTFIT
@ IM_VTFBESTFIT
The num.
Definition: OgreCommon.h:311
Ogre::RenderWindowList
vector< RenderWindow * >::type RenderWindowList
Render window container.
Definition: OgreCommon.h:764
Ogre::AliasTextureNamePairList
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
Definition: OgreCommon.h:553
Ogre::CMPF_EQUAL
@ CMPF_EQUAL
Definition: OgreCommon.h:70
Ogre::FilterOptions
FilterOptions
Filtering options for textures / mipmaps.
Definition: OgreCommon.h:101
Ogre::HashedVector::HashedVector
HashedVector()
Definition: OgreCommon.h:411
Ogre::TRect::operator=
TRect & operator=(TRect const &o)
Definition: OgreCommon.h:567
Ogre::HashedVector::push_back
void push_back(const T &t)
Definition: OgreCommon.h:448
Ogre::Box::front
uint32 front
Definition: OgreCommon.h:661
Ogre::HashedVector::back
reference back()
Definition: OgreCommon.h:441
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::FOG_EXP
@ FOG_EXP
Fog density increases exponentially from the camera (fog = 1/e^(distance * density))
Definition: OgreCommon.h:126
Ogre::Box
Structure used to define a box in a 3-D integer space.
Definition: OgreCommon.h:660
Ogre::CMPF_LESS_EQUAL
@ CMPF_LESS_EQUAL
Definition: OgreCommon.h:69
Ogre::CullingMode
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:136
Ogre::HashedVector::clear
void clear()
Definition: OgreCommon.h:502
Ogre::Box::bottom
uint32 bottom
Definition: OgreCommon.h:661
Ogre::HashedVector::rend
const_reverse_iterator rend() const
Definition: OgreCommon.h:392
Ogre::HashedVector::swap
void swap(HashedVector< T > &rhs)
Definition: OgreCommon.h:460
Ogre::WFT_PWM
@ WFT_PWM
Pulse Width Modulation.
Definition: OgreCommon.h:175
Ogre::IM_FORCEONEWEIGHT
@ IM_FORCEONEWEIGHT
All techniques are forced to one weight per vertex.
Definition: OgreCommon.h:323
Ogre::SHADOWDETAILTYPE_ADDITIVE
@ SHADOWDETAILTYPE_ADDITIVE
Mask for additive shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:196
Ogre::TrackVertexColourType
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Definition: OgreCommon.h:276
Ogre::HashedVector::begin
iterator begin()
Definition: OgreCommon.h:375
Ogre::CMPF_LESS
@ CMPF_LESS
Definition: OgreCommon.h:68
Ogre::FO_NONE
@ FO_NONE
No filtering, used for FT_MIP to turn off mipmapping.
Definition: OgreCommon.h:103
Ogre::FO_LINEAR
@ FO_LINEAR
Average of a 2x2 pixel area, denotes bilinear for MIN and MAG, trilinear for MIP.
Definition: OgreCommon.h:107
Ogre::Box::Box
Box()
Parameterless constructor for setting the members manually.
Definition: OgreCommon.h:663
Ogre::SO_PHONG
@ SO_PHONG
Definition: OgreCommon.h:117
Ogre::BinaryOptionList
map< String, String >::type BinaryOptionList
Definition: OgreCommon.h:547
Ogre::HashedVector::recalcHash
void recalcHash() const
Definition: OgreCommon.h:345
Ogre::HashedVector< Light * >::const_iterator
VectorImpl::const_iterator const_iterator
Definition: OgreCommon.h:362
Ogre::HashedVector::HashedVector
HashedVector(InputIterator a, InputIterator b)
Definition: OgreCommon.h:418
Ogre::FBT_STENCIL
@ FBT_STENCIL
Definition: OgreCommon.h:298
Ogre::IM_USEBONEDUALQUATERNIONS
@ IM_USEBONEDUALQUATERNIONS
Definition: OgreCommon.h:317
Ogre::FOG_NONE
@ FOG_NONE
No fog. Duh.
Definition: OgreCommon.h:124
Ogre::HashedVector::rbegin
const_reverse_iterator rbegin() const
Definition: OgreCommon.h:391
Ogre::FO_POINT
@ FO_POINT
Use the closest pixel.
Definition: OgreCommon.h:105
Ogre::Box::back
uint32 back
Definition: OgreCommon.h:661
Ogre::map::type
std::map< K, V, P, A > type
Definition: OgrePrerequisites.h:536
Ogre::RenderWindowDescription::height
unsigned int height
Definition: OgreCommon.h:755
Ogre::TrackVertexColourEnum
TrackVertexColourEnum
Definition: OgreCommon.h:277
Ogre::FOG_LINEAR
@ FOG_LINEAR
Fog density increases linearly between the start and end distances.
Definition: OgreCommon.h:130
Ogre::TRect::TRect
TRect()
Definition: OgreCommon.h:558
Ogre::RenderWindowDescription::miscParams
NameValuePairList miscParams
Definition: OgreCommon.h:757
Ogre::MANUAL_CULL_FRONT
@ MANUAL_CULL_FRONT
Cull triangles whose normal is pointing towards the camera.
Definition: OgreCommon.h:157
Ogre::IM_USEALL
@ IM_USEALL
Definition: OgreCommon.h:325
Ogre::HashedVector::pop_back
void pop_back()
Definition: OgreCommon.h:455
Ogre::HashedVector::at
reference at(size_type n)
Definition: OgreCommon.h:404
Ogre::CULL_ANTICLOCKWISE
@ CULL_ANTICLOCKWISE
Hardware culls triangles whose vertices are listed anticlockwise in the view.
Definition: OgreCommon.h:142
Ogre::WFT_SQUARE
@ WFT_SQUARE
Half of the time is spent at the min, half at the max with instant transition between.
Definition: OgreCommon.h:168
Ogre::HashedVector::max_size
size_type max_size() const
Definition: OgreCommon.h:394
Ogre::ShadeOptions
ShadeOptions
Light shading modes.
Definition: OgreCommon.h:114
Ogre::Box::left
uint32 left
Definition: OgreCommon.h:661
Ogre::HashedVector::reference
VectorImpl::reference reference
Definition: OgreCommon.h:357
Ogre::TVC_AMBIENT
@ TVC_AMBIENT
Definition: OgreCommon.h:279
Ogre::CLIPPED_ALL
@ CLIPPED_ALL
Everything was clipped away.
Definition: OgreCommon.h:747
Ogre::SHADOWDETAILTYPE_TEXTURE
@ SHADOWDETAILTYPE_TEXTURE
Mask for texture shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:208
Ogre::HashedVector::dirtyHash
void dirtyHash()
Definition: OgreCommon.h:366
Ogre::FBT_COLOUR
@ FBT_COLOUR
Definition: OgreCommon.h:296
Ogre::HashedVector::isHashDirty
bool isHashDirty() const
Definition: OgreCommon.h:370
Ogre::SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED
@ SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: OgreCommon.h:272
Ogre::Box::getDepth
uint32 getDepth() const
Get the depth of this box.
Definition: OgreCommon.h:720
Ogre::SO_GOURAUD
@ SO_GOURAUD
Definition: OgreCommon.h:116
Ogre::IM_VTFBONEMATRIXLOOKUP
@ IM_VTFBONEMATRIXLOOKUP
Use a limited number of skeleton animations shared among all instances.
Definition: OgreCommon.h:315
Ogre::ManualCullingMode
ManualCullingMode
Manual culling modes based on vertex normals.
Definition: OgreCommon.h:151
Ogre::HashedVector::value_type
VectorImpl::value_type value_type
Definition: OgreCommon.h:355
Ogre::HashedVector::resize
void resize(size_type n, const T &t=T())
Definition: OgreCommon.h:509
Ogre::SHADOWDETAILTYPE_STENCIL
@ SHADOWDETAILTYPE_STENCIL
Mask for stencil shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:205
Ogre::CULL_NONE
@ CULL_NONE
Hardware never culls triangles and renders everything it receives.
Definition: OgreCommon.h:138
Ogre::TRect::bottom
T bottom
Definition: OgreCommon.h:557
Ogre::InstanceManagerFlags
InstanceManagerFlags
Flags for the Instance Manager when calculating ideal number of instances per batch.
Definition: OgreCommon.h:303
Ogre::HashedVector::mListHash
uint32 mListHash
Definition: OgreCommon.h:338
Ogre::TRect::intersect
TRect intersect(const TRect &rhs) const
Definition: OgreCommon.h:608
Ogre::HashedVector::HashedVector
HashedVector(size_type n, const T &t)
Definition: OgreCommon.h:413
Ogre::HashedVector::difference_type
VectorImpl::difference_type difference_type
Definition: OgreCommon.h:360
Ogre::HashedVector::operator[]
const_reference operator[](size_type n) const
Definition: OgreCommon.h:403
Ogre::FrameBufferType
FrameBufferType
Defines the frame buffer types.
Definition: OgreCommon.h:295
Ogre::CLIPPED_SOME
@ CLIPPED_SOME
Partially clipped.
Definition: OgreCommon.h:745
Ogre::PM_WIREFRAME
@ PM_WIREFRAME
Wireframe models are rendered.
Definition: OgreCommon.h:184
Ogre::CMPF_GREATER_EQUAL
@ CMPF_GREATER_EQUAL
Definition: OgreCommon.h:72
OgreString.h
Ogre::TFO_TRILINEAR
@ TFO_TRILINEAR
Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_LINEAR.
Definition: OgreCommon.h:85
Ogre::SM_DIRECTION
@ SM_DIRECTION
Sort by direction of the camera.
Definition: OgreCommon.h:289
Ogre::SHADOWDETAILTYPE_INTEGRATED
@ SHADOWDETAILTYPE_INTEGRATED
Mask for integrated shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:202
Ogre::HashedVector::end
const_iterator end() const
Definition: OgreCommon.h:383
Ogre::HashedVector::front
const_reference front() const
Definition: OgreCommon.h:440
Ogre::HashedVector::const_reverse_iterator
VectorImpl::const_reverse_iterator const_reverse_iterator
Definition: OgreCommon.h:364
Ogre::WFT_INVERSE_SAWTOOTH
@ WFT_INVERSE_SAWTOOTH
Gradual steady decrease from max to min over the period, with an instant return to max at the end.
Definition: OgreCommon.h:172
Ogre::HashedVector::HashedVector
HashedVector(const HashedVector< T > &rhs)
Definition: OgreCommon.h:414
Ogre::FilterType
FilterType
Definition: OgreCommon.h:91
Ogre::IM_USEONEWEIGHT
@ IM_USEONEWEIGHT
Use one weight per vertex when recommended (i.e.
Definition: OgreCommon.h:320
Ogre::PolygonMode
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:180
Ogre::SHADOWDETAILTYPE_MODULATIVE
@ SHADOWDETAILTYPE_MODULATIVE
Mask for modulative shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:199
Ogre::WFT_SAWTOOTH
@ WFT_SAWTOOTH
Gradual steady increase from min to max over the period with an instant return to min at the end.
Definition: OgreCommon.h:170
Ogre::FastHash
uint32 _OgreExport FastHash(const char *data, int len, uint32 hashSoFar=0)
Fast general hashing algorithm.
Ogre::IM_USE16BIT
@ IM_USE16BIT
Forces an amount of instances per batch low enough so that vertices * numInst < 65535 since usually i...
Definition: OgreCommon.h:307
Ogre::HashedVector::empty
bool empty() const
Definition: OgreCommon.h:396
Ogre::WFT_TRIANGLE
@ WFT_TRIANGLE
An angular wave with a constant increase / decrease speed with pointed peaks.
Definition: OgreCommon.h:166
Ogre::TRect::TRect
TRect(TRect const &o)
Definition: OgreCommon.h:563
Ogre::TVC_EMISSIVE
@ TVC_EMISSIVE
Definition: OgreCommon.h:282
Ogre::LightList
HashedVector< Light * > LightList
Definition: OgreCommon.h:541
Ogre::HashedVector::insert
void insert(iterator pos, size_type n, const T &x)
Definition: OgreCommon.h:484
Ogre::HashedVector::iterator
VectorImpl::iterator iterator
Definition: OgreCommon.h:361
Ogre::HashedVector::rend
reverse_iterator rend()
Definition: OgreCommon.h:390

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.