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