Planeshift
|
#include <pseffectmanager.h>
Public Member Functions | |
void | AddEffect (const char *name, psEffect *effect) |
unsigned int | AttachLight (const char *name, const csVector3 &pos, float radius, const csColor &colour, iMeshWrapper *mw) |
void | Clear () |
Clears all effects. | |
bool | DeleteEffect (unsigned int effectID) |
Deletes an effect. | |
void | DetachLight (unsigned int lightID) |
psEffect * | FindEffect (unsigned int ID) const |
Gets the effect with the given ID. | |
psEffect * | FindEffect (const csString &name) const |
Finds an effect by the given name. | |
psEffect2DRenderer * | Get2DRenderer () const |
csHash< psEffect *, csString > ::GlobalIterator | GetEffectsIterator () |
Gets a global iterator that will iterate over all effect factories. | |
iView * | GetView () const |
csPtr< iThreadReturn > | LoadEffects (const csString &fileName, iView *parentView) |
Loads one or more gfx effects from a file. | |
bool | LoadFromDirectory (const csString &path, bool includeSubDirs, iView *parentView) |
Loads all effect files that can be found in a directory path. | |
bool | LoadFromEffectsList (const csString &fileName, iView *parentView) |
Loads the effect files listed in the given effects list. | |
psEffectManager (iObjectRegistry *objReg) | |
void | Render2D (iGraphics3D *g3d, iGraphics2D *g2d) |
unsigned int | RenderEffect (const csString &effectName, const csVector3 &offset, iMeshWrapper *attachPos, iMeshWrapper *attachTarget=0, const csVector3 &up=csVector3(0, 1, 0), const unsigned int uniqueIDOverride=0, bool rotateWithMesh=false, const float *scale=NULL) |
Begins rendering of an effect that is attached to an iMeshWrapper. | |
unsigned int | RenderEffect (const csString &effectName, iSector *sector, const csVector3 &pos, iMeshWrapper *attachTarget, const csVector3 &up=csVector3(0, 1, 0), const unsigned int uniqueIDOverride=0, const float *scale=NULL) |
Begins rendering an effect that isn't attached to anything. | |
unsigned int | RenderEffect (const csString &effectName, iSectorList *sectors, const csVector3 &pos, iMeshWrapper *attachTarget=0, const csVector3 &up=csVector3(0, 1, 0), const unsigned int uniqueIDOverride=0, const float *scale=NULL) |
Begins rendering an effect that isn't attached to anything. | |
void | ShowEffect (unsigned int id, bool value=true) |
Hide or Show the effect. | |
void | Update (csTicks elapsed=0) |
Updates the spell effects (should be called every frame). | |
virtual | ~psEffectManager () |
Definition at line 88 of file pseffectmanager.h.
psEffectManager::psEffectManager | ( | iObjectRegistry * | objReg | ) |
virtual psEffectManager::~psEffectManager | ( | ) | [virtual] |
void psEffectManager::AddEffect | ( | const char * | name, |
psEffect * | effect | ||
) |
unsigned int psEffectManager::AttachLight | ( | const char * | name, |
const csVector3 & | pos, | ||
float | radius, | ||
const csColor & | colour, | ||
iMeshWrapper * | mw | ||
) |
void psEffectManager::Clear | ( | ) |
Clears all effects.
Deletes an effect.
effectID | the unique ID of the effect (as returned by RenderEffect()) |
Gets the effect with the given ID.
ID | the id of the effect (the value returned by RenderEffect) |
psEffect* psEffectManager::FindEffect | ( | const csString & | name | ) | const |
Finds an effect by the given name.
name | the name of the effect to find |
psEffect2DRenderer* psEffectManager::Get2DRenderer | ( | ) | const [inline] |
Definition at line 236 of file pseffectmanager.h.
csHash<psEffect*, csString>::GlobalIterator psEffectManager::GetEffectsIterator | ( | ) |
Gets a global iterator that will iterate over all effect factories.
iView* psEffectManager::GetView | ( | ) | const [inline] |
Definition at line 229 of file pseffectmanager.h.
csPtr<iThreadReturn> psEffectManager::LoadEffects | ( | const csString & | fileName, |
iView * | parentView | ||
) |
Loads one or more gfx effects from a file.
fileName | the vfs path to the file that holds the spell effect |
parentView | the CS viewport that views the effects |
bool psEffectManager::LoadFromDirectory | ( | const csString & | path, |
bool | includeSubDirs, | ||
iView * | parentView | ||
) |
Loads all effect files that can be found in a directory path.
path | The vfs path to search. |
includeSubDirs | If True, it will extend its search into subdirectories. |
parentView | The CS viewport that views the effects. |
bool psEffectManager::LoadFromEffectsList | ( | const csString & | fileName, |
iView * | parentView | ||
) |
Loads the effect files listed in the given effects list.
fileName | the vfs path to the file that holds the effects list |
parentView | the CS viewport that views the effects |
void psEffectManager::Render2D | ( | iGraphics3D * | g3d, |
iGraphics2D * | g2d | ||
) |
unsigned int psEffectManager::RenderEffect | ( | const csString & | effectName, |
iSectorList * | sectors, | ||
const csVector3 & | pos, | ||
iMeshWrapper * | attachTarget = 0 , |
||
const csVector3 & | up = csVector3(0, 1, 0) , |
||
const unsigned int | uniqueIDOverride = 0 , |
||
const float * | scale = NULL |
||
) |
Begins rendering an effect that isn't attached to anything.
effectName | the name of the effect to render |
sectors | the sectors the new effect is in |
pos | the position of the new effect |
attachTarget | the target of the effect, 0 assumes that the target is the same as the offset |
up | the base up vector of the effect |
uniqueIDOverride | overrides the unique ID of the effect (for things like group effects) |
scale | input to the scale params for effects |
unsigned int psEffectManager::RenderEffect | ( | const csString & | effectName, |
const csVector3 & | offset, | ||
iMeshWrapper * | attachPos, | ||
iMeshWrapper * | attachTarget = 0 , |
||
const csVector3 & | up = csVector3(0, 1, 0) , |
||
const unsigned int | uniqueIDOverride = 0 , |
||
bool | rotateWithMesh = false , |
||
const float * | scale = NULL |
||
) |
Begins rendering of an effect that is attached to an iMeshWrapper.
effectName | the name of the effect to render |
offset | the position offset of the effect from the attached object |
attachPos | the object to attach the effect to |
attachTarget | the target of the effect, 0 assumes that the target is the same as the attachPos |
up | the base up vector of the effect |
uniqueIDOverride | overrides the unique ID of the effect (for things like group effects) |
rotateWithMesh | Rotate with the mesh. |
scale | input to the scale params for effects |
unsigned int psEffectManager::RenderEffect | ( | const csString & | effectName, |
iSector * | sector, | ||
const csVector3 & | pos, | ||
iMeshWrapper * | attachTarget, | ||
const csVector3 & | up = csVector3(0, 1, 0) , |
||
const unsigned int | uniqueIDOverride = 0 , |
||
const float * | scale = NULL |
||
) |
Begins rendering an effect that isn't attached to anything.
effectName | the name of the effect to render |
sector | the starting sector of the new effect |
pos | the position of the new effect |
attachTarget | the target of the effect, 0 assumes that the target is the same as the offset |
up | the base up vector of the effect |
uniqueIDOverride | overrides the unique ID of the effect (for things like group effects) |
scale | input to the scale params for effects |
Hide or Show the effect.
id | effect ID |
value | show or hide |
void psEffectManager::Update | ( | csTicks | elapsed = 0 | ) |
Updates the spell effects (should be called every frame).
elapsed | the time in ms that has elapsed |