Swarm::IEffectsManager class

This class is the main manager of the Swarm effects system.

It allows to create instances of effects. The manager also can be used to create IEffectsWorld, which are the objects that contain the effects. The manager creates instances of effects using the currently active effect world.

Derived classes

class cEffectsManager

Public static functions

static auto Get() -> IEffectsManager*
Gets the active manager of the Swarm system.

Public functions

auto Initialize() -> bool pure virtual
auto Dispose() -> bool pure virtual
auto AddRef() -> int pure virtual
auto Release() -> int pure virtual
auto SetResources(Object*) -> void pure virtual
auto Resources() -> Object* pure virtual
auto SetRenderer(Object*) -> void pure virtual
auto Renderer() -> Object* pure virtual
auto SetDecalManager(void*, int index) -> void pure virtual
auto DecalManager(int index) -> void* pure virtual
auto HasVisualEffect(uint32_t instanceID, uint32_t groupID) const -> bool pure virtual
Returns whether an effect with this instance and group ID exists in any of the effect directories (effdir) in the manager.
auto CreateVisualEffect(uint32_t instanceID, uint32_t groupID, IVisualEffectPtr& dst) -> bool pure virtual
Creates an effect object with this instance and group ID in the default effect world.
auto SetState(SwarmState state) -> void pure virtual
auto State() -> SwarmState pure virtual
auto SetLOD(float value, int = 5) -> void pure virtual
auto SetDefaultTimeline(int timelineType) -> void pure virtual
auto DoUpdate(float, float) -> void pure virtual
auto DoUpdate2(float, float) -> void pure virtual
auto ResetState() -> void pure virtual
auto CreateWorld(uint32_t worldID, int = 0) -> IEffectsWorld* pure virtual
Creates a new IEffectsWorld mapped to the given ID.
auto RemoveWorld(uint32_t worldID) -> void pure virtual
Removes the IEffectsWorld mapped to the given ID from this manager.
auto World(uint32_t worldID) -> IEffectsWorld* pure virtual
Returns the IEffectsWorld mapped to the given ID, or nullptr if the ID is not mapped.
auto SetDefaultWorld(IEffectsWorld* pWorld) -> void pure virtual
Sets the given effect world to be the default one; it does not need to be mapped.
auto DefaultWorld() -> IEffectsWorld* pure virtual
Returns the active effect world.
auto GetWorldIDs(eastl::vector<uint32_t>& dst) -> void pure virtual
auto AddCollection(void*) -> bool pure virtual
auto RemoveCollection(void*) -> bool pure virtual
auto GetResources(uint32_t instanceID, uint32_t groupID, int) -> void* pure virtual
auto GetComponentDescription(int, int, int) -> int pure virtual
auto GetAuxiliaryDescription(int, int, int) -> int pure virtual
auto RegisterSurface(class ResourceID surfaceID, ISurface* pSurface) -> void pure virtual
Maps the given ISurface to the specified ID.
auto Surface(class ResourceID surfaceID) -> ISurface* pure virtual
Gets the ISurface mapped to the specified ID, or nullptr if none is mapped to that ID.
auto RegisterSurfaceName(const char* pName, class ResourceID surfaceID, void* callback) -> void pure virtual
auto SurfaceInfo(class ResourceID surfaceID, void* callback) -> bool pure virtual
auto RegisterMap(class ResourceID mapID, IEffectMap* pMap) -> void pure virtual
auto Map(class ResourceID mapID) -> IEffectMap* pure virtual
auto RegisterMapName(const char* pName, class ResourceID mapID) -> void pure virtual
auto MapID(int) -> ResourceID pure virtual
auto SetAppFlag(int flag, bool bValue) -> void pure virtual
Set the given application flag.
auto AppFlag(int flag) -> bool pure virtual
auto GlobalParams() -> cGlobalParams& pure virtual
auto GlobalParams2() -> cGlobalParams& pure virtual
auto UpdateProperties(void*) -> void pure virtual
auto GetStatsString() -> const char* pure virtual
auto Stats() -> void* pure virtual
auto GetActiveEffectInfo(int, int, int infoLevel) -> void pure virtual
auto GetEffectInfo(cEffectInfo& dst, const char* pName) -> bool pure virtual
auto GetEffectInfo2(eastl::vector<cEffectInfo>& dst, const char* pName) -> bool pure virtual
auto OpenEffectFile(const char* pName) -> bool pure virtual
auto GetEffectDebugName(uint32_t instanceID, uint32_t groupID, int) -> bool pure virtual

Function documentation

bool Swarm::IEffectsManager::HasVisualEffect(uint32_t instanceID, uint32_t groupID) const pure virtual

Returns whether an effect with this instance and group ID exists in any of the effect directories (effdir) in the manager.

Parameters
instanceID The instance ID of the effect.
groupID The group ID of the effect, usually 0.

bool Swarm::IEffectsManager::CreateVisualEffect(uint32_t instanceID, uint32_t groupID, IVisualEffectPtr& dst) pure virtual

Creates an effect object with this instance and group ID in the default effect world.

Parameters
instanceID The instance ID of the effect.
groupID The group ID of the effect, usually 0.
dst out An uninitialized intrusive_ptr<IEffect> where the effect will be put.
Returns True if the effect was found and returned, false otherwise.

The destination is an uninitialized intrusive_ptr; the object must be nullptr or not be initialized, because it will be ignored.

IEffectsWorld* Swarm::IEffectsManager::CreateWorld(uint32_t worldID, int = 0) pure virtual

Creates a new IEffectsWorld mapped to the given ID.

Parameters
worldID The ID the world will be mapped to.

void Swarm::IEffectsManager::RemoveWorld(uint32_t worldID) pure virtual

Removes the IEffectsWorld mapped to the given ID from this manager.

Parameters
worldID The ID the world to remove is mapped to.

If the ID is not mapped, this method does nothing.

IEffectsWorld* Swarm::IEffectsManager::World(uint32_t worldID) pure virtual

Returns the IEffectsWorld mapped to the given ID, or nullptr if the ID is not mapped.

Parameters
worldID The ID the world is mapped to.

An ID of 0 returns the default world.

void Swarm::IEffectsManager::SetDefaultWorld(IEffectsWorld* pWorld) pure virtual

Sets the given effect world to be the default one; it does not need to be mapped.

Parameters
pWorld The world that will be set as active, or nullptr to set the default world.

If the world is nullptr, the default world will be set as active.

void Swarm::IEffectsManager::RegisterSurface(class ResourceID surfaceID, ISurface* pSurface) pure virtual

Maps the given ISurface to the specified ID.

Parameters
surfaceID The ID of the surface.
pSurface

ISurface* Swarm::IEffectsManager::Surface(class ResourceID surfaceID) pure virtual

Gets the ISurface mapped to the specified ID, or nullptr if none is mapped to that ID.

Parameters
surfaceID The ID of the surface.

void Swarm::IEffectsManager::SetAppFlag(int flag, bool bValue) pure virtual

Set the given application flag.

Parameters
flag The flag to set.
bValue The new value of the flag.