Planeshift
psEffectObjText Class Reference

#include <pseffectobjtext.h>

Public Member Functions

psEffectObjClone () const
 Clones the effect object. More...
 
bool Load (iDocumentNode *node, iLoaderContext *ldr_context)
 Loads the effect object from an xml node. More...
 
 psEffectObjText (iView *parentView, psEffect2DRenderer *renderer2d)
 
virtual bool SetText (const csArray< psEffectTextElement > &elements)
 Creates a material that will fit an array of text elements and draws those elements. More...
 
virtual bool SetText (const csArray< psEffectTextRow > &rows)
 
virtual bool SetText (int rows,...)
 
 ~psEffectObjText ()
 
- Public Member Functions inherited from psEffectObjQuad
virtual void CloneBase (psEffectObj *newObj) const
 Convenience function to clone the base member variables. More...
 
 psEffectObjQuad (iView *parentView, psEffect2DRenderer *renderer2d)
 
virtual bool Render (const csVector3 &up)
 Renders the effect. More...
 
virtual bool Update (csTicks elapsed)
 Updates the spell effect – called every frame. More...
 
virtual ~psEffectObjQuad ()
 
- Public Member Functions inherited from psEffectObj
virtual bool AttachToAnchor (psEffectAnchor *newAnchor)
 Attaches this mesh to the given effect anchor. More...
 
const csString & GetAnchorName () const
 Gets the name of the anchor that this effect obj is attached to. More...
 
float GetAnimLength () const
 Accessor function to get the animation length of this effect obj. More...
 
float GetBirth () const
 Get the birth. More...
 
int GetDirection () const
 Get the direction. More...
 
psEffectObjKeyFrameGetKeyFrame (size_t idx) const
 Returns the keyframe at the given index. More...
 
size_t GetKeyFrameCount () const
 Returns the number of keyframes in this obj. More...
 
int GetKillTime () const
 Gets the time left that the effect obj has to live. More...
 
unsigned int GetMixMode () const
 Get the mixmode for rendering the mesh. More...
 
csString GetName () const
 Gets the name of this effect obj. More...
 
CS::Graphics::RenderPriority GetRenderPriority () const
 Get the priority for rendering the mesh. More...
 
csZBufMode GetZBufMode () const
 Get the zbuf mode for rendering the mesh. More...
 
 psEffectObj (iView *parentView, psEffect2DRenderer *renderer2d)
 
void SetAnchorName (const csString &anchor)
 Sets the name of the anchor that this effect obj is attached to. More...
 
void SetAnimationScaling (float s)
 
virtual bool SetFrameParamScalings (const float *scale)
 Adjust each parameter in each frame that have the use_scale property set with this scale. More...
 
void SetKillTime (int newKillTime)
 Sets the new time left that the effect obj has to live. More...
 
void SetPosition (const csMatrix3 &newPosTransf)
 Sets the position rotation of the effect obj. More...
 
void SetRotBase (const csMatrix3 &newRotBase)
 Sets the base rotation matrix of the effect obj. More...
 
virtual bool SetScaling (float scale, float aspect)
 If the obj supports it, sets the scaling parameters. More...
 
void SetTarget (const csMatrix3 &newTargetTransf)
 Sets the target rotation of the effect obj. More...
 
virtual void Show (bool value)
 Shows or hides an object. More...
 
virtual ~psEffectObj ()
 
- Public Member Functions inherited from psEffectObjTextable
virtual ~psEffectObjTextable ()
 

Protected Member Functions

void DrawTextElement (const psEffectTextElement &element)
 
bool PostSetup ()
 performs the post setup (after the effect obj has been loaded). More...
 
int ToPowerOf2 (int n)
 
- Protected Member Functions inherited from psEffectObjQuad
virtual bool CreateMeshFact ()
 Creates a mesh factory for this quad. More...
 
virtual bool UseUniqueMeshFact () const
 Decides whether or not this quad will have a unique mesh factory per effect instance. More...
 
- Protected Member Functions inherited from psEffectObj
csMatrix3 BuildRotMatrix (const csVector3 &up) const
 Builds a rotation matrix given an up vector (yaw is assumed to be 0). More...
 
void FillInLerps ()
 Linearly interpolates keyFrame values for actions that weren't specified in a certain key frame. More...
 
size_t FindKeyFrameByTime (csTicks time) const
 Finds the index of the keyFrame at the specified time. More...
 
bool FindNextKeyFrameWithAction (size_t startFrame, size_t action, size_t &index) const
 Finds the next key frame where the specific action is specified. More...
 
float lerp (float f1, float f2, float factor)
 
float lerpFactor (csTicks t1, csTicks t2, csTicks t)
 
csVector3 lerpVec (const csVector3 &v1, const csVector3 &v2, float factor)
 

Additional Inherited Members

- Public Types inherited from psEffectObj
enum  DIR_TYPE {
  DT_NONE = 0, DT_ORIGIN, DT_TARGET, DT_TO_TARGET,
  DT_CAMERA, DT_BILLBOARD, DT_COUNT
}
 
- Public Attributes inherited from psEffectObjQuad
csRef< MeshAnimControlmeshControl
 
- Protected Types inherited from psEffectObj
enum  SCALING_TYPE {
  SCALING_NONE = 0, SCALING_BIRTH = 1, SCALING_DEATH = 2, SCALING_FRAMES = 4,
  SCALING_LOOP = 8
}
 
- Protected Attributes inherited from psEffectObjQuad
csRef< iGeneralMeshState > genState
 
csRef< iMaterialWrapper > mat
 
float quadAspect
 
csVector2 texel [4]
 
csVector3 vert [4]
 
- Protected Attributes inherited from psEffectObj
psEffectAnchoranchor
 
csRef< iMeshWrapper > anchorMesh
 
csString anchorName
 
csTicks animLength
 
float animScaling
 
float aspect
 
int autoScale
 
float baseScale
 
csTicks birth
 
size_t currKeyFrame
 
int dir
 
csRef< iCollection > effectsCollection
 region to store the CS objects More...
 
csRef< iEngine > engine
 
csRef< iStringSet > globalStringSet
 
bool isAlive
 
csRef< psEffectObjKeyFrameGroupkeyFrames
 
int killTime
 
csTicks life
 
csMatrix3 matBase
 
csString materialName
 
csMatrix3 matUp
 
csRef< iMeshWrapper > mesh
 
csRef< iMeshFactoryWrapper > meshFact
 
unsigned int mixmode
 
csString name
 
size_t nextKeyFrame
 
csVector3 objUp
 
CS::Graphics::RenderPriority priority
 
psEffect2DRendererrenderer2d
 
float scale
 
csRef< iShaderVarStringSet > stringSet
 
csVector3 target
 
csRef< iView > view
 
csZBufMode zFunc
 

Detailed Description

Definition at line 41 of file pseffectobjtext.h.

Constructor & Destructor Documentation

psEffectObjText::psEffectObjText ( iView *  parentView,
psEffect2DRenderer renderer2d 
)
psEffectObjText::~psEffectObjText ( )

Member Function Documentation

psEffectObj* psEffectObjText::Clone ( ) const
virtual

Clones the effect object.

This will almost always be overloaded.

Reimplemented from psEffectObjQuad.

void psEffectObjText::DrawTextElement ( const psEffectTextElement element)
protected
bool psEffectObjText::Load ( iDocumentNode *  node,
iLoaderContext *  ldr_context 
)
virtual

Loads the effect object from an xml node.

Parameters
nodethe xml node containing the effect object, must be valid
ldr_contextthe current loader context.
Returns
true on success, false otherwise

Reimplemented from psEffectObjQuad.

bool psEffectObjText::PostSetup ( )
protectedvirtual

performs the post setup (after the effect obj has been loaded).

Things like create mesh factory, etc are initialized here.

Reimplemented from psEffectObjQuad.

virtual bool psEffectObjText::SetText ( const csArray< psEffectTextElement > &  elements)
virtual

Creates a material that will fit an array of text elements and draws those elements.

Implements psEffectObjTextable.

virtual bool psEffectObjText::SetText ( const csArray< psEffectTextRow > &  rows)
virtual

Implements psEffectObjTextable.

virtual bool psEffectObjText::SetText ( int  rows,
  ... 
)
virtual

Implements psEffectObjTextable.

int psEffectObjText::ToPowerOf2 ( int  n)
inlineprotected

Definition at line 86 of file pseffectobjtext.h.


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