Go to the documentation of this file.
29 #ifndef __BillboardSet_H__
30 #define __BillboardSet_H__
228 virtual void increasePool(
size_t size);
245 void getParametricOffsets(
Real& left,
Real& right,
Real& top,
Real& bottom);
251 void genVertices(
const Vector3*
const offsets,
const Billboard& pBillboard);
306 void _createBuffers(
void);
309 void _destroyBuffers(
void);
333 bool externalDataSource =
false);
385 virtual int getNumBillboards(
void)
const;
402 virtual void setAutoextend(
bool autoextend);
408 virtual bool getAutoextend(
void)
const;
413 virtual void setSortingEnabled(
bool sortenable);
419 virtual bool getSortingEnabled(
void)
const;
431 virtual void setPoolSize(
size_t size);
439 virtual unsigned int getPoolSize(
void)
const;
444 virtual void clear();
457 virtual Billboard* getBillboard(
unsigned int index)
const;
463 virtual void removeBillboard(
unsigned int index);
469 virtual void removeBillboard(
Billboard* pBill);
517 virtual void setDefaultDimensions(
Real width,
Real height);
520 virtual void setDefaultWidth(
Real width);
522 virtual Real getDefaultWidth(
void)
const;
524 virtual void setDefaultHeight(
Real height);
526 virtual Real getDefaultHeight(
void)
const;
537 virtual const String& getMaterialName(
void)
const;
543 virtual void _notifyCurrentCamera(
Camera* cam);
550 void beginBillboards(
size_t numBillboards = 0);
552 void injectBillboard(
const Billboard& bb);
554 void endBillboards(
void);
573 virtual Real getBoundingRadius(
void)
const;
578 virtual void _updateRenderQueue(
RenderQueue* queue);
584 virtual const MaterialPtr& getMaterial(
void)
const;
590 virtual void setMaterial(
const MaterialPtr& material );
602 virtual void getWorldTransforms(
Matrix4* xform)
const;
606 virtual void _notifyBillboardResized(
void);
610 virtual void _notifyBillboardRotated(
void);
613 virtual bool getCullIndividually(
void)
const;
634 virtual void setCullIndividually(
bool cullIndividual);
675 virtual void setCommonDirection(
const Vector3& vec);
678 virtual const Vector3& getCommonDirection(
void)
const;
694 virtual void setCommonUpVector(
const Vector3& vec);
697 virtual const Vector3& getCommonUpVector(
void)
const;
720 virtual const String& getMovableType(
void)
const;
723 Real getSquaredViewDepth(
const Camera* cam)
const;
726 virtual void _updateBounds(
void);
732 bool debugRenderables =
false);
735 virtual void _sortBillboards(
Camera* cam);
738 virtual SortMode _getSortMode(
void)
const;
789 virtual void setTextureStacksAndSlices(
uchar stacks,
uchar slices );
827 virtual void setPointRenderingEnabled(
bool enabled);
831 {
return mPointRendering; }
834 uint32 getTypeFlags(
void)
const;
845 void setAutoUpdate(
bool autoUpdate);
869 const String& getType(
void)
const;
880 #endif // __BillboardSet_H__
VertexData * mVertexData
The vertex position data for all billboards in this set.
virtual void setUseAccurateFacing(bool acc)
Sets whether or not billboards should use an 'accurate' facing model based on the vector from each bi...
bool mPointRendering
Use point rendering?
bool mAllDefaultSize
True if no billboards in this set have been resized - greater efficiency.
bool mCullIndividual
Flag indicating whether each billboard should be culled separately (default: false)
A billboard is a primitive which always faces the camera in every frame.
unsigned short mNumVisibleBillboards
Number of visible billboards (will be == getNumBillboards if mCullIndividual == false)
vector< Ogre::FloatRect >::type TextureCoordSets
BillboardPool mBillboardPool
Pool of billboard instances for use and reuse in the active billboard list.
Vector3 mCommonDirection
Common direction for billboards of type BBT_ORIENTED_COMMON and BBT_PERPENDICULAR_COMMON.
Billboards are perpendicular to their own direction vector (their own Z axis, the facing direction) a...
A viewpoint from which the scene will be rendered.
BillboardType
The type of billboard to use.
TextureCoordSets mTextureCoords
bool mSortingEnabled
Flag indicating whether the billboards has to be sorted.
Real mDefaultHeight
Default height of each billboard.
Billboards are perpendicular to a shared direction vector (used as Z axis, the facing direction) and ...
Vector3 sortDir
Direction to sort in.
bool mAutoExtendPool
Flag indicating whether to autoextend pool.
Abstract class defining a movable object in a scene.
void notifyBillboardDataChanged(void)
When billboard set is not auto updating its GPU buffer, the user is responsible to inform it about an...
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
float * mLockPtr
Locked pointer to buffer.
A collection of billboards (faces which are always facing the given direction) with the same (default...
size_t mPoolSize
The number of billboard in the pool.
bool mBuffersCreated
Flag indicating whether the HW buffers have been created.
Interface definition for a factory class which produces a certain kind of MovableObject,...
Rotate the billboard's texture coordinates.
SortMode
Sort mode for billboard-set and particle-system.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
bool mAutoUpdate
Tell if vertex buffer should be update automatically.
virtual void setBillboardsInWorldSpace(bool ws)
Sets whether billboards should be treated as being in world space.
Summary class collecting together vertex source information.
Implementation of a Quaternion, i.e.
Class encapsulating a standard 4x4 homogeneous matrix.
static RadixSort< ActiveBillboardList, Billboard *, float > mRadixSorter
bool mAccurateFacing
Use 'true' billboard to cam position facing, rather than camera direcion.
Billboards are oriented around a shared direction vector (used as Y axis) and only rotate around this...
bool mBillboardDataChanged
True if the billboard data changed. Will cause vertex buffer update.
String mMaterialName
Name of the material to use.
FreeBillboardList mFreeBillboards
Free billboard queue.
Shared pointer implementation used to share vertex buffers.
unsigned char uchar
In order to avoid finger-aches :)
Rotate the billboard's vertices around their facing direction.
bool mExternalData
Is external billboard data in use?
Vector3 sortPos
Position to sort in.
Billboards are oriented around their own direction vector (their own Y axis) and only rotate around t...
static String FACTORY_TYPE_NAME
A 3D box aligned with the x/y/z axes.
Sort by direction functor.
Sort by distance functor.
Camera * mCurrentCamera
Current camera.
BillboardOrigin
Enum covering what exactly a billboard's position means (center, top-left etc).
Vector3 mCamDir
Camera direction in billboard space.
static const ColourValue White
BillboardRotationType
The rotation type of billboard.
list< Billboard * >::type ActiveBillboardList
vector< Billboard * >::type BillboardPool
Quaternion mCamQ
Camera orientation in billboard space.
IndexData * mIndexData
The vertex index data for all billboards in this set (1 set only)
BillboardType mBillboardType
The type of billboard to render.
ActiveBillboardList mActiveBillboards
Active billboard list.
virtual bool getUseAccurateFacing(void) const
Gets whether or not billboards use an 'accurate' facing model based on the vector from each billboard...
Real mDefaultWidth
Default width of each billboard.
bool getAutoUpdate(void) const
Return the auto update state of this billboard set.
Real mBoundingRadius
Bounding radius.
Class representing colour.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
Class for performing a radix sort (fast comparison-less sort based on byte value) on various standard...
BillboardRotationType mRotationType
Rotation type of each billboard.
Vector3 mCommonUpVector
Common up-vector for billboards of type BBT_PERPENDICULAR_SELF and BBT_PERPENDICULAR_COMMON.
Abstract class defining the interface all renderable objects must implement.
HardwareVertexBufferSharedPtr mMainBuf
Shortcut to main buffer (positions, colours, texture coords)
BillboardOrigin mOriginType
Origin of each billboard.
float Real
Software floating point type.
virtual bool isPointRenderingEnabled(void) const
Returns whether point rendering is enabled.
MaterialPtr mMaterial
Pointer to the material to use.
Factory object for creating BillboardSet instances.
AxisAlignedBox mAABB
Bounds of all billboards in this set.
Vector3 mCamPos
Camera position in billboard space.
Summary class collecting together index data source information.
Standard 3-dimensional vector.
'New' rendering operation using vertex buffers.
list< Billboard * >::type FreeBillboardList
Class to manage the scene object rendering queue.
Standard point billboard (default), always faces the camera completely and is always upright.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.