Planeshift
|
The effect class. More...
#include <pseffect.h>
Classes | |
class | psEffectMovableListener |
This makes the anchoring to an iMovable possible by being informed of every change to the iMovable. | |
Public Member Functions | |
size_t | AddAnchor (psEffectAnchor *anchor) |
Adds an effect anchor to this effect. | |
psEffect * | Clone () const |
Clones the effect. | |
psEffectAnchor * | CreateAnchor (const csString &type) |
Creates an effect anchor given a type string. | |
psEffectAnchor * | FindAnchor (const csString &anchorName) const |
Finds an effect anchor of the given name. | |
psEffectObj * | FindObj (const csString &objName) const |
Finds an effect obj of the given name. | |
psEffectAnchor * | GetAnchor (size_t idx) const |
Returns the effect anchor at the given index. | |
size_t | GetAnchorCount () const |
Returns the number of effect anchors in this effect. | |
float | GetAnimLength () const |
Returns the animation length of the effect. | |
int | GetKillTime () const |
Returns the time after which this effect will be killed. | |
psEffectObjTextable * | GetMainTextObj () const |
const csString & | GetName () const |
Gets the name of the effect. | |
psEffectObj * | GetObj (size_t idx) const |
Returns the effect obj at the given index. | |
size_t | GetObjCount () const |
Returns the number of effect objs in this effect. | |
unsigned int | GetUniqueID () const |
Returns the uniqueID of this effect. | |
void | Hide () |
Hides the effect. | |
bool | IsVisible () |
Returns visibility value. | |
bool | Load (iDocumentNode *node, iView *parentView, psEffect2DRenderer *renderer2d, iLoaderContext *ldr_context) |
Loads the effect from an xml node. | |
psEffect () | |
Constructor. | |
unsigned int | Render (iSectorList *sectors, const csVector3 &offset, iMeshWrapper *attachPos, iMeshWrapper *attachTarget, const csVector3 &up, const unsigned int uniqueIDOverride=0, bool rotateWithMesh=false) |
Renders the effect. | |
unsigned int | Render (iSector *sector, const csVector3 &offset, iMeshWrapper *attachPos, iMeshWrapper *attachTarget, const csVector3 &up, const unsigned int uniqueIDOverride=0) |
Renders the effect. | |
bool | SetFrameParamScalings (const float *scale) |
Set the scalings for each frame parameter. | |
void | SetKillTime (const int newKillTime) |
Sets the time after which this effect will be killed. | |
void | SetScaling (float scale, float aspect) |
Some effects use these scaling parameters to scale the object. | |
void | Show () |
Shows the effect. | |
bool | Update (csTicks elapsed) |
Updates the spell effect -- called every frame. | |
~psEffect () | |
Destructor. |
The effect class.
Definition at line 51 of file pseffect.h.
psEffect::psEffect | ( | ) |
Constructor.
psEffect::~psEffect | ( | ) |
Destructor.
size_t psEffect::AddAnchor | ( | psEffectAnchor * | anchor | ) |
Adds an effect anchor to this effect.
anchor | a valid effect anchor. |
psEffect* psEffect::Clone | ( | ) | const |
Clones the effect.
psEffectAnchor* psEffect::CreateAnchor | ( | const csString & | type | ) |
Creates an effect anchor given a type string.
type | a string identifying the type of the anchor. Possible types are:
|
psEffectAnchor* psEffect::FindAnchor | ( | const csString & | anchorName | ) | const |
Finds an effect anchor of the given name.
anchorName | the name of the anchor to find |
psEffectObj* psEffect::FindObj | ( | const csString & | objName | ) | const |
Finds an effect obj of the given name.
objName | the name of the obj to find |
psEffectAnchor* psEffect::GetAnchor | ( | size_t | idx | ) | const |
Returns the effect anchor at the given index.
idx | the index of the anchor to grab |
size_t psEffect::GetAnchorCount | ( | ) | const |
Returns the number of effect anchors in this effect.
float psEffect::GetAnimLength | ( | ) | const |
Returns the animation length of the effect.
int psEffect::GetKillTime | ( | ) | const |
Returns the time after which this effect will be killed.
psEffectObjTextable* psEffect::GetMainTextObj | ( | ) | const |
const csString& psEffect::GetName | ( | ) | const |
Gets the name of the effect.
psEffectObj* psEffect::GetObj | ( | size_t | idx | ) | const |
Returns the effect obj at the given index.
idx | the index of the obj to grab |
size_t psEffect::GetObjCount | ( | ) | const |
Returns the number of effect objs in this effect.
Returns the uniqueID of this effect.
void psEffect::Hide | ( | ) |
Hides the effect.
bool psEffect::IsVisible | ( | ) |
Returns visibility value.
bool psEffect::Load | ( | iDocumentNode * | node, |
iView * | parentView, | ||
psEffect2DRenderer * | renderer2d, | ||
iLoaderContext * | ldr_context | ||
) |
Loads the effect from an xml node.
node | an xml node containing the effect, must be valid. |
parentView | the CS viewport that views the effect. |
renderer2d | the 2D renderer. |
ldr_context | the current loader context. |
unsigned int psEffect::Render | ( | iSectorList * | sectors, |
const csVector3 & | offset, | ||
iMeshWrapper * | attachPos, | ||
iMeshWrapper * | attachTarget, | ||
const csVector3 & | up, | ||
const unsigned int | uniqueIDOverride = 0 , |
||
bool | rotateWithMesh = false |
||
) |
Renders the effect.
sectors | the starting sectors of the effect |
offset | the offset of the position of the effect |
attachPos | the object to attach the effect to, 0 for 0,0,0 |
attachTarget | the target of the effect |
up | the base up vector of the effect |
uniqueIDOverride | overrides the unique ID of the effect (for things like group effects) |
rotateWithMesh | Should the effect rotate with the mesh. |
unsigned int psEffect::Render | ( | iSector * | sector, |
const csVector3 & | offset, | ||
iMeshWrapper * | attachPos, | ||
iMeshWrapper * | attachTarget, | ||
const csVector3 & | up, | ||
const unsigned int | uniqueIDOverride = 0 |
||
) |
Renders the effect.
sector | the starting sector of the effect |
offset | the offset of the position of the effect |
attachPos | the object to attoch the effect to, 0 for 0,0,0 |
attachTarget | the target of the effect, 0 for |
up | the base up vector of the effect |
uniqueIDOverride | overrides the unique ID of the effect (for things like group effects) |
bool psEffect::SetFrameParamScalings | ( | const float * | scale | ) |
Set the scalings for each frame parameter.
void psEffect::SetKillTime | ( | const int | newKillTime | ) |
Sets the time after which this effect will be killed.
newKillTime | new time in ms |
Some effects use these scaling parameters to scale the object.
void psEffect::Show | ( | ) |
Shows the effect.
bool psEffect::Update | ( | csTicks | elapsed | ) |
Updates the spell effect -- called every frame.
elapsed | the ticks elapsed since last update |