29 #ifndef __BillboardSet_H__
30 #define __BillboardSet_H__
229 virtual void increasePool(
size_t size);
246 void getParametricOffsets(
Real& left,
Real& right,
Real& top,
Real& bottom);
252 void genVertices(
const Vector3*
const offsets,
const Billboard& pBillboard);
307 void _createBuffers(
void);
310 void _destroyBuffers(
void);
334 bool externalDataSource =
false);
386 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;
Factory object for creating BillboardSet instances.
A viewpoint from which the scene will be rendered.
Real mDefaultHeight
Default height of each billboard.
Class encapsulating a standard 4x4 homogeneous matrix.
VertexData * mVertexData
The vertex position data for all billboards in this set.
float Real
Software floating point type.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Class for performing a radix sort (fast comparison-less sort based on byte value) on various standard...
Vector3 sortPos
Position to sort in.
Vector3 sortDir
Direction to sort in.
Class representing colour.
bool mExternalData
Is external billboard data in use?
Rotate the billboard's texture coordinates.
Billboards are oriented around a shared direction vector (used as Y axis) and only rotate around this...
static const ColourValue White
bool mBuffersCreated
Flag indicating whether the HW buffers have been created.
ActiveBillboardList mActiveBillboards
Active billboard list.
list< Billboard * >::type ActiveBillboardList
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
bool mPointRendering
Use point rendering?
BillboardRotationType
The rotation type of billboard.
String mMaterialName
Name of the material to use.
Shared pointer implementation used to share index buffers.
A 3D box aligned with the x/y/z axes.
bool getAutoUpdate(void) const
Return the auto update state of this billboard set.
Vector3 mCommonDirection
Common direction for billboards of type BBT_ORIENTED_COMMON and BBT_PERPENDICULAR_COMMON.
TextureCoordSets mTextureCoords
Interface definition for a factory class which produces a certain kind of MovableObject, and can be registered with Root in order to allow all clients to produce new instances of this object, integrated with the standard Ogre processing.
bool mAllDefaultSize
True if no billboards in this set have been resized - greater efficiency.
BillboardPool mBillboardPool
Pool of billboard instances for use and reuse in the active billboard list.
Abstract class defining a movable object in a scene.
Billboards are perpendicular to a shared direction vector (used as Z axis, the facing direction) and ...
bool mSortingEnabled
Flag indicating whether the billboards has to be sorted.
unsigned short mNumVisibleBillboards
AxisAlignedBox mAABB
Bounds of all billboards in this set.
Abstract class defining the interface all renderable objects must implement.
Implementation of a Quaternion, i.e.
A collection of billboards (faces which are always facing the given direction) with the same (default...
Real mBoundingRadius
Bounding radius.
FreeBillboardList mFreeBillboards
Free billboard queue.
size_t mPoolSize
The number of billboard in the pool.
Sort by direction functor.
virtual bool getUseAccurateFacing(void) const
Gets whether or not billboards use an 'accurate' facing model based on the vector from each billboard...
Rotate the billboard's vertices around their facing direction.
unsigned char uchar
In order to avoid finger-aches :)
SortMode
Sort mode for billboard-set and particle-system.
Billboards are perpendicular to their own direction vector (their own Z axis, the facing direction) a...
IndexData * mIndexData
The vertex index data for all billboards in this set (1 set only)
Summary class collecting together index data source information.
Camera * mCurrentCamera
Current camera.
virtual bool isPointRenderingEnabled(void) const
Returns whether point rendering is enabled.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
bool mAutoUpdate
Tell if vertex buffer should be update automatically.
Vector3 mCommonUpVector
Common up-vector for billboards of type BBT_PERPENDICULAR_SELF and BBT_PERPENDICULAR_COMMON.
float * mLockPtr
Locked pointer to buffer.
HardwareVertexBufferSharedPtr mMainBuf
Shortcut to main buffer (positions, colours, texture coords)
Standard 3-dimensional vector.
bool mBillboardDataChanged
True if the billboard data changed. Will cause vertex buffer update.
virtual void setUseAccurateFacing(bool acc)
Sets whether or not billboards should use an 'accurate' facing model based on the vector from each bi...
Standard point billboard (default), always faces the camera completely and is always upright...
Summary class collecting together vertex source information.
'New' rendering operation using vertex buffers.
BillboardType mBillboardType
The type of billboard to render.
Sort by distance functor.
void notifyBillboardDataChanged(void)
When billboard set is not auto updating its GPU buffer, the user is responsible to inform it about an...
Class to manage the scene object rendering queue.
bool mAutoExtendPool
Flag indicating whether to autoextend pool.
BillboardOrigin
Enum covering what exactly a billboard's position means (center, top-left etc).
vector< Billboard * >::type BillboardPool
A billboard is a primitive which always faces the camera in every frame.
Billboards are oriented around their own direction vector (their own Y axis) and only rotate around t...
BillboardRotationType mRotationType
Rotation type of each billboard.
list< Billboard * >::type FreeBillboardList
Specialisation of SharedPtr to allow SharedPtr to be assigned to MaterialPtr.
vector< Ogre::FloatRect >::type TextureCoordSets
BillboardOrigin mOriginType
Origin of each billboard.
virtual void setBillboardsInWorldSpace(bool ws)
Sets whether billboards should be treated as being in world space.
bool mCullIndividual
Flag indicating whether each billboard should be culled separately (default: false) ...
MaterialPtr mMaterial
Pointer to the material to use.
static RadixSort< ActiveBillboardList, Billboard *, float > mRadixSorter
Real mDefaultWidth
Default width of each billboard.
static String FACTORY_TYPE_NAME
BillboardType
The type of billboard to use.