20 #ifndef PS_EFFECT_MANAGER_HEADER 21 #define PS_EFFECT_MANAGER_HEADER 25 #include <csutil/csstring.h> 26 #include <csutil/array.h> 27 #include <csutil/parray.h> 28 #include <csutil/ref.h> 29 #include <iengine/collection.h> 30 #include <iutil/virtclk.h> 31 #include <csutil/hash.h> 32 #include <imap/reader.h> 33 #include <ivideo/graph3d.h> 34 #include <csutil/scf_implementation.h> 35 #include <csutil/threading/rwmutex.h> 75 csPtr<iBase> Parse(iDocumentNode* node, iStreamSource*, iLoaderContext* ldr_context,
iBase* context);
84 CS::Threading::ReadWriteMutex parseLock;
101 csPtr<iThreadReturn> LoadEffects(
const csString &fileName, iView* parentView);
110 bool LoadFromEffectsList(
const csString &fileName, iView* parentView);
120 bool LoadFromDirectory(
const csString &path,
bool includeSubDirs, iView* parentView);
128 bool DeleteEffect(
unsigned int effectID);
143 unsigned int RenderEffect(
const csString &effectName,
const csVector3 &offset, iMeshWrapper* attachPos,
144 iMeshWrapper* attachTarget=0,
const csVector3 &up=csVector3(0,1,0),
145 const unsigned int uniqueIDOverride = 0,
bool rotateWithMesh =
false,
const float* scale = NULL);
159 unsigned int RenderEffect(
const csString &effectName, iSector* sector,
const csVector3 &pos,
160 iMeshWrapper* attachTarget,
const csVector3 &up=csVector3(0,1,0),
161 const unsigned int uniqueIDOverride = 0,
const float* scale = NULL);
175 unsigned int RenderEffect(
const csString &effectName, iSectorList* sectors,
const csVector3 &pos,
176 iMeshWrapper* attachTarget=0,
const csVector3 &up=csVector3(0,1,0),
177 const unsigned int uniqueIDOverride = 0,
const float* scale = NULL);
179 unsigned int AttachLight(
const char*
name,
const csVector3 &pos,
180 float radius,
const csColor &colour, iMeshWrapper* mw);
181 void DetachLight(
unsigned int lightID);
188 void Update(csTicks elapsed = 0);
201 psEffect* FindEffect(
unsigned int ID)
const;
209 psEffect* FindEffect(
const csString &name)
const;
216 csHash<psEffect*, csString>::GlobalIterator GetEffectsIterator();
225 void ShowEffect(
unsigned int id,
bool value =
true);
227 void AddEffect(
const char* name,
psEffect* effect);
234 void Render2D(iGraphics3D* g3d, iGraphics2D* g2d);
238 return effect2DRenderer;
243 iObjectRegistry* object_reg;
246 csRef<iVirtualClock> vc;
252 csHash<psEffect*, csString> effectFactories;
255 csHash<psEffect*, unsigned int> actualEffects;
258 csRef<iCollection> effectsCollection;
263 csRef<psEffectLoader> effectLoader;
267 csHash<psLight*, unsigned int> lightList;
The manager of all 2D effect elements.
psEffect2DRenderer * Get2DRenderer() const
csArray< csString > effects
Loader plugin for loading PS effects.