OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::BillboardSet Class Reference

A BillboardSet is just a ParticleSystemDef directly exposed to the user but without emitters, affectors and time to live. More...

#include <OgreBillboardSet2.h>

+ Inheritance diagram for Ogre::BillboardSet:

Public Member Functions

 BillboardSet (IdType id, ObjectMemoryManager *objectMemoryManager, SceneManager *manager, ParticleSystemManager2 *particleSystemManager)
 
Billboard allocBillboard ()
 
void deallocBillboard (Billboard billboard)
 
void deallocBillboard (uint32 handle)
 
RenderablegetAsRenderable ()
 
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. More...
 
- Public Member Functions inherited from Ogre::ParticleSystemDef
 ParticleSystemDef (IdType id, ObjectMemoryManager *objectMemoryManager, SceneManager *ogre_nullable manager, ParticleSystemManager2 *particleSystemManager, const String &name, const bool bIsBillboardSet)
 
 ~ParticleSystemDef () override
 
ParticleSystem2_createParticleSystem (ObjectMemoryManager *objectMemoryManager)
 For internal use. Don't call this directly. See SceneManager::createParticleSystem2. More...
 
void _destroy (VaoManager *ogre_nullable vaoManager)
 
void _destroyAllParticleSystems ()
 For internal use. Don't call this directly. See SceneManager::destroyAllParticleSystems2. More...
 
void _destroyParticleSystem (ParticleSystem2 *system)
 For internal use. Don't call this directly. See SceneManager::destroyParticleSystem2. More...
 
ConstBufferPacked_getGpuCommonBuffer () const
 
ReadOnlyBufferPacked_getGpuDataBuffer () const
 
void _notifyAttached (Node *parent) override
 Overridden from MovableObject. More...
 
ParticleAffector2addAffector (IdString name)
 
EmitterDefDataaddEmitter (IdString name)
 
ParticleSystemDefclone (const String &newName, ParticleSystemManager2 *ogre_nullable dstManager=0)
 Clones this ParticleSystemDef with a new name into a new ParticleSystemManager2. More...
 
const FastArray< ParticleAffector2 * > & getAffectors () const
 
const Vector3getCommonDirection () const
 Returns the common direction for all particles. See setCommonDirection(). More...
 
const Vector3getCommonUpVector () const
 Gets the common up-vector for all particles. See setCommonUpVector(). More...
 
const FastArray< EmitterDefData * > & getEmitters () const
 
const LightListgetLights () const override
 Gets a list of lights, ordered relative to how close they are to this renderable. More...
 
const String getName () const
 
size_t getNumAffectors () const
 
size_t getNumEmitters () const
 
size_t getNumSimdActiveParticles () const
 Returns the number of active particles rounded up to match up SIMD processing. More...
 
ParticleCpuData getParticleCpuData () const
 
size_t getParticlesToRenderTighter () const
 Like getNumSimdActiveParticles(), we have to consider SIMD. More...
 
ParticleType::ParticleType getParticleType () const override
 Used by ParticleSystemDef to indicate Hlms they want specific shader code. More...
 
uint32 getQuota () const
 
void getRenderOperation (v1::RenderOperation &op, bool casterPass) override
 Gets the render operation required to send this object to the frame buffer. More...
 
ParticleRotationType::ParticleRotationType getRotationType () const
 
bool getUseIdentityWorldMatrix () const override
 Returns whether the world matrix is an identity matrix. More...
 
void getWorldTransforms (Matrix4 *xform) const override
 Gets the world transform matrix / matrices for this renderable object. More...
 
void init (VaoManager *vaoManager)
 
bool isInitialized () const
 
void reserveNumAffectors (size_t numAffectors)
 If you know in advance how many times you will call addAffector() call this function to achieve optimum memory use. More...
 
void reserveNumEmitters (size_t numEmitters)
 If you know in advance how many times you will call addEmitter() call this function to achieve optimum memory use. More...
 
void setCommonDirection (const Vector3 &vec)
 Use this to specify the common direction given to particles when type is ParticleType::OrientedCommon and ParticleType::PerpendicularCommon. More...
 
void setCommonUpVector (const Vector3 &vec)
 Use this to specify the common up-vector given to billboards of type ParticleType::PerpendicularCommon and ParticleType::PerpendicularSelf. More...
 
void setCommonVectors (const Vector3 &commonDir, const Vector3 &commonUp)
 See setCommonDirection() and setCommonUpVector(). More...
 
void setParticleQuota (size_t quota) override
 Sets the maximum number of particles this system is allowed to have active at once. More...
 
void setParticleType (ParticleType::ParticleType particleType)
 
void setRotationType (ParticleRotationType::ParticleRotationType rotationType)
 
- Public Member Functions inherited from Ogre::ParticleSystem
 ParticleSystem (IdType id, ObjectMemoryManager *objectMemoryManager, SceneManager *manager, const String &resourceGroupName, uint8 renderQueueId=110u, bool bCreateRenderer=true)
 Creates a particle system with no emitters or affectors. More...
 
virtual ~ParticleSystem () override
 
ParticleIterator _getIterator ()
 Returns an iterator for stepping through all particles in this system. More...
 
void _notifyOrigin (const String &origin)
 Notify this particle system of it's origin. More...
 
virtual void _notifyParticleResized ()
 Internal callback used by Particles to notify their parent that they have been resized. More...
 
virtual void _notifyParticleRotated ()
 Internal callback used by Particles to notify their parent that they have been rotated. More...
 
void _update (Real timeElapsed)
 Updates the particles in the system based on time elapsed. More...
 
void _updateBounds ()
 Internal method for updating the bounds of the particle system. More...
 
void _updateRenderQueue (RenderQueue *queue, Camera *camera, const Camera *lodCamera) override
 Overridden from MovableObject. More...
 
ParticleAffectoraddAffector (const String &affectorType)
 Adds an affector to this particle system. More...
 
ParticleEmitteraddEmitter (const String &emitterType)
 Adds an emitter to this particle system. More...
 
void clear ()
 Empties this set of all particles. More...
 
ParticlecreateEmitterParticle (const String &emitterName)
 Manually add an emitter particle to the system. More...
 
ParticlecreateParticle ()
 Manually add a particle to the system. More...
 
void fastForward (Real time, Real interval=Real(0.1))
 Fast-forwards this system by the required number of seconds. More...
 
ParticleAffectorgetAffector (unsigned short index) const
 Retrieves an affector by it's index (zero-based). More...
 
virtual bool getCullIndividually () const
 Returns whether or not particles in this are tested individually for culling. More...
 
virtual Real getDefaultHeight () const
 See setDefaultDimensions - this gets 1 component individually. More...
 
virtual Real getDefaultWidth () const
 See setDefaultDimensions - this gets 1 component individually. More...
 
size_t getEmittedEmitterQuota () const
 Returns the maximum number of emitted emitters this system is allowed to have active at once. More...
 
ParticleEmittergetEmitter (unsigned short index) const
 Retrieves an emitter by it's index (zero-based). More...
 
bool getEmitting () const
 Returns true if the particle system emitting flag is turned on. More...
 
Real getIterationInterval () const
 Gets a 'iteration interval' on this particle system. More...
 
bool getKeepParticlesInLocalSpace () const
 Gets whether particles (and any affector effects) remain relative to the node the particle system is attached to. More...
 
virtual const StringgetMaterialName () const
 Sets the name of the material to be used for this billboard set. More...
 
const StringgetMovableType () const override
 Overridden from MovableObject. More...
 
Real getNonVisibleUpdateTimeout () const
 Gets when the particle system should stop updating after it hasn't been visible for a while. More...
 
unsigned short getNumAffectors () const
 Returns the number of affectors for this particle system. More...
 
unsigned short getNumEmitters () const
 Returns the number of emitters for this particle system. More...
 
size_t getNumParticles () const
 Gets the number of individual particles in the system right now. More...
 
const StringgetOrigin () const
 Get the origin of this particle system, e.g. More...
 
ParticlegetParticle (size_t index)
 Retrieve a particle from the system for manual tweaking. More...
 
SceneNodegetParticleEmitterRootNode () const
 This is used to attach the particle Emmiters to an own node independent from the Scenenode the Particlesystem is attached to. More...
 
size_t getParticleQuota () const
 Returns the maximum number of particles this system is allowed to have active at once. More...
 
ParticleSystemRenderergetRenderer () const
 Gets the ParticleRenderer to be used to render this particle system. More...
 
const StringgetRendererName () const
 Gets the name of the ParticleRenderer to be used to render this particle system. More...
 
virtual const StringgetResourceGroupName () const
 Return the resource group to be used to load dependent resources. More...
 
bool getSortingEnabled () const
 Gets whether particles are sorted relative to the camera. More...
 
Real getSpeedFactor () const
 Gets the 'speed factor' on this particle system. More...
 
bool getTranslateParticleDirectionIntoWorldSpace () const
 Gets whether particles emitts in direction with is translated into worldspace or not (may only apply to some settings in regards of settings "Localspace" and "ParticleEmitterRootNode") More...
 
ParticleSystemoperator= (const ParticleSystem &rhs)
 Assignment operator for copying. More...
 
void removeAffector (unsigned short index)
 Removes an affector from the system. More...
 
void removeAllAffectors ()
 Removes all the affectors from this system. More...
 
void removeAllEmitters ()
 Removes all the emitters from this system. More...
 
void removeEmitter (ParticleEmitter *emitter)
 Removes an emitter from the system. More...
 
void removeEmitter (unsigned short index)
 Removes an emitter from the system. More...
 
void setBoundsAutoUpdated (bool autoUpdate, Real stopIn=0.0f)
 Sets whether the bounds will be automatically updated for the life of the particle system. More...
 
virtual void setCullIndividually (bool cullIndividual)
 Sets whether culling tests particles in this individually as well as in a group. More...
 
virtual void setDefaultDimensions (Real width, Real height)
 Sets the default dimensions of the particles in this set. More...
 
virtual void setDefaultHeight (Real height)
 See setDefaultDimensions - this sets 1 component individually. More...
 
virtual void setDefaultWidth (Real width)
 See setDefaultDimensions - this sets 1 component individually. More...
 
void setEmittedEmitterQuota (size_t quota)
 Sets the maximum number of emitted emitters this system is allowed to have active at once. More...
 
void setEmitting (bool v)
 This is used to turn on or off particle emission for this system. More...
 
void setIterationInterval (Real iterationInterval)
 Sets a 'iteration interval' on this particle system. More...
 
void setKeepParticlesInLocalSpace (bool keepLocal)
 Sets whether particles (and any affector effects) remain relative to the node the particle system is attached to. More...
 
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. More...
 
void setNonVisibleUpdateTimeout (Real timeout)
 Sets when the particle system should stop updating after it hasn't been visible for a while. More...
 
void setParticleEmitterRootNode (SceneNode *sceneNode)
 This is used to attach the particle Emmiters to an own node independent from the Scenenode the Particlesystem is attached to. More...
 
void setRenderer (const String &typeName)
 Sets the ParticleRenderer to be used to render this particle system. More...
 
void setRenderQueueGroup (uint8 queueID) override
 Sets the render queue group this entity will be rendered through. More...
 
void setRenderQueueSubGroup (uint8 subGroup)
 Sets the render queue sub group. More...
 
void setSortingEnabled (bool enabled)
 Set whether or not particles are sorted according to the camera. More...
 
void setSpeedFactor (Real speedFactor)
 Sets a 'speed factor' on this particle system, which means it scales the elapsed real time which has passed by this factor before passing it to the emitters, affectors, and the particle life calculation. More...
 
void setTranslateParticleDirectionIntoWorldSpace (bool value)
 Sets whether particles emitts in direction with is translated into worldspace or not (may only apply to some settings in regards of settings "Localspace" and "ParticleEmitterRootNode") More...
 
- Public Member Functions inherited from Ogre::StringInterface
 StringInterface ()
 
virtual ~StringInterface ()
 Virtual destructor, see Effective C++. More...
 
virtual void copyParametersTo (StringInterface *dest) const
 Method for copying this object's parameters to another object. More...
 
ParamDictionarygetParamDictionary ()
 Retrieves the parameter dictionary for this class. More...
 
const ParamDictionarygetParamDictionary () const
 
virtual String getParameter (const String &name) const
 Generic parameter retrieval method. More...
 
const ParameterListgetParameters () const
 Retrieves a list of parameters valid for this object. More...
 
virtual bool setParameter (const String &name, const String &value)
 Generic parameter setting method. More...
 
virtual void setParameterList (const NameValuePairList &paramList)
 Generic multiple parameter setting method. More...
 
- Public Member Functions inherited from Ogre::MovableObject
 MovableObject (IdType id, ObjectMemoryManager *objectMemoryManager, SceneManager *manager, uint8 renderQueueId)
 Constructor. More...
 
 MovableObject (ObjectData *objectDataPtrs)
 Don't use this constructor unless you know what you're doing. More...
 
virtual ~MovableObject ()
 Virtual destructor - read Scott Meyers if you don't know why this is needed. More...
 
LightList_getLightList ()
 Returns a pointer to the current list of lights for this object. More...
 
SceneManager_getManager () const
 Get the manager of this object, if any (internal use only) More...
 
ObjectData_getObjectData ()
 Returns a direct access to the ObjectData state. More...
 
const Matrix4_getParentNodeFullTransform () const
 Returns the full transformation of the parent sceneNode or the attachingPoint node. More...
 
void _notifyManager (SceneManager *man)
 Notify the object of it's manager (internal use only) More...
 
virtual void _notifyParentNodeMemoryChanged ()
 
virtual void _notifyStaticDirty () const
 Called by SceneManager when it is telling we're a static MovableObject being dirty Don't call this directly. More...
 
virtual void _releaseManualHardwareResources ()
 Notifies the movable object that hardware resources were lost. More...
 
virtual void _restoreManualHardwareResources ()
 Notifies the movable object that hardware resources should be restored. More...
 
void addQueryFlags (uint32 flags)
 As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object. More...
 
void addVisibilityFlags (uint32 flags)
 As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on this object. More...
 
void detachFromParent ()
 Detaches an object from a parent SceneNode if attached. More...
 
RealAsUint getCachedDistanceToCamera () const
 Returns the distance to camera as calculated in cullFrustum() More...
 
Real getCachedDistanceToCameraAsReal () const
 Returns the distance to camera as calculated in cullFrustum() More...
 
bool getCastShadows () const
 Returns whether shadow casting is enabled for this object. More...
 
unsigned char getCurrentMeshLod () const
 
uint32 getLightMask () const
 Get a bitwise mask which will filter the lights affecting this object. More...
 
ListenergetListener () const
 Gets the current listener for this object. More...
 
Aabb getLocalAabb () const
 Retrieves the local axis-aligned bounding box for this object. More...
 
float getLocalRadius () const
 See getLocalAabb and getWorldRadius. More...
 
const StringgetName () const
 Returns the name of this object. More...
 
NodegetParentNode () const
 Returns the node to which this object is attached. More...
 
SceneNodegetParentSceneNode () const
 
uint32 getQueryFlags () const
 Returns the query flags relevant for this object. More...
 
Real getRenderingDistance () const
 Gets the distance at which batches are no longer rendered. More...
 
Real getRenderingMinPixelSize () const
 Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered. More...
 
uint8 getRenderQueueGroup () const
 Gets the queue group for this entity, see setRenderQueueGroup for full details. More...
 
Real getShadowRenderingDistance () const
 Gets the distance at which batches are no longer casting shadows. More...
 
SkeletonInstancegetSkeletonInstance () const
 
UserObjectBindingsgetUserObjectBindings ()
 Return an instance of user objects binding associated with this class. More...
 
const UserObjectBindingsgetUserObjectBindings () const
 Return an instance of user objects binding associated with this class. More...
 
uint32 getVisibilityFlags () const
 Returns the visibility flags relevant for this object. More...
 
bool getVisible () const
 Gets this object whether to be visible or not, if it has a renderable component. More...
 
Aabb getWorldAabb () const
 Gets the axis aligned box in world space. More...
 
Aabb getWorldAabbUpdated ()
 Gets the axis aligned box in world space. More...
 
float getWorldRadius () const
 Gets the bounding Radius scaled by max( scale.x, scale.y, scale.z ). More...
 
float getWorldRadiusUpdated ()
 Gets the bounding Radius scaled by max( scale.x, scale.y, scale.z ). More...
 
virtual void instanceBatchCullFrustumThreaded (const Frustum *frustum, const Camera *lodCamera, uint32 combinedVisibilityFlags)
 
bool isAttached () const
 Returns true if this object is attached to a Node. More...
 
bool isStatic () const
 Checks whether this MovableObject is static. More...
 
bool isVisible () const
 Returns whether or not this object is supposed to be visible or not. More...
 
const LightListqueryLights () const
 Gets a list of lights, ordered relative to how close they are to this movable object. More...
 
void removeQueryFlags (uint32 flags)
 As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object. More...
 
void removeVisibilityFlags (uint32 flags)
 As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on this object. More...
 
void resetMeshLod ()
 Sets mCurrentMeshLod to 0. More...
 
void setCastShadows (bool enabled)
 Sets whether or not this object will cast shadows. More...
 
void setLightMask (uint32 lightMask)
 Set a bitwise mask which will filter the lights affecting this object. More...
 
void setListener (Listener *listener)
 Sets a listener for this object. More...
 
void setLocalAabb (const Aabb box)
 Sets the local axis-aligned bounding box for this object. More...
 
void setName (const String &name)
 Sets a custom name for this node. More...
 
void setQueryFlags (uint32 flags)
 Sets the query flags for this object. More...
 
void setRenderingDistance (Real dist)
 Sets the distance at which the object is no longer rendered. More...
 
void setRenderingMinPixelSize (Real pixelSize)
 Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered. More...
 
void setShadowRenderingDistance (Real dist)
 Sets the distance at which the object is no longer casting shadows. More...
 
bool setStatic (bool bStatic)
 Turns this Node into static or dynamic. More...
 
void setVisibilityFlags (uint32 flags)
 Sets the visibility flags for this object. More...
 
void setVisible (bool visible)
 Tells this object whether to be visible or not, if it has a renderable component. More...
 
- Public Member Functions inherited from Ogre::AnimableObject
 AnimableObject ()
 
virtual ~AnimableObject ()
 
virtual AnimableValuePtr createAnimableValue (const String &valueName)
 Create a reference-counted AnimableValuePtr for the named value. More...
 
const StringVectorgetAnimableValueNames () const
 Gets a list of animable value names for this object. More...
 
- Public Member Functions inherited from Ogre::IdObject
 IdObject (IdType id)
 We don't call generateNewId() here, to prevent objects in the stack (i.e. More...
 
IdType getId () const
 Get the unique id of this object. More...
 
bool operator() (const IdObject &left, const IdObject &right)
 
bool operator() (const IdObject *left, const IdObject *right)
 

Additional Inherited Members

- Public Types inherited from Ogre::MovableObject
typedef FastArray< MovableObject * > MovableObjectArray
 
- Static Public Member Functions inherited from Ogre::ParticleSystemDef
static const ParticleSystemDefcastFromRenderable (const Renderable *a)
 
static RenderablecastToRenderable (ParticleSystemDef *a)
 
- Static Public Member Functions inherited from Ogre::ParticleSystem
static Real getDefaultIterationInterval ()
 Get the default iteration interval for all ParticleSystem instances. More...
 
static Real getDefaultNonVisibleUpdateTimeout ()
 Get the default nonvisible timeout for all ParticleSystem instances. More...
 
static void setDefaultIterationInterval (Real iterationInterval)
 Set the default iteration interval for all ParticleSystem instances. More...
 
static void setDefaultNonVisibleUpdateTimeout (Real timeout)
 Set the default nonvisible timeout for all ParticleSystem instances. More...
 
- Static Public Member Functions inherited from Ogre::StringInterface
static void cleanupDictionary ()
 Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. More...
 
- Static Public Member Functions inherited from Ogre::MovableObject
static void buildLightList (const size_t numNodes, ObjectData t, const LightListInfo &globalLightList)
 
static void calculateCastersBox (const size_t numNodes, ObjectData t, uint32 sceneVisibilityFlags, AxisAlignedBox *outBox)
 
static void cullFrustum (const size_t numNodes, ObjectData t, const Camera *frustum, MovableObjectArray &outCulledObjects, const CullFrustumPreparedData &pd)
 
static void cullFrustumPrepare (const Camera *frustum, uint32 sceneVisibilityFlags, const Camera *lodCamera, CullFrustumPreparedData &pd)
 
static void cullLights (const size_t numNodes, ObjectData t, uint32 sceneLightMask, LightListInfo &outGlobalLightList, const FrustumVec &frustums, const FrustumVec &cubemapFrustums)
 See SceneManager::cullLights & see MovableObject::cullFrustum. More...
 
static uint32 getDefaultLightMask ()
 Get the default light mask for all future MovableObject instances. More...
 
static uint32 getDefaultQueryFlags ()
 Get the default query flags for all future MovableObject instances. More...
 
static uint32 getDefaultVisibilityFlags ()
 Get the default visibility flags for all future MovableObject instances. More...
 
static void setDefaultLightMask (uint32 mask)
 Set the default light mask for all future MovableObject instances. More...
 
static void setDefaultQueryFlags (uint32 flags)
 Set the default query flags for all future MovableObject instances. More...
 
static void setDefaultVisibilityFlags (uint32 flags)
 Set the default visibility flags for all future MovableObject instances. More...
 
static void updateAllBounds (const size_t numNodes, ObjectData t)
 
- Public Attributes inherited from Ogre::MovableObject
size_t mGlobalIndex
 Index in the vector holding this MO reference (could be our parent node, or a global array tracking all movable objecst to avoid memory leaks). More...
 
size_t mParentIndex
 Index in the vector holding this MO reference (could be our parent node, or a global array tracking all movable objecst to avoid memory leaks). More...
 
RenderableArray mRenderables
 
- Static Public Attributes inherited from Ogre::ParticleSystemDef
static constexpr uint32 InvalidHandle = 0xFFFFFFFF
 
- Static Public Attributes inherited from Ogre::MovableObject
static const FastArray< Realc_DefaultLodMesh
 

Detailed Description

A BillboardSet is just a ParticleSystemDef directly exposed to the user but without emitters, affectors and time to live.

Why isn't it the reverse? (i.e. a ParticleSystemDef should derive from BillboardSet2, making it a more specialized version with extra features).

Well 2 simple reasons:

  1. The code started out as a ParticleSystemDef first.
  2. ParticleSystemDef are tied to shader generation (i.e. Hlms & RenderQueues) because geometry generation happens in shaders (instead of the CPU). This means it's easier for Hlms to downcast to ParticleSystemDef (which offers full functionality) and generate the shader based on available features, rather than first downcast to a BillboardSet2 and then to ParticleSystemDef.

Use setParticleQuota() to define how many billboards this set can contain.

Constructor & Destructor Documentation

◆ BillboardSet()

Ogre::BillboardSet::BillboardSet ( IdType  id,
ObjectMemoryManager objectMemoryManager,
SceneManager manager,
ParticleSystemManager2 particleSystemManager 
)
inline

Member Function Documentation

◆ allocBillboard()

Billboard Ogre::BillboardSet::allocBillboard ( )

◆ deallocBillboard() [1/2]

void Ogre::BillboardSet::deallocBillboard ( Billboard  billboard)

◆ deallocBillboard() [2/2]

void Ogre::BillboardSet::deallocBillboard ( uint32  handle)
inline

References deallocBillboard().

Referenced by deallocBillboard().

◆ getAsRenderable()

Renderable* Ogre::BillboardSet::getAsRenderable ( )
inline

◆ setMaterialName()

virtual void Ogre::ParticleSystem::setMaterialName

Sets the name of the material to be used for this billboard set.

Parameters
nameThe new name of the material to use for this set.

The documentation for this class was generated from the following file: