OgreBillboardSet.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 
29 #ifndef __BillboardSet_H__
30 #define __BillboardSet_H__
31 
32 #include "OgrePrerequisites.h"
33 
34 #include "OgreMovableObject.h"
35 #include "OgreRenderable.h"
36 #include "OgreRadixSort.h"
37 #include "OgreCommon.h"
39 #include "OgreHeaderPrefix.h"
40 
41 namespace Ogre {
55  {
65  };
68  {
73  };
76  {
87  };
88 
111  {
112  protected:
116 
121 
126 
131 
136 
139 
142 
145 
148 
151 
155 
165 
174 
180 
186  float* mLockPtr;
190  Vector3 mVOffset[4];
194  Real mLeftOff, mRightOff, mTopOff, mBottomOff;
196  Vector3 mCamX, mCamY;
203 
206 
209 
212 
215 
220 
222  inline bool billboardVisible(Camera* cam, const Billboard& bill);
223 
225  unsigned short mNumVisibleBillboards;
226 
228  virtual void increasePool(size_t size);
229 
230 
231  //-----------------------------------------------------------------------
232  // The internal methods which follow are here to allow maximum flexibility as to
233  // when various components of the calculation are done. Depending on whether the
234  // billboards are of fixed size and whether they are point or oriented type will
235  // determine how much calculation has to be done per-billboard. NOT a one-size fits all approach.
236  //-----------------------------------------------------------------------
241  void genBillboardAxes(Vector3* pX, Vector3 *pY, const Billboard* pBill = 0);
242 
245  void getParametricOffsets(Real& left, Real& right, Real& top, Real& bottom);
246 
251  void genVertices(const Vector3* const offsets, const Billboard& pBillboard);
252 
260  void genVertOffsets(Real inleft, Real inright, Real intop, Real inbottom,
261  Real width, Real height,
262  const Vector3& x, const Vector3& y, Vector3* pDestVec);
263 
264 
267  {
270 
272  float operator()(Billboard* bill) const;
273  };
274 
277  {
280 
282  float operator()(Billboard* bill) const;
283  };
284 
286 
289 
290 
291 
292  private:
296  size_t mPoolSize;
303 
306  void _createBuffers(void);
309  void _destroyBuffers(void);
310 
311  public:
312 
332  BillboardSet( const String& name, unsigned int poolSize = 20,
333  bool externalDataSource = false);
334 
335  virtual ~BillboardSet();
336 
355  const Vector3& position,
356  const ColourValue& colour = ColourValue::White );
357 
380  Real x, Real y, Real z,
381  const ColourValue& colour = ColourValue::White );
382 
385  virtual int getNumBillboards(void) const;
386 
402  virtual void setAutoextend(bool autoextend);
403 
408  virtual bool getAutoextend(void) const;
409 
413  virtual void setSortingEnabled(bool sortenable);
414 
419  virtual bool getSortingEnabled(void) const;
420 
431  virtual void setPoolSize(size_t size);
432 
439  virtual unsigned int getPoolSize(void) const;
440 
441 
444  virtual void clear();
445 
457  virtual Billboard* getBillboard(unsigned int index) const;
458 
463  virtual void removeBillboard(unsigned int index);
464 
469  virtual void removeBillboard(Billboard* pBill);
470 
482  virtual void setBillboardOrigin(BillboardOrigin origin);
483 
488  virtual BillboardOrigin getBillboardOrigin(void) const;
489 
500 
506 
517  virtual void setDefaultDimensions(Real width, Real height);
518 
520  virtual void setDefaultWidth(Real width);
522  virtual Real getDefaultWidth(void) const;
524  virtual void setDefaultHeight(Real height);
526  virtual Real getDefaultHeight(void) const;
527 
533 
537  virtual const String& getMaterialName(void) const;
538 
543  virtual void _notifyCurrentCamera(Camera* cam);
544 
550  void beginBillboards(size_t numBillboards = 0);
552  void injectBillboard(const Billboard& bb);
554  void endBillboards(void);
560  void setBounds(const AxisAlignedBox& box, Real radius);
561 
562 
567  virtual const AxisAlignedBox& getBoundingBox(void) const;
568 
573  virtual Real getBoundingRadius(void) const;
578  virtual void _updateRenderQueue(RenderQueue* queue);
579 
584  virtual const MaterialPtr& getMaterial(void) const;
585 
590  virtual void setMaterial( const MaterialPtr& material );
591 
597 
602  virtual void getWorldTransforms(Matrix4* xform) const;
603 
606  virtual void _notifyBillboardResized(void);
607 
610  virtual void _notifyBillboardRotated(void);
611 
613  virtual bool getCullIndividually(void) const;
634  virtual void setCullIndividually(bool cullIndividual);
635 
656  virtual void setBillboardType(BillboardType bbt);
657 
659  virtual BillboardType getBillboardType(void) const;
660 
675  virtual void setCommonDirection(const Vector3& vec);
676 
678  virtual const Vector3& getCommonDirection(void) const;
679 
694  virtual void setCommonUpVector(const Vector3& vec);
695 
697  virtual const Vector3& getCommonUpVector(void) const;
698 
712  virtual void setUseAccurateFacing(bool acc) { mAccurateFacing = acc; }
717  virtual bool getUseAccurateFacing(void) const { return mAccurateFacing; }
718 
720  virtual const String& getMovableType(void) const;
721 
723  Real getSquaredViewDepth(const Camera* cam) const;
724 
726  virtual void _updateBounds(void);
728  const LightList& getLights(void) const;
729 
732  bool debugRenderables = false);
733 
735  virtual void _sortBillboards( Camera* cam);
736 
738  virtual SortMode _getSortMode(void) const;
739 
745  virtual void setBillboardsInWorldSpace(bool ws) { mWorldSpace = ws; }
746 
774  virtual void setTextureCoords( Ogre::FloatRect const * coords, uint16 numCoords );
775 
789  virtual void setTextureStacksAndSlices( uchar stacks, uchar slices );
790 
797  virtual Ogre::FloatRect const * getTextureCoords( uint16 * oNumCoords );
798 
827  virtual void setPointRenderingEnabled(bool enabled);
828 
830  virtual bool isPointRenderingEnabled(void) const
831  { return mPointRendering; }
832 
834  uint32 getTypeFlags(void) const;
835 
845  void setAutoUpdate(bool autoUpdate);
846 
848  bool getAutoUpdate(void) const { return mAutoUpdate; }
849 
854  void notifyBillboardDataChanged(void) { mBillboardDataChanged = true; }
855 
856  };
857 
860  {
861  protected:
863  public:
866 
868 
869  const String& getType(void) const;
871 
872  };
876 } // namespace Ogre
877 
878 #include "OgreHeaderSuffix.h"
879 
880 #endif // __BillboardSet_H__
Ogre::BillboardSet::mVertexData
VertexData * mVertexData
The vertex position data for all billboards in this set.
Definition: OgreBillboardSet.h:182
OgreHeaderSuffix.h
Ogre::HashedVector< Light * >
Ogre::BillboardSet::setUseAccurateFacing
virtual void setUseAccurateFacing(bool acc)
Sets whether or not billboards should use an 'accurate' facing model based on the vector from each bi...
Definition: OgreBillboardSet.h:712
Ogre::BillboardSet::_notifyBillboardRotated
virtual void _notifyBillboardRotated(void)
Internal callback used by Billboards to notify their parent that they have been rotated.
Ogre::BillboardSet::mPointRendering
bool mPointRendering
Use point rendering?
Definition: OgreBillboardSet.h:288
Ogre::BillboardSet::genVertices
void genVertices(const Vector3 *const offsets, const Billboard &pBillboard)
Internal method for generating vertex data.
Ogre::BillboardSet::mAllDefaultSize
bool mAllDefaultSize
True if no billboards in this set have been resized - greater efficiency.
Definition: OgreBillboardSet.h:138
Ogre::BillboardSet::setPoolSize
virtual void setPoolSize(size_t size)
Adjusts the size of the pool of billboards available in this set.
Ogre::BillboardSet::mCullIndividual
bool mCullIndividual
Flag indicating whether each billboard should be culled separately (default: false)
Definition: OgreBillboardSet.h:208
Ogre::BillboardSet::_createBuffers
void _createBuffers(void)
Internal method creates vertex and index buffers.
Ogre::Billboard
A billboard is a primitive which always faces the camera in every frame.
Definition: OgreBillboard.h:68
Ogre::BillboardSet::endBillboards
void endBillboards(void)
Finish defining billboards.
Ogre::BillboardSet::mNumVisibleBillboards
unsigned short mNumVisibleBillboards
Number of visible billboards (will be == getNumBillboards if mCullIndividual == false)
Definition: OgreBillboardSet.h:225
Ogre::BillboardSet::getTypeFlags
uint32 getTypeFlags(void) const
Override to return specific type flag.
Ogre::BillboardSet::TextureCoordSets
vector< Ogre::FloatRect >::type TextureCoordSets
Definition: OgreBillboardSet.h:210
Ogre::BillboardSet::mBillboardPool
BillboardPool mBillboardPool
Pool of billboard instances for use and reuse in the active billboard list.
Definition: OgreBillboardSet.h:179
Ogre::BillboardSet::mCommonDirection
Vector3 mCommonDirection
Common direction for billboards of type BBT_ORIENTED_COMMON and BBT_PERPENDICULAR_COMMON.
Definition: OgreBillboardSet.h:217
Ogre::BillboardSetFactory::getType
const String & getType(void) const
Get the type of the object to be created.
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::BillboardSet::getCommonUpVector
virtual const Vector3 & getCommonUpVector(void) const
Gets the common up-vector for all billboards (BBT_PERPENDICULAR_SELF and BBT_PERPENDICULAR_COMMON)
Ogre::BBT_PERPENDICULAR_SELF
@ BBT_PERPENDICULAR_SELF
Billboards are perpendicular to their own direction vector (their own Z axis, the facing direction) a...
Definition: OgreBillboardSet.h:86
Ogre::BillboardSet::genVertOffsets
void genVertOffsets(Real inleft, Real inright, Real intop, Real inbottom, Real width, Real height, const Vector3 &x, const Vector3 &y, Vector3 *pDestVec)
Internal method generates vertex offsets.
Ogre::BillboardSetFactory::BillboardSetFactory
BillboardSetFactory()
Definition: OgreBillboardSet.h:864
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:87
Ogre::BillboardType
BillboardType
The type of billboard to use.
Definition: OgreBillboardSet.h:76
Ogre::BillboardSet::mTextureCoords
TextureCoordSets mTextureCoords
Definition: OgreBillboardSet.h:211
Ogre::BillboardSet::mCamY
Vector3 mCamY
Definition: OgreBillboardSet.h:196
Ogre::BillboardSet::_destroyBuffers
void _destroyBuffers(void)
Internal method destroys vertex and index buffers.
Ogre::BillboardSet::getBillboardRotationType
virtual BillboardRotationType getBillboardRotationType(void) const
Sets billboard rotation type.
Ogre::BillboardSet::setBillboardOrigin
virtual void setBillboardOrigin(BillboardOrigin origin)
Sets the point which acts as the origin point for all billboards in this set.
Ogre::BillboardSet::setMaterial
virtual void setMaterial(const MaterialPtr &material)
Sets the name of the material to be used for this billboard set.
Ogre::BillboardSet::getDefaultHeight
virtual Real getDefaultHeight(void) const
See setDefaultDimensions - this gets 1 component individually.
Ogre::BillboardSet::billboardVisible
bool billboardVisible(Camera *cam, const Billboard &bill)
Internal method for culling individual billboards.
Ogre::BillboardSet::mSortingEnabled
bool mSortingEnabled
Flag indicating whether the billboards has to be sorted.
Definition: OgreBillboardSet.h:144
Ogre::BillboardSet::getBoundingBox
virtual const AxisAlignedBox & getBoundingBox(void) const
Overridden from MovableObject.
Ogre::TRect< float >
Ogre::BillboardSet::mDefaultHeight
Real mDefaultHeight
Default height of each billboard.
Definition: OgreBillboardSet.h:130
Ogre::BillboardSet::setCommonDirection
virtual void setCommonDirection(const Vector3 &vec)
Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON or BBT_PERPE...
Ogre::BillboardSet::removeBillboard
virtual void removeBillboard(Billboard *pBill)
Removes a billboard from the set.
Ogre::BillboardSet::injectBillboard
void injectBillboard(const Billboard &bb)
Define a billboard.
Ogre::BBT_PERPENDICULAR_COMMON
@ BBT_PERPENDICULAR_COMMON
Billboards are perpendicular to a shared direction vector (used as Z axis, the facing direction) and ...
Definition: OgreBillboardSet.h:84
Ogre::BillboardSet::~BillboardSet
virtual ~BillboardSet()
Ogre::BillboardSet::SortByDirectionFunctor::sortDir
Vector3 sortDir
Direction to sort in.
Definition: OgreBillboardSet.h:269
Ogre::BillboardSet::BillboardSet
BillboardSet(const String &name, unsigned int poolSize=20, bool externalDataSource=false)
Usual constructor - this is called by the SceneManager.
Ogre::uint16
unsigned short uint16
Definition: OgrePlatform.h:360
Ogre::BillboardSet::_notifyBillboardResized
virtual void _notifyBillboardResized(void)
Internal callback used by Billboards to notify their parent that they have been resized.
Ogre::BillboardSet::mAutoExtendPool
bool mAutoExtendPool
Flag indicating whether to autoextend pool.
Definition: OgreBillboardSet.h:141
Ogre::BillboardSet::setTextureCoords
virtual void setTextureCoords(Ogre::FloatRect const *coords, uint16 numCoords)
BillboardSet can use custom texture coordinates for various billboards.
Ogre::BillboardSet::setSortingEnabled
virtual void setSortingEnabled(bool sortenable)
Enables sorting for this BillboardSet.
Ogre::MovableObject
Abstract class defining a movable object in a scene.
Definition: OgreMovableObject.h:61
Ogre::BillboardSet::getBillboardType
virtual BillboardType getBillboardType(void) const
Returns the billboard type in use.
Ogre::BillboardSet::getCullIndividually
virtual bool getCullIndividually(void) const
Returns whether or not billboards in this are tested individually for culling.
Ogre::BillboardSet::getLights
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable.
Ogre::BillboardSet::notifyBillboardDataChanged
void notifyBillboardDataChanged(void)
When billboard set is not auto updating its GPU buffer, the user is responsible to inform it about an...
Definition: OgreBillboardSet.h:854
Ogre::BillboardSet::setDefaultWidth
virtual void setDefaultWidth(Real width)
See setDefaultDimensions - this sets 1 component individually.
Ogre::BillboardSet::getParametricOffsets
void getParametricOffsets(Real &left, Real &right, Real &top, Real &bottom)
Internal method, generates parametric offsets based on origin.
Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
Definition: OgreResourceGroupManager.h:270
Ogre::BillboardSet::getPoolSize
virtual unsigned int getPoolSize(void) const
Returns the current size of the billboard pool.
Ogre::BillboardSet::mLockPtr
float * mLockPtr
Locked pointer to buffer.
Definition: OgreBillboardSet.h:186
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
Ogre::BillboardSet::mWorldSpace
bool mWorldSpace
Definition: OgreBillboardSet.h:150
Ogre::BillboardSet
A collection of billboards (faces which are always facing the given direction) with the same (default...
Definition: OgreBillboardSet.h:111
Ogre::BillboardSet::setBounds
void setBounds(const AxisAlignedBox &box, Real radius)
Set the bounds of the BillboardSet.
Ogre::BillboardSet::mPoolSize
size_t mPoolSize
The number of billboard in the pool.
Definition: OgreBillboardSet.h:296
Ogre::BillboardSet::BillboardSet
BillboardSet()
Private constructor (instances cannot be created directly).
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::BillboardSet::mBuffersCreated
bool mBuffersCreated
Flag indicating whether the HW buffers have been created.
Definition: OgreBillboardSet.h:294
Ogre::MovableObjectFactory
Interface definition for a factory class which produces a certain kind of MovableObject,...
Definition: OgreMovableObject.h:579
Ogre::BBR_TEXCOORD
@ BBR_TEXCOORD
Rotate the billboard's texture coordinates.
Definition: OgreBillboardSet.h:72
Ogre::BillboardSet::getSquaredViewDepth
Real getSquaredViewDepth(const Camera *cam) const
Overridden, see Renderable.
OgreResourceGroupManager.h
Ogre::SortMode
SortMode
Sort mode for billboard-set and particle-system.
Definition: OgreCommon.h:287
Ogre::BillboardSetFactory::destroyInstance
void destroyInstance(MovableObject *obj)
Destroy an instance of the object.
Ogre::NameValuePairList
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
Ogre::BBO_CENTER_LEFT
@ BBO_CENTER_LEFT
Definition: OgreBillboardSet.h:59
Ogre::BillboardSet::mAutoUpdate
bool mAutoUpdate
Tell if vertex buffer should be update automatically.
Definition: OgreBillboardSet.h:300
Ogre::BillboardSet::setBillboardsInWorldSpace
virtual void setBillboardsInWorldSpace(bool ws)
Sets whether billboards should be treated as being in world space.
Definition: OgreBillboardSet.h:745
Ogre::BillboardSet::getSortingEnabled
virtual bool getSortingEnabled(void) const
Returns true if sorting of billboards is enabled based on their distance from the camera.
Ogre::BBO_BOTTOM_LEFT
@ BBO_BOTTOM_LEFT
Definition: OgreBillboardSet.h:62
Ogre::BillboardSet::getMaterial
virtual const MaterialPtr & getMaterial(void) const
Overridden from MovableObject.
Ogre::VertexData
Summary class collecting together vertex source information.
Definition: OgreVertexIndexData.h:50
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:58
Ogre::BBO_BOTTOM_RIGHT
@ BBO_BOTTOM_RIGHT
Definition: OgreBillboardSet.h:64
OgreHeaderPrefix.h
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:79
Ogre::list
Definition: OgrePrerequisites.h:506
Ogre::BillboardSet::_sortBillboards
virtual void _sortBillboards(Camera *cam)
Sort the billboard set.
Ogre::BillboardSet::mRadixSorter
static RadixSort< ActiveBillboardList, Billboard *, float > mRadixSorter
Definition: OgreBillboardSet.h:285
Ogre::BillboardSet::setAutoextend
virtual void setAutoextend(bool autoextend)
Tells the set whether to allow automatic extension of the pool of billboards.
Ogre::BillboardSet::setBillboardType
virtual void setBillboardType(BillboardType bbt)
Sets the type of billboard to render.
Ogre::BillboardSet::mAccurateFacing
bool mAccurateFacing
Use 'true' billboard to cam position facing, rather than camera direcion.
Definition: OgreBillboardSet.h:147
Ogre::BillboardSet::setAutoUpdate
void setAutoUpdate(bool autoUpdate)
Set the auto update state of this billboard set.
Ogre::BBT_ORIENTED_COMMON
@ BBT_ORIENTED_COMMON
Billboards are oriented around a shared direction vector (used as Y axis) and only rotate around this...
Definition: OgreBillboardSet.h:80
Ogre::BillboardSet::mBillboardDataChanged
bool mBillboardDataChanged
True if the billboard data changed. Will cause vertex buffer update.
Definition: OgreBillboardSet.h:302
Ogre::BillboardSetFactory::createInstanceImpl
MovableObject * createInstanceImpl(const String &name, const NameValuePairList *params)
Internal implementation of create method - must be overridden.
Ogre::BillboardSet::mMaterialName
String mMaterialName
Name of the material to use.
Definition: OgreBillboardSet.h:133
Ogre::BillboardSet::_getSortMode
virtual SortMode _getSortMode(void) const
Gets the sort mode of this billboard set.
OgrePrerequisites.h
Ogre::BillboardSet::mFreeBillboards
FreeBillboardList mFreeBillboards
Free billboard queue.
Definition: OgreBillboardSet.h:173
Ogre::HardwareVertexBufferSharedPtr
Shared pointer implementation used to share vertex buffers.
Definition: OgreHardwareVertexBuffer.h:87
Ogre::BillboardSet::mAllDefaultRotation
bool mAllDefaultRotation
Definition: OgreBillboardSet.h:149
Ogre::uchar
unsigned char uchar
In order to avoid finger-aches :)
Definition: OgrePrerequisites.h:112
Ogre::BBR_VERTEX
@ BBR_VERTEX
Rotate the billboard's vertices around their facing direction.
Definition: OgreBillboardSet.h:70
Ogre::BillboardSet::mExternalData
bool mExternalData
Is external billboard data in use?
Definition: OgreBillboardSet.h:298
Ogre::BillboardSet::getBoundingRadius
virtual Real getBoundingRadius(void) const
Overridden from MovableObject.
Ogre::BillboardSet::createBillboard
Billboard * createBillboard(Real x, Real y, Real z, const ColourValue &colour=ColourValue::White)
Creates a new billboard and adds it to this set.
Ogre::BillboardSet::_updateRenderQueue
virtual void _updateRenderQueue(RenderQueue *queue)
Overridden from MovableObject.
Ogre::BillboardSet::SortByDistanceFunctor::sortPos
Vector3 sortPos
Position to sort in.
Definition: OgreBillboardSet.h:279
Ogre::BBO_TOP_RIGHT
@ BBO_TOP_RIGHT
Definition: OgreBillboardSet.h:58
Ogre::BBT_ORIENTED_SELF
@ BBT_ORIENTED_SELF
Billboards are oriented around their own direction vector (their own Y axis) and only rotate around t...
Definition: OgreBillboardSet.h:82
Ogre::BillboardSetFactory::FACTORY_TYPE_NAME
static String FACTORY_TYPE_NAME
Definition: OgreBillboardSet.h:867
Ogre::AxisAlignedBox
A 3D box aligned with the x/y/z axes.
Definition: OgreAxisAlignedBox.h:55
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::BillboardSet::SortByDirectionFunctor
Sort by direction functor.
Definition: OgreBillboardSet.h:267
Ogre::BillboardSet::SortByDistanceFunctor
Sort by distance functor.
Definition: OgreBillboardSet.h:277
OgreCommon.h
Ogre::BillboardSet::mTopOff
Real mTopOff
Definition: OgreBillboardSet.h:194
Ogre::BillboardSet::mCurrentCamera
Camera * mCurrentCamera
Current camera.
Definition: OgreBillboardSet.h:192
Ogre::BillboardSet::getRenderOperation
virtual void getRenderOperation(RenderOperation &op)
Overridden from MovableObject.
Ogre::BillboardSet::increasePool
virtual void increasePool(size_t size)
Internal method for increasing pool size.
Ogre::BillboardOrigin
BillboardOrigin
Enum covering what exactly a billboard's position means (center, top-left etc).
Definition: OgreBillboardSet.h:55
Ogre::BillboardSet::mCamDir
Vector3 mCamDir
Camera direction in billboard space.
Definition: OgreBillboardSet.h:198
Ogre::ColourValue::White
static const ColourValue White
Definition: OgreColourValue.h:62
Ogre::BillboardRotationType
BillboardRotationType
The rotation type of billboard.
Definition: OgreBillboardSet.h:68
Ogre::BillboardSetFactory::~BillboardSetFactory
~BillboardSetFactory()
Definition: OgreBillboardSet.h:865
Ogre::BillboardSet::ActiveBillboardList
list< Billboard * >::type ActiveBillboardList
Definition: OgreBillboardSet.h:152
Ogre::BillboardSet::BillboardPool
vector< Billboard * >::type BillboardPool
Definition: OgreBillboardSet.h:154
Ogre::BillboardSet::mCamQ
Quaternion mCamQ
Camera orientation in billboard space.
Definition: OgreBillboardSet.h:200
Ogre::BBO_TOP_CENTER
@ BBO_TOP_CENTER
Definition: OgreBillboardSet.h:57
Ogre::SharedPtr< Material >
Ogre::BillboardSet::mIndexData
IndexData * mIndexData
The vertex index data for all billboards in this set (1 set only)
Definition: OgreBillboardSet.h:205
OgreRenderable.h
OgreMovableObject.h
Ogre::BillboardSet::mBillboardType
BillboardType mBillboardType
The type of billboard to render.
Definition: OgreBillboardSet.h:214
Ogre::BillboardSet::_updateBounds
virtual void _updateBounds(void)
Update the bounds of the billboardset.
Ogre::BillboardSet::getDefaultWidth
virtual Real getDefaultWidth(void) const
See setDefaultDimensions - this gets 1 component individually.
Ogre::BillboardSet::mActiveBillboards
ActiveBillboardList mActiveBillboards
Active billboard list.
Definition: OgreBillboardSet.h:164
Ogre::BillboardSet::getUseAccurateFacing
virtual bool getUseAccurateFacing(void) const
Gets whether or not billboards use an 'accurate' facing model based on the vector from each billboard...
Definition: OgreBillboardSet.h:717
Ogre::BillboardSet::mDefaultWidth
Real mDefaultWidth
Default width of each billboard.
Definition: OgreBillboardSet.h:128
Ogre::BillboardSet::getAutoextend
virtual bool getAutoextend(void) const
Returns true if the billboard pool automatically extends.
OgreRadixSort.h
Ogre::BillboardSet::getAutoUpdate
bool getAutoUpdate(void) const
Return the auto update state of this billboard set.
Definition: OgreBillboardSet.h:848
Ogre::BillboardSet::mBoundingRadius
Real mBoundingRadius
Bounding radius.
Definition: OgreBillboardSet.h:120
Ogre::ColourValue
Class representing colour.
Definition: OgreColourValue.h:58
Ogre::BBO_CENTER_RIGHT
@ BBO_CENTER_RIGHT
Definition: OgreBillboardSet.h:61
Ogre::BillboardSet::visitRenderables
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
Ogre::BillboardSet::getTextureCoords
virtual Ogre::FloatRect const * getTextureCoords(uint16 *oNumCoords)
getTextureCoords() returns the current texture coordinate rects in effect.
Ogre::BillboardSet::SortByDirectionFunctor::operator()
float operator()(Billboard *bill) const
Ogre::BillboardSet::SortByDirectionFunctor::SortByDirectionFunctor
SortByDirectionFunctor(const Vector3 &dir)
Ogre::BillboardSet::_notifyCurrentCamera
virtual void _notifyCurrentCamera(Camera *cam)
Overridden from MovableObject.
Ogre::Renderable::Visitor
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
Definition: OgreRenderable.h:378
Ogre::BillboardSet::setDefaultDimensions
virtual void setDefaultDimensions(Real width, Real height)
Sets the default dimensions of the billboards in this set.
Ogre::BillboardSet::getBillboardOrigin
virtual BillboardOrigin getBillboardOrigin(void) const
Gets the point which acts as the origin point for all billboards in this set.
Ogre::RadixSort
Class for performing a radix sort (fast comparison-less sort based on byte value) on various standard...
Definition: OgreRadixSort.h:89
Ogre::BillboardSet::clear
virtual void clear()
Empties this set of all billboards.
Ogre::BillboardSet::setBillboardRotationType
virtual void setBillboardRotationType(BillboardRotationType rotationType)
Sets billboard rotation type.
Ogre::BillboardSet::mRotationType
BillboardRotationType mRotationType
Rotation type of each billboard.
Definition: OgreBillboardSet.h:125
Ogre::BillboardSet::mCommonUpVector
Vector3 mCommonUpVector
Common up-vector for billboards of type BBT_PERPENDICULAR_SELF and BBT_PERPENDICULAR_COMMON.
Definition: OgreBillboardSet.h:219
Ogre::Renderable
Abstract class defining the interface all renderable objects must implement.
Definition: OgreRenderable.h:64
Ogre::BillboardSet::setCommonUpVector
virtual void setCommonUpVector(const Vector3 &vec)
Use this to specify the common up-vector given to billboards of type BBT_PERPENDICULAR_SELF or BBT_PE...
Ogre::BillboardSet::getMovableType
virtual const String & getMovableType(void) const
Overridden from MovableObject.
Ogre::BBO_TOP_LEFT
@ BBO_TOP_LEFT
Definition: OgreBillboardSet.h:56
Ogre::BillboardSet::mMainBuf
HardwareVertexBufferSharedPtr mMainBuf
Shortcut to main buffer (positions, colours, texture coords)
Definition: OgreBillboardSet.h:184
Ogre::BillboardSet::removeBillboard
virtual void removeBillboard(unsigned int index)
Removes the billboard at the supplied index.
Ogre::BillboardSet::mOriginType
BillboardOrigin mOriginType
Origin of each billboard.
Definition: OgreBillboardSet.h:123
Ogre::BillboardSet::createBillboard
Billboard * createBillboard(const Vector3 &position, const ColourValue &colour=ColourValue::White)
Creates a new billboard and adds it to this set.
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::BillboardSet::getWorldTransforms
virtual void getWorldTransforms(Matrix4 *xform) const
Overridden from MovableObject.
Ogre::BillboardSet::genBillboardAxes
void genBillboardAxes(Vector3 *pX, Vector3 *pY, const Billboard *pBill=0)
Internal method for generating billboard corners.
Ogre::BillboardSet::isPointRenderingEnabled
virtual bool isPointRenderingEnabled(void) const
Returns whether point rendering is enabled.
Definition: OgreBillboardSet.h:830
Ogre::BillboardSet::setTextureStacksAndSlices
virtual void setTextureStacksAndSlices(uchar stacks, uchar slices)
setTextureStacksAndSlices() will generate texture coordinate rects as if the texture for the billboar...
Ogre::BillboardSet::getCommonDirection
virtual const Vector3 & getCommonDirection(void) const
Gets the common direction for all billboards (BBT_ORIENTED_COMMON)
Ogre::vector
Definition: OgrePrerequisites.h:492
Ogre::BillboardSet::setCullIndividually
virtual void setCullIndividually(bool cullIndividual)
Sets whether culling tests billboards in this individually as well as in a group.
Ogre::BillboardSet::mMaterial
MaterialPtr mMaterial
Pointer to the material to use.
Definition: OgreBillboardSet.h:135
Ogre::BillboardSet::setMaterialName
virtual void setMaterialName(const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Sets the name of the material to be used for this billboard set.
Ogre::BillboardSet::getBillboard
virtual Billboard * getBillboard(unsigned int index) const
Returns a pointer to the billboard at the supplied index.
Ogre::BillboardSetFactory
Factory object for creating BillboardSet instances.
Definition: OgreBillboardSet.h:860
Ogre::BillboardSet::mAABB
AxisAlignedBox mAABB
Bounds of all billboards in this set.
Definition: OgreBillboardSet.h:118
Ogre::BillboardSet::SortByDistanceFunctor::operator()
float operator()(Billboard *bill) const
Ogre::BillboardSet::mCamPos
Vector3 mCamPos
Camera position in billboard space.
Definition: OgreBillboardSet.h:202
Ogre::IndexData
Summary class collecting together index data source information.
Definition: OgreVertexIndexData.h:243
Ogre::BillboardSet::setDefaultHeight
virtual void setDefaultHeight(Real height)
See setDefaultDimensions - this sets 1 component individually.
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:52
Ogre::BillboardSet::beginBillboards
void beginBillboards(size_t numBillboards=0)
Begin injection of billboard data; applicable when constructing the BillboardSet for external data us...
Ogre::RenderOperation
'New' rendering operation using vertex buffers.
Definition: OgreRenderOperation.h:45
Ogre::BillboardSet::FreeBillboardList
list< Billboard * >::type FreeBillboardList
Definition: OgreBillboardSet.h:153
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:93
Ogre::BBT_POINT
@ BBT_POINT
Standard point billboard (default), always faces the camera completely and is always upright.
Definition: OgreBillboardSet.h:78
Ogre::BillboardSet::getNumBillboards
virtual int getNumBillboards(void) const
Returns the number of active billboards which currently make up this set.
Ogre::BBO_BOTTOM_CENTER
@ BBO_BOTTOM_CENTER
Definition: OgreBillboardSet.h:63
Ogre::BillboardSet::setPointRenderingEnabled
virtual void setPointRenderingEnabled(bool enabled)
Set whether or not the BillboardSet will use point rendering rather than manually generated quads.
Ogre::BBO_CENTER
@ BBO_CENTER
Definition: OgreBillboardSet.h:60
Ogre::BillboardSet::getMaterialName
virtual const String & getMaterialName(void) const
Sets the name of the material to be used for this billboard set.
Ogre::BillboardSet::SortByDistanceFunctor::SortByDistanceFunctor
SortByDistanceFunctor(const Vector3 &pos)

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