34 #if defined ( OGRE_GCC_VISIBILITY )
35 # pragma GCC visibility push(default)
38 #if defined ( OGRE_GCC_VISIBILITY )
39 # pragma GCC visibility pop
58 return FastHash((
const char*)&data,
sizeof(T), hashSoFar);
331 template <
typename T>
335 typedef std::vector<T, STLAllocator<T, GeneralAllocPolicy> >
VectorImpl;
343 mListHash =
FastHash((
const char*)&newPtr,
sizeof(T), mListHash);
350 mListHashDirty =
false;
368 mListHashDirty =
true;
379 return mList.begin();
381 iterator
end() {
return mList.end(); }
382 const_iterator
begin()
const {
return mList.begin(); }
383 const_iterator
end()
const {
return mList.end(); }
388 return mList.rbegin();
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(); }
403 const_reference
operator[](size_type n)
const {
return mList[n]; }
404 reference
at(size_type n)
408 return mList.const_iterator(n);
410 const_reference
at(size_type n)
const {
return mList.at(n); }
412 HashedVector(size_type n) : mList(n), mListHash(0), mListHashDirty(n > 0) {}
413 HashedVector(size_type n,
const T& t) : mList(n, t), mListHash(0), mListHashDirty(n > 0) {}
415 : mList(rhs.mList), mListHash(rhs.mListHash), mListHashDirty(rhs.mListHashDirty) {}
417 template <
class InputIterator>
419 : mList(a, b), mListHashDirty(false)
438 return mList.front();
440 const_reference
front()
const {
return mList.front(); }
447 const_reference
back()
const {
return mList.back(); }
462 mList.swap(rhs.
mList);
465 iterator
insert(iterator pos,
const T& t)
467 bool recalc = (pos !=
end());
468 iterator ret = mList.insert(pos, t);
476 template <
class InputIterator>
478 InputIterator f, InputIterator l)
480 mList.insert(pos, f, l);
484 void insert(iterator pos, size_type n,
const T& x)
486 mList.insert(pos, n, x);
492 iterator ret = mList.erase(pos);
496 iterator
erase(iterator first, iterator last)
498 iterator ret = mList.erase(first, last);
506 mListHashDirty =
false;
509 void resize(size_type n,
const T& t = T())
523 bool operator<(const HashedVector<T>& b)
524 {
return mListHash < b.mListHash; }
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 )
564 : left( o.left ), top( o.top ), right( o.right ), bottom( o.bottom )
589 left = right = top = bottom = 0;
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);
618 ret.
left = std::max(left, rhs.
left);
620 ret.
top = std::max(top, rhs.
top);
636 std::ostream& operator<<(std::ostream& o, const TRect<T>& r)
638 o <<
"TRect<>(l:" << r.
left <<
", t:" << r.top <<
", r:" << r.right <<
", b:" << r.bottom <<
")";
664 : left(0), top(0), right(1), bottom(1), front(0), back(1)
684 assert(right >= left && bottom >= top && back >= front);
705 assert(right >= left && bottom >= top && back >= front);
711 return (def.
left >= left && def.
top >= top && def.
front >= front &&
737 BinaryOptionList& binOptList);
HashedVector(const HashedVector< T > &rhs)
Box()
Parameterless constructor for setting the members manually.
iterator erase(iterator pos)
Only points are rendered.
Mask for modulative shadows (not for direct use, use SHADOWTYPE_ enum instead)
Mask for integrated shadows (not for direct use, use SHADOWTYPE_ enum instead)
Use a limited number of skeleton animations shared among all instances.
Mask for stencil shadows (not for direct use, use SHADOWTYPE_ enum instead)
HashedVector< Light * > LightList
Sort by direction of the camera.
TextureFilterOptions
High-level filtering options providing shortcuts to settings the minification, magnification and mip ...
WaveformType
Enumerates the wave types usable with the Ogre engine.
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.
Texture-based shadow technique which involves a monochrome render-to-texture of the shadow caster and...
uint32 getHash() const
Get the hash value.
Cull triangles whose normal is pointing towards the camera.
TRect< Real > RealRect
Structure used to define a rectangle in a 2-D floating point space, subject to double / single floati...
reference at(size_type n)
uint32 HashCombine(uint32 hashSoFar, const T &data)
Combine hashes with same style as boost::hash_combine.
TRect< float > FloatRect
Structure used to define a rectangle in a 2-D floating point space.
Stencil shadow technique which renders all shadow volumes as a modulation after all the non-transpare...
Everything was clipped away.
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'...
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Use one weight per vertex when recommended (i.e.
Render window creation parameters.
map< String, bool >::type UnaryOptionList
vector< RenderWindowDescription >::type RenderWindowDescriptionList
Render window creation parameters container.
TRect< long > Rect
Structure used to define a rectangle in a 2-D integer space.
void insert(iterator pos, InputIterator f, InputIterator l)
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
reference operator[](size_type n)
ClipResult
Generic result of clipping.
Wireframe models are rendered.
VectorImpl::reverse_iterator reverse_iterator
const_reference back() const
ShadowTechnique
An enumeration of broad shadow techniques.
No culling so everything is sent to the hardware.
iterator insert(iterator pos, const T &t)
HashedVector(size_type n, const T &t)
Structure used to define a box in a 3-D integer space.
Sort by distance from the camera.
VectorImpl::reference reference
uint32 getDepth() const
Get the depth of this box.
Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_POINT.
const_reverse_iterator rend() const
uint32 getHeight() const
Get the height of this box.
vector< RenderWindow * >::type RenderWindowList
Render window container.
HashedVector(InputIterator a, InputIterator b)
TRect & merge(const TRect &rhs)
bool contains(const Box &def) const
Return true if the other box is a part of this one.
VectorImpl::difference_type difference_type
The filter used when magnifying a texture.
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...
SortMode
Sort mode for billboard-set and particle-system.
HashedVector(size_type n)
CullingMode
Hardware culling modes based on vertex winding.
Standard sine wave which smoothly changes from low to high and back again.
std::map< K, V, P, A > type
VectorImpl::size_type size_type
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
Equal to: min=FO_ANISOTROPIC, max=FO_ANISOTROPIC, mip=FO_LINEAR.
void push_back(const T &t)
Equal to: min=FO_POINT, mag=FO_POINT, mip=FO_NONE.
Hardware culls triangles whose vertices are listed clockwise in the view (default).
void addToHash(const T &newPtr) const
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
std::vector< T, STLAllocator< T, GeneralAllocPolicy > > VectorImpl
Half of the time is spent at the min, half at the max with instant transition between.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Hardware never culls triangles and renders everything it receives.
TRect intersect(const TRect &rhs) const
Fog density increases at the square of FOG_EXP, i.e. even quicker (fog = 1/e^(distance * density)^2) ...
map< String, String >::type BinaryOptionList
Stencil shadow technique which renders each light as a separate additive pass to the scene...
Equal to: min=FO_LINEAR, mag=FO_LINEAR, mip=FO_LINEAR.
No filtering, used for FT_MIP to turn off mipmapping.
const_reference at(size_type n) const
ManualCullingMode
Manual culling modes based on vertex normals.
Fog density increases exponentially from the camera (fog = 1/e^(distance * density)) ...
The filter used when shrinking a texture.
InstanceManagerFlags
Flags for the Instance Manager when calculating ideal number of instances per batch.
Forces an amount of instances per batch low enough so that vertices * numInst < 65535 since usually i...
Solid polygons are rendered.
Similar to FO_LINEAR, but compensates for the angle of the texture plane.
VectorImpl::iterator iterator
TRect & operator=(TRect const &o)
All techniques are forced to one weight per vertex.
Mask for additive shadows (not for direct use, use SHADOWTYPE_ enum instead)
size_type max_size() const
FilterOptions
Filtering options for textures / mipmaps.
VectorImpl::const_reverse_iterator const_reverse_iterator
VectorImpl::const_iterator const_iterator
An angular wave with a constant increase / decrease speed with pointed peaks.
VectorImpl::value_type value_type
const_reference operator[](size_type n) const
Cull triangles whose normal is pointing away from the camera (default).
Fog density increases linearly between the start and end distances.
uint32 _OgreExport FastHash(const char *data, int len, uint32 hashSoFar=0)
Fast general hashing algorithm.
void resize(size_type n, const T &t=T())
const_iterator end() const
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
ShadeOptions
Light shading modes.
PolygonMode
The polygon mode to use when rasterising.
bool operator==(const HashedVector< T > &b)
Average of a 2x2 pixel area, denotes bilinear for MIN and MAG, trilinear for MIP. ...
HashedVector< T > & operator=(const HashedVector< T > &rhs)
void swap(HashedVector< T > &rhs)
TRect(T const &l, T const &t, T const &r, T const &b)
iterator erase(iterator first, iterator last)
VectorImpl::const_reference const_reference
const_iterator begin() const
NameValuePairList miscParams
const_reference front() const
Gradual steady increase from min to max over the period with an instant return to min at the end...
FrameBufferType
Defines the frame buffer types.
void insert(iterator pos, size_type n, const T &x)
size_type capacity() const
Gradual steady decrease from max to min over the period, with an instant return to max at the end...
uint32 getWidth() const
Get the width of this box.
Representation of a dynamic light source in the scene.
The filter used when determining the mipmap.
VectorImpl::pointer pointer
const_reverse_iterator rbegin() const
Mask for texture shadows (not for direct use, use SHADOWTYPE_ enum instead)
reverse_iterator rbegin()
Hardware culls triangles whose vertices are listed anticlockwise in the view.