OgreCommon.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __Common_H__
#define __Common_H__
// Common stuff
#include "OgreString.h"
#if defined ( OGRE_GCC_VISIBILITY )
# pragma GCC visibility push(default)
#endif
#if defined ( OGRE_GCC_VISIBILITY )
# pragma GCC visibility pop
#endif
#include "OgreHeaderPrefix.h"
namespace Ogre {
uint32 _OgreExport FastHash (const char * data, int len, uint32 hashSoFar = 0);
template <typename T>
uint32 HashCombine (uint32 hashSoFar, const T& data)
{
return FastHash((const char*)&data, sizeof(T), hashSoFar);
}
enum CompareFunction
{
CMPF_ALWAYS_FAIL,
CMPF_ALWAYS_PASS,
CMPF_LESS,
CMPF_LESS_EQUAL,
CMPF_EQUAL,
CMPF_NOT_EQUAL,
CMPF_GREATER_EQUAL,
CMPF_GREATER
};
enum TextureFilterOptions
{
TFO_NONE,
TFO_BILINEAR,
TFO_TRILINEAR,
TFO_ANISOTROPIC
};
enum FilterType
{
FT_MIN,
FT_MAG,
FT_MIP
};
enum FilterOptions
{
FO_NONE,
FO_POINT,
FO_LINEAR,
FO_ANISOTROPIC
};
enum ShadeOptions
{
SO_FLAT,
SO_GOURAUD,
SO_PHONG
};
enum FogMode
{
FOG_NONE,
FOG_EXP,
FOG_EXP2,
FOG_LINEAR
};
enum CullingMode
{
CULL_NONE = 1,
CULL_CLOCKWISE = 2,
CULL_ANTICLOCKWISE = 3
};
enum ManualCullingMode
{
MANUAL_CULL_NONE = 1,
MANUAL_CULL_BACK = 2,
MANUAL_CULL_FRONT = 3
};
enum WaveformType
{
WFT_SINE,
WFT_TRIANGLE,
WFT_SQUARE,
WFT_SAWTOOTH,
WFT_INVERSE_SAWTOOTH,
WFT_PWM
};
enum PolygonMode
{
PM_POINTS = 1,
PM_WIREFRAME = 2,
PM_SOLID = 3
};
enum ShadowTechnique
{
SHADOWTYPE_NONE = 0x00,
SHADOWDETAILTYPE_ADDITIVE = 0x01,
SHADOWDETAILTYPE_MODULATIVE = 0x02,
SHADOWDETAILTYPE_INTEGRATED = 0x04,
SHADOWDETAILTYPE_STENCIL = 0x10,
SHADOWDETAILTYPE_TEXTURE = 0x20,
SHADOWTYPE_STENCIL_MODULATIVE = 0x12,
SHADOWTYPE_STENCIL_ADDITIVE = 0x11,
SHADOWTYPE_TEXTURE_MODULATIVE = 0x22,
SHADOWTYPE_TEXTURE_ADDITIVE = 0x21,
SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED = 0x25,
SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED = 0x26
};
typedef int TrackVertexColourType;
enum TrackVertexColourEnum {
TVC_NONE = 0x0,
TVC_AMBIENT = 0x1,
TVC_DIFFUSE = 0x2,
TVC_SPECULAR = 0x4,
TVC_EMISSIVE = 0x8
};
enum SortMode
{
SM_DIRECTION,
SM_DISTANCE
};
enum FrameBufferType {
FBT_COLOUR = 0x1,
FBT_DEPTH = 0x2,
FBT_STENCIL = 0x4
};
enum InstanceManagerFlags
{
IM_USE16BIT = 0x0001,
IM_VTFBESTFIT = 0x0002,
IM_VTFBONEMATRIXLOOKUP = 0x0004,
IM_USEBONEDUALQUATERNIONS = 0x0008,
IM_USEONEWEIGHT = 0x0010,
IM_FORCEONEWEIGHT = 0x0020,
IM_USEALL = IM_USE16BIT|IM_VTFBESTFIT|IM_USEONEWEIGHT
};
template <typename T>
class HashedVector
{
public:
typedef std::vector<T, STLAllocator<T, GeneralAllocPolicy> > VectorImpl;
protected:
VectorImpl mList;
mutable uint32 mListHash;
mutable bool mListHashDirty;
void addToHash(const T& newPtr) const
{
mListHash = FastHash((const char*)&newPtr, sizeof(T), mListHash);
}
void recalcHash() const
{
mListHash = 0;
for (const_iterator i = mList.begin(); i != mList.end(); ++i)
addToHash(*i);
mListHashDirty = false;
}
public:
typedef typename VectorImpl::value_type value_type;
typedef typename VectorImpl::pointer pointer;
typedef typename VectorImpl::reference reference;
typedef typename VectorImpl::const_reference const_reference;
typedef typename VectorImpl::size_type size_type;
typedef typename VectorImpl::difference_type difference_type;
typedef typename VectorImpl::iterator iterator;
typedef typename VectorImpl::const_iterator const_iterator;
typedef typename VectorImpl::reverse_iterator reverse_iterator;
typedef typename VectorImpl::const_reverse_iterator const_reverse_iterator;
void dirtyHash()
{
mListHashDirty = true;
}
bool isHashDirty() const
{
return mListHashDirty;
}
iterator begin()
{
// we have to assume that hash needs recalculating on non-const
dirtyHash();
return mList.begin();
}
iterator end() { return mList.end(); }
const_iterator begin() const { return mList.begin(); }
const_iterator end() const { return mList.end(); }
reverse_iterator rbegin()
{
// we have to assume that hash needs recalculating on non-const
dirtyHash();
return mList.rbegin();
}
reverse_iterator rend() { return mList.rend(); }
const_reverse_iterator rbegin() const { return mList.rbegin(); }
const_reverse_iterator rend() const { return mList.rend(); }
size_type size() const { return mList.size(); }
size_type max_size() const { return mList.max_size(); }
size_type capacity() const { return mList.capacity(); }
bool empty() const { return mList.empty(); }
reference operator[](size_type n)
{
// we have to assume that hash needs recalculating on non-const
dirtyHash();
return mList[n];
}
const_reference operator[](size_type n) const { return mList[n]; }
reference at(size_type n)
{
// we have to assume that hash needs recalculating on non-const
dirtyHash();
return mList.const_iterator(n);
}
const_reference at(size_type n) const { return mList.at(n); }
HashedVector() : mListHash(0), mListHashDirty(false) {}
HashedVector(size_type n) : mList(n), mListHash(0), mListHashDirty(n > 0) {}
HashedVector(size_type n, const T& t) : mList(n, t), mListHash(0), mListHashDirty(n > 0) {}
HashedVector(const HashedVector<T>& rhs)
: mList(rhs.mList), mListHash(rhs.mListHash), mListHashDirty(rhs.mListHashDirty) {}
template <class InputIterator>
HashedVector(InputIterator a, InputIterator b)
: mList(a, b), mListHashDirty(false)
{
dirtyHash();
}
~HashedVector() {}
HashedVector<T>& operator=(const HashedVector<T>& rhs)
{
mList = rhs.mList;
mListHash = rhs.mListHash;
mListHashDirty = rhs.mListHashDirty;
return *this;
}
void reserve(size_t t) { mList.reserve(t); }
reference front()
{
// we have to assume that hash needs recalculating on non-const
dirtyHash();
return mList.front();
}
const_reference front() const { return mList.front(); }
reference back()
{
// we have to assume that hash needs recalculating on non-const
dirtyHash();
return mList.back();
}
const_reference back() const { return mList.back(); }
void push_back(const T& t)
{
mList.push_back(t);
// Quick progressive hash add
if (!isHashDirty())
addToHash(t);
}
void pop_back()
{
mList.pop_back();
dirtyHash();
}
void swap(HashedVector<T>& rhs)
{
mList.swap(rhs.mList);
dirtyHash();
}
iterator insert(iterator pos, const T& t)
{
bool recalc = (pos != end());
iterator ret = mList.insert(pos, t);
if (recalc)
dirtyHash();
else
addToHash(t);
return ret;
}
template <class InputIterator>
void insert(iterator pos,
InputIterator f, InputIterator l)
{
mList.insert(pos, f, l);
dirtyHash();
}
void insert(iterator pos, size_type n, const T& x)
{
mList.insert(pos, n, x);
dirtyHash();
}
iterator erase(iterator pos)
{
iterator ret = mList.erase(pos);
dirtyHash();
return ret;
}
iterator erase(iterator first, iterator last)
{
iterator ret = mList.erase(first, last);
dirtyHash();
return ret;
}
void clear()
{
mList.clear();
mListHash = 0;
mListHashDirty = false;
}
void resize(size_type n, const T& t = T())
{
bool recalc = false;
if (n != size())
recalc = true;
mList.resize(n, t);
if (recalc)
dirtyHash();
}
bool operator==(const HashedVector<T>& b)
{ return mListHash == b.mListHash; }
bool operator<(const HashedVector<T>& b)
{ return mListHash < b.mListHash; }
uint32 getHash() const
{
if (isHashDirty())
recalcHash();
return mListHash;
}
public:
};
class Light;
typedef HashedVector<Light*> LightList;
typedef map<String, bool>::type UnaryOptionList;
typedef map<String, String>::type BinaryOptionList;
typedef map<String, String>::type NameValuePairList;
typedef map<String, String>::type AliasTextureNamePairList;
template< typename T > struct TRect
{
T left, top, right, bottom;
TRect() : left(0), top(0), right(0), bottom(0) {}
TRect( T const & l, T const & t, T const & r, T const & b )
: left( l ), top( t ), right( r ), bottom( b )
{
}
TRect( TRect const & o )
: left( o.left ), top( o.top ), right( o.right ), bottom( o.bottom )
{
}
TRect & operator=( TRect const & o )
{
left = o.left;
top = o.top;
right = o.right;
bottom = o.bottom;
return *this;
}
T width() const
{
return right - left;
}
T height() const
{
return bottom - top;
}
bool isNull() const
{
return width() == 0 || height() == 0;
}
void setNull()
{
left = right = top = bottom = 0;
}
TRect & merge(const TRect& rhs)
{
if (isNull())
{
*this = rhs;
}
else if (!rhs.isNull())
{
left = std::min(left, rhs.left);
right = std::max(right, rhs.right);
top = std::min(top, rhs.top);
bottom = std::max(bottom, rhs.bottom);
}
return *this;
}
TRect intersect(const TRect& rhs) const
{
TRect ret;
if (isNull() || rhs.isNull())
{
// empty
return ret;
}
else
{
ret.left = std::max(left, rhs.left);
ret.right = std::min(right, rhs.right);
ret.top = std::max(top, rhs.top);
ret.bottom = std::min(bottom, rhs.bottom);
}
if (ret.left > ret.right || ret.top > ret.bottom)
{
// no intersection, return empty
ret.left = ret.top = ret.right = ret.bottom = 0;
}
return ret;
}
};
template<typename T>
std::ostream& operator<<(std::ostream& o, const TRect<T>& r)
{
o << "TRect<>(l:" << r.left << ", t:" << r.top << ", r:" << r.right << ", b:" << r.bottom << ")";
return o;
}
typedef TRect<float> FloatRect;
typedef TRect<Real> RealRect;
typedef TRect< long > Rect;
struct Box
{
uint32 left, top, right, bottom, front, back;
Box()
: left(0), top(0), right(1), bottom(1), front(0), back(1)
{
}
Box( uint32 l, uint32 t, uint32 r, uint32 b ):
left(l),
top(t),
right(r),
bottom(b),
front(0),
back(1)
{
assert(right >= left && bottom >= top && back >= front);
}
Box( uint32 l, uint32 t, uint32 ff, uint32 r, uint32 b, uint32 bb ):
left(l),
top(t),
right(r),
bottom(b),
front(ff),
back(bb)
{
assert(right >= left && bottom >= top && back >= front);
}
bool contains(const Box &def) const
{
return (def.left >= left && def.top >= top && def.front >= front &&
def.right <= right && def.bottom <= bottom && def.back <= back);
}
uint32 getWidth() const { return right-left; }
uint32 getHeight() const { return bottom-top; }
uint32 getDepth() const { return back-front; }
};
int _OgreExport findCommandLineOpts(int numargs, char** argv, UnaryOptionList& unaryOptList,
BinaryOptionList& binOptList);
enum ClipResult
{
CLIPPED_NONE = 0,
CLIPPED_SOME = 1,
CLIPPED_ALL = 2
};
struct RenderWindowDescription
{
String name;
unsigned int width;
unsigned int height;
bool useFullScreen;
NameValuePairList miscParams;
};
typedef vector<RenderWindowDescription>::type RenderWindowDescriptionList;
typedef vector<RenderWindow*>::type RenderWindowList;
}
#include "OgreHeaderSuffix.h"
#endif
Ogre::HashedVector::HashedVector
HashedVector(const HashedVector< T > &rhs)
Definition: OgreCommon.h:414
Ogre::Box::Box
Box()
Parameterless constructor for setting the members manually.
Definition: OgreCommon.h:663
Ogre::HashedVector::erase
iterator erase(iterator pos)
Definition: OgreCommon.h:490
Ogre::PM_POINTS
Only points are rendered.
Definition: OgreCommon.h:182
Ogre::SHADOWDETAILTYPE_MODULATIVE
Mask for modulative shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:199
Ogre::TRect::height
T height() const
Definition: OgreCommon.h:579
Ogre::SHADOWDETAILTYPE_INTEGRATED
Mask for integrated shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:202
Ogre::IM_VTFBONEMATRIXLOOKUP
Use a limited number of skeleton animations shared among all instances.
Definition: OgreCommon.h:315
Ogre::HashedVector::clear
void clear()
Definition: OgreCommon.h:502
Ogre::SHADOWDETAILTYPE_STENCIL
Mask for stencil shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:205
Ogre::LightList
HashedVector< Light * > LightList
Definition: OgreCommon.h:541
Ogre::FogMode
FogMode
Fog modes.
Definition: OgreCommon.h:121
Ogre::TRect::bottom
T bottom
Definition: OgreCommon.h:557
Ogre::Box::back
uint32 back
Definition: OgreCommon.h:661
Ogre::HashedVector::recalcHash
void recalcHash() const
Definition: OgreCommon.h:345
Ogre::SM_DIRECTION
Sort by direction of the camera.
Definition: OgreCommon.h:289
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::CMPF_ALWAYS_PASS
Definition: OgreCommon.h:67
Ogre::WFT_PWM
Pulse Width Modulation.
Definition: OgreCommon.h:175
Ogre::HashedVector::rend
reverse_iterator rend()
Definition: OgreCommon.h:390
Ogre::CMPF_LESS
Definition: OgreCommon.h:68
Ogre::TextureFilterOptions
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
Definition: OgreCommon.h:78
Ogre::WaveformType
WaveformType
Enumerates the wave types usable with the Ogre engine.
Definition: OgreCommon.h:161
Ogre::HashedVector::addToHash
void addToHash(const T &newPtr) const
Definition: OgreCommon.h:341
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::SHADOWTYPE_TEXTURE_MODULATIVE
Texture-based shadow technique which involves a monochrome render-to-texture of the shadow caster and...
Definition: OgreCommon.h:229
Ogre::vector::type
std::vector< T, A > type
Definition: OgrePrerequisites.h:494
Ogre::MANUAL_CULL_FRONT
Cull triangles whose normal is pointing towards the camera.
Definition: OgreCommon.h:157
Ogre::SHADOWTYPE_NONE
No shadows.
Definition: OgreCommon.h:193
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::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::IM_USEBONEDUALQUATERNIONS
Definition: OgreCommon.h:317
Ogre::HashedVector::at
reference at(size_type n)
Definition: OgreCommon.h:404
Ogre::HashCombine
uint32 HashCombine(uint32 hashSoFar, const T &data)
Combine hashes with same style as boost::hash_combine.
Definition: OgreCommon.h:56
Ogre::SO_FLAT
Definition: OgreCommon.h:115
Ogre::FBT_STENCIL
Definition: OgreCommon.h:298
Ogre::TRect::setNull
void setNull()
Definition: OgreCommon.h:587
Ogre::FloatRect
TRect< float > FloatRect
Structure used to define a rectangle in a 2-D floating point space.
Definition: OgreCommon.h:644
Ogre::TRect::TRect
TRect()
Definition: OgreCommon.h:558
Ogre::SHADOWTYPE_STENCIL_MODULATIVE
Stencil shadow technique which renders all shadow volumes as a modulation after all the non-transpare...
Definition: OgreCommon.h:216
Ogre::HashedVector::front
reference front()
Definition: OgreCommon.h:434
Ogre::CLIPPED_ALL
Everything was clipped away.
Definition: OgreCommon.h:747
Ogre::FBT_COLOUR
Definition: OgreCommon.h:296
Ogre::findCommandLineOpts
int _OgreExport findCommandLineOpts(int numargs, char **argv, UnaryOptionList &unaryOptList, BinaryOptionList &binOptList)
Locate command-line options of the unary form &#39;-blah&#39; and of the binary form &#39;-blah foo&#39;...
Ogre::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::TRect::isNull
bool isNull() const
Definition: OgreCommon.h:583
Ogre::IM_USEONEWEIGHT
Use one weight per vertex when recommended (i.e.
Definition: OgreCommon.h:320
Ogre::RenderWindowDescription
Render window creation parameters.
Definition: OgreCommon.h:751
OgreString.h
Ogre::TRect
Definition: OgreCommon.h:555
Ogre::UnaryOptionList
map< String, bool >::type UnaryOptionList
Definition: OgreCommon.h:546
Ogre::RenderWindowDescriptionList
vector< RenderWindowDescription >::type RenderWindowDescriptionList
Render window creation parameters container.
Definition: OgreCommon.h:761
Ogre::Box::front
uint32 front
Definition: OgreCommon.h:661
Ogre::Rect
TRect< long > Rect
Structure used to define a rectangle in a 2-D integer space.
Definition: OgreCommon.h:653
Ogre::HashedVector::insert
void insert(iterator pos, InputIterator f, InputIterator l)
Definition: OgreCommon.h:477
Ogre::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::HashedVector::operator[]
reference operator[](size_type n)
Definition: OgreCommon.h:397
Ogre::ClipResult
ClipResult
Generic result of clipping.
Definition: OgreCommon.h:740
Ogre::PM_WIREFRAME
Wireframe models are rendered.
Definition: OgreCommon.h:184
Ogre::HashedVector::reverse_iterator
VectorImpl::reverse_iterator reverse_iterator
Definition: OgreCommon.h:363
Ogre::ShadowTechnique
ShadowTechnique
An enumeration of broad shadow techniques.
Definition: OgreCommon.h:190
Ogre::MANUAL_CULL_NONE
No culling so everything is sent to the hardware.
Definition: OgreCommon.h:153
Ogre::HashedVector::mList
VectorImpl mList
Definition: OgreCommon.h:337
Ogre::HashedVector::insert
iterator insert(iterator pos, const T &t)
Definition: OgreCommon.h:465
Ogre::HashedVector::HashedVector
HashedVector(size_type n, const T &t)
Definition: OgreCommon.h:413
Ogre::HashedVector::front
const_reference front() const
Definition: OgreCommon.h:440
Ogre::HashedVector::back
const_reference back() const
Definition: OgreCommon.h:447
Ogre::Box
Structure used to define a box in a 3-D integer space.
Definition: OgreCommon.h:659
Ogre::SM_DISTANCE
Sort by distance from the camera.
Definition: OgreCommon.h:291
Ogre::HashedVector::reference
VectorImpl::reference reference
Definition: OgreCommon.h:357
Ogre::TFO_BILINEAR
Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_POINT.
Definition: OgreCommon.h:83
Ogre::Box::getHeight
uint32 getHeight() const
Get the height of this box.
Definition: OgreCommon.h:718
Ogre::SO_PHONG
Definition: OgreCommon.h:117
Ogre::HashedVector::operator[]
const_reference operator[](size_type n) const
Definition: OgreCommon.h:403
Ogre::CLIPPED_SOME
Partially clipped.
Definition: OgreCommon.h:745
Ogre::TRect::intersect
TRect intersect(const TRect &rhs) const
Definition: OgreCommon.h:608
Ogre::RenderWindowList
vector< RenderWindow * >::type RenderWindowList
Render window container.
Definition: OgreCommon.h:764
Ogre::Box::top
uint32 top
Definition: OgreCommon.h:661
Ogre::Box::right
uint32 right
Definition: OgreCommon.h:661
Ogre::TVC_EMISSIVE
Definition: OgreCommon.h:282
Ogre::HashedVector::HashedVector
HashedVector(InputIterator a, InputIterator b)
Definition: OgreCommon.h:418
Ogre::TRect::merge
TRect & merge(const TRect &rhs)
Definition: OgreCommon.h:591
Ogre::HashedVector::difference_type
VectorImpl::difference_type difference_type
Definition: OgreCommon.h:360
Ogre::FT_MAG
The filter used when magnifying a texture.
Definition: OgreCommon.h:95
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::HashedVector::end
const_iterator end() const
Definition: OgreCommon.h:383
Ogre::SortMode
SortMode
Sort mode for billboard-set and particle-system.
Definition: OgreCommon.h:286
Ogre::HashedVector::HashedVector
HashedVector(size_type n)
Definition: OgreCommon.h:412
Ogre::CullingMode
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:135
Ogre::WFT_SINE
Standard sine wave which smoothly changes from low to high and back again.
Definition: OgreCommon.h:164
Ogre::map::type
std::map< K, V, P, A > type
Definition: OgrePrerequisites.h:536
Ogre::HashedVector::back
reference back()
Definition: OgreCommon.h:441
Ogre::IM_USEALL
Definition: OgreCommon.h:325
Ogre::HashedVector::size_type
VectorImpl::size_type size_type
Definition: OgreCommon.h:359
Ogre::TrackVertexColourType
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Definition: OgreCommon.h:276
Ogre::AliasTextureNamePairList
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
Definition: OgreCommon.h:553
Ogre::TFO_ANISOTROPIC
Equal to: min=FO_ANISOTROPIC, max=FO_ANISOTROPIC, mip=FO_LINEAR.
Definition: OgreCommon.h:87
Ogre::HashedVector
A hashed vector.
Definition: OgreCommon.h:332
Ogre::HashedVector::push_back
void push_back(const T &t)
Definition: OgreCommon.h:448
Ogre::TFO_NONE
Equal to: min=FO_POINT, mag=FO_POINT, mip=FO_NONE.
Definition: OgreCommon.h:81
Ogre::CULL_CLOCKWISE
Hardware culls triangles whose vertices are listed clockwise in the view (default).
Definition: OgreCommon.h:140
Ogre::HashedVector::HashedVector
HashedVector()
Definition: OgreCommon.h:411
Ogre::HashedVector::capacity
size_type capacity() const
Definition: OgreCommon.h:395
Ogre::HashedVector::begin
iterator begin()
Definition: OgreCommon.h:375
Ogre::NameValuePairList
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
Ogre::HashedVector::VectorImpl
std::vector< T, STLAllocator< T, GeneralAllocPolicy > > VectorImpl
Definition: OgreCommon.h:335
Ogre::WFT_SQUARE
Half of the time is spent at the min, half at the max with instant transition between.
Definition: OgreCommon.h:168
Ogre::CompareFunction
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:64
Ogre::CULL_NONE
Hardware never culls triangles and renders everything it receives.
Definition: OgreCommon.h:138
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::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::SO_GOURAUD
Definition: OgreCommon.h:116
Ogre::Box::bottom
uint32 bottom
Definition: OgreCommon.h:661
Ogre::BinaryOptionList
map< String, String >::type BinaryOptionList
Definition: OgreCommon.h:547
Ogre::SHADOWTYPE_STENCIL_ADDITIVE
Stencil shadow technique which renders each light as a separate additive pass to the scene...
Definition: OgreCommon.h:224
Ogre::HashedVector::mListHashDirty
bool mListHashDirty
Definition: OgreCommon.h:339
Ogre::TRect::top
T top
Definition: OgreCommon.h:557
Ogre::TRect::left
T left
Definition: OgreCommon.h:557
Ogre::TFO_TRILINEAR
Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_LINEAR.
Definition: OgreCommon.h:85
OgreHeaderSuffix.h
Ogre::IM_VTFBESTFIT
The num.
Definition: OgreCommon.h:311
Ogre::FO_NONE
No filtering, used for FT_MIP to turn off mipmapping.
Definition: OgreCommon.h:103
Ogre::TVC_AMBIENT
Definition: OgreCommon.h:279
Ogre::ManualCullingMode
ManualCullingMode
Manual culling modes based on vertex normals.
Definition: OgreCommon.h:150
Ogre::FOG_EXP
Fog density increases exponentially from the camera (fog = 1/e^(distance * density)) ...
Definition: OgreCommon.h:126
Ogre::FT_MIN
The filter used when shrinking a texture.
Definition: OgreCommon.h:93
Ogre::HashedVector::end
iterator end()
Definition: OgreCommon.h:381
Ogre::InstanceManagerFlags
InstanceManagerFlags
Flags for the Instance Manager when calculating ideal number of instances per batch.
Definition: OgreCommon.h:302
Ogre::HashedVector::size
size_type size() const
Definition: OgreCommon.h:393
Ogre::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::isHashDirty
bool isHashDirty() const
Definition: OgreCommon.h:370
Ogre::CMPF_ALWAYS_FAIL
Definition: OgreCommon.h:66
Ogre::CMPF_EQUAL
Definition: OgreCommon.h:70
Ogre::PM_SOLID
Solid polygons are rendered.
Definition: OgreCommon.h:186
Ogre::TVC_SPECULAR
Definition: OgreCommon.h:281
Ogre::FO_ANISOTROPIC
Similar to FO_LINEAR, but compensates for the angle of the texture plane.
Definition: OgreCommon.h:109
Ogre::HashedVector::iterator
VectorImpl::iterator iterator
Definition: OgreCommon.h:361
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
Ogre::TRect::operator=
TRect & operator=(TRect const &o)
Definition: OgreCommon.h:567
Ogre::IM_FORCEONEWEIGHT
All techniques are forced to one weight per vertex.
Definition: OgreCommon.h:323
Ogre::SHADOWDETAILTYPE_ADDITIVE
Mask for additive shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:196
Ogre::HashedVector::getHash
uint32 getHash() const
Get the hash value.
Definition: OgreCommon.h:528
Ogre::RenderWindowDescription::height
unsigned int height
Definition: OgreCommon.h:755
Ogre::FilterOptions
FilterOptions
Filtering options for textures / mipmaps.
Definition: OgreCommon.h:100
Ogre::HashedVector::const_reverse_iterator
VectorImpl::const_reverse_iterator const_reverse_iterator
Definition: OgreCommon.h:364
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::HashedVector< Light * >::const_iterator
VectorImpl::const_iterator const_iterator
Definition: OgreCommon.h:362
Ogre::HashedVector::rend
const_reverse_iterator rend() const
Definition: OgreCommon.h:392
Ogre::CLIPPED_NONE
Nothing was clipped.
Definition: OgreCommon.h:743
Ogre::WFT_TRIANGLE
An angular wave with a constant increase / decrease speed with pointed peaks.
Definition: OgreCommon.h:166
Ogre::HashedVector::max_size
size_type max_size() const
Definition: OgreCommon.h:394
Ogre::HashedVector::value_type
VectorImpl::value_type value_type
Definition: OgreCommon.h:355
Ogre::HashedVector::at
const_reference at(size_type n) const
Definition: OgreCommon.h:410
Ogre::CMPF_GREATER
Definition: OgreCommon.h:73
Ogre::FOG_NONE
No fog. Duh.
Definition: OgreCommon.h:124
Ogre::MANUAL_CULL_BACK
Cull triangles whose normal is pointing away from the camera (default).
Definition: OgreCommon.h:155
Ogre::TrackVertexColourEnum
TrackVertexColourEnum
Definition: OgreCommon.h:277
Ogre::FOG_LINEAR
Fog density increases linearly between the start and end distances.
Definition: OgreCommon.h:130
OgreHeaderPrefix.h
Ogre::FastHash
uint32 _OgreExport FastHash(const char *data, int len, uint32 hashSoFar=0)
Fast general hashing algorithm.
Ogre::HashedVector::resize
void resize(size_type n, const T &t=T())
Definition: OgreCommon.h:509
Ogre::TRect::right
T right
Definition: OgreCommon.h:557
Ogre::FBT_DEPTH
Definition: OgreCommon.h:297
Ogre::HashedVector::empty
bool empty() const
Definition: OgreCommon.h:396
Ogre::HashedVector::mListHash
uint32 mListHash
Definition: OgreCommon.h:338
Ogre::CMPF_LESS_EQUAL
Definition: OgreCommon.h:69
Ogre::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::HashedVector::reserve
void reserve(size_t t)
Definition: OgreCommon.h:433
Ogre::HashedVector::rbegin
const_reverse_iterator rbegin() const
Definition: OgreCommon.h:391
Ogre::HashedVector::~HashedVector
~HashedVector()
Definition: OgreCommon.h:424
Ogre::Box::getWidth
uint32 getWidth() const
Get the width of this box.
Definition: OgreCommon.h:716
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::CMPF_GREATER_EQUAL
Definition: OgreCommon.h:72
Ogre::ShadeOptions
ShadeOptions
Light shading modes.
Definition: OgreCommon.h:113
Ogre::PolygonMode
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:179
Ogre::HashedVector::operator==
bool operator==(const HashedVector< T > &b)
Definition: OgreCommon.h:520
Ogre::FO_LINEAR
Average of a 2x2 pixel area, denotes bilinear for MIN and MAG, trilinear for MIP. ...
Definition: OgreCommon.h:107
Ogre::HashedVector::operator=
HashedVector< T > & operator=(const HashedVector< T > &rhs)
Definition: OgreCommon.h:425
Ogre::FO_POINT
Use the closest pixel.
Definition: OgreCommon.h:105
Ogre::HashedVector::swap
void swap(HashedVector< T > &rhs)
Definition: OgreCommon.h:460
Ogre::Box::getDepth
uint32 getDepth() const
Get the depth of this box.
Definition: OgreCommon.h:720
Ogre::TRect::TRect
TRect(T const &l, T const &t, T const &r, T const &b)
Definition: OgreCommon.h:559
Ogre::HashedVector::erase
iterator erase(iterator first, iterator last)
Definition: OgreCommon.h:496
Ogre::TVC_NONE
Definition: OgreCommon.h:278
Ogre::TRect::TRect
TRect(TRect const &o)
Definition: OgreCommon.h:563
Ogre::HashedVector::const_reference
VectorImpl::const_reference const_reference
Definition: OgreCommon.h:358
Ogre::TRect::width
T width() const
Definition: OgreCommon.h:575
Ogre::RenderWindowDescription::miscParams
NameValuePairList miscParams
Definition: OgreCommon.h:757
Ogre::HashedVector::begin
const_iterator begin() const
Definition: OgreCommon.h:382
Ogre::HashedVector::dirtyHash
void dirtyHash()
Definition: OgreCommon.h:366
Ogre::RenderWindowDescription::width
unsigned int width
Definition: OgreCommon.h:754
Ogre::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::FrameBufferType
FrameBufferType
Defines the frame buffer types.
Definition: OgreCommon.h:295
Ogre::HashedVector::insert
void insert(iterator pos, size_type n, const T &x)
Definition: OgreCommon.h:484
Ogre::RenderWindowDescription::name
String name
Definition: OgreCommon.h:753
Ogre::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::pop_back
void pop_back()
Definition: OgreCommon.h:455
Ogre::RenderWindowDescription::useFullScreen
bool useFullScreen
Definition: OgreCommon.h:756
Ogre::Light
Representation of a dynamic light source in the scene.
Definition: OgreLight.h:73
Ogre::FT_MIP
The filter used when determining the mipmap.
Definition: OgreCommon.h:97
Ogre::HashedVector::pointer
VectorImpl::pointer pointer
Definition: OgreCommon.h:356
Ogre::SHADOWDETAILTYPE_TEXTURE
Mask for texture shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:208
Ogre::HashedVector::rbegin
reverse_iterator rbegin()
Definition: OgreCommon.h:384
Ogre::Box::left
uint32 left
Definition: OgreCommon.h:661
Ogre::TVC_DIFFUSE
Definition: OgreCommon.h:280
Ogre::FilterType
FilterType
Definition: OgreCommon.h:90
Ogre::CMPF_NOT_EQUAL
Definition: OgreCommon.h:71
Ogre::CULL_ANTICLOCKWISE
Hardware culls triangles whose vertices are listed anticlockwise in the view.
Definition: OgreCommon.h:142

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