QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::FxInstance Struct Reference
[Particle Effects]

Instance needed to use FxSources. More...

#include <Q/q.h>

Inheritance diagram for Q::FxInstance:

Q::Instance Q::Object Q::ObjectBase List of all members.

Public Member Functions

 FxInstance ()
 FxInstance (const char *name)
FxSource fxSource () const
float generationRate () const
bool overrideGenRate () const
Utils::Result setGenerationRate (float)
Utils::Result setOverrideGenRate (bool b)

Static Public Member Functions

FxInstance create (const char *name, const FxSource &vs, const Group &group, const Database &db=Database())
FxInstance find (const char *name)
ClassType classType ()
FxInstance cast (const ObjectBase &)

Detailed Description

Instance needed to use FxSources.

The FxInstance object is used to bind effects sources into the scene graph. Some of the parameters of the source can be overridden on a per-instance basis.

By default when an FxInstance is created with a valid FxSource the generation rate of the effect will be the rate of the FxSource (i.e. it is not overridden). If the FxInstance is created with a null FxSource the generation rate will be 0.

See also:
QDemo2 production guide for guidance on how to build and import particle effects in Q files.


Constructor & Destructor Documentation

Q::FxInstance::FxInstance  )  [inline]
 

Create a null effects instance reference.

Q::FxInstance::FxInstance const char *  name  ) 
 

Search the currently attached databases for an effects instance with the given name.


Member Function Documentation

FxInstance Q::FxInstance::cast const ObjectBase  )  [static]
 

If the object referenced by obj is an effects instance, then return a suitable FxInstance reference to the object.

Note:
Casting this object will cause it to be loaded from the database if it is not currently resident.

Reimplemented from Q::Instance.

ClassType Q::FxInstance::classType  )  [static]
 

Return the type for this class.

Reimplemented from Q::Instance.

FxInstance Q::FxInstance::create const char *  name,
const FxSource vs,
const Group group,
const Database db = Database()
[static]
 

Create a new effects instance named name in the given database, db, (or the most recently attached read-write database if db is null). The effects source vs is bound into the scene graph at location group.

FxInstance Q::FxInstance::find const char *  name  )  [static]
 

Search the currently attached databases for an effects instance with the given name and return that object, if it exists.

Reimplemented from Q::Instance.

FxSource Q::FxInstance::fxSource  )  const
 

Return the source associated with this instance.

float Q::FxInstance::generationRate  )  const
 

Return the generation rate for this instance. The source's generation rate can be optionally overridden by the instance.

bool Q::FxInstance::overrideGenRate  )  const
 

Return true if this instance overrides the source's generation rate.

Utils::Result Q::FxInstance::setGenerationRate float   ) 
 

Set the generation rate for this instance. This only takes effect if the override generation rate property is set to true by calling FxInstance::setOverrideGenRate.

Utils::Result Q::FxInstance::setOverrideGenRate bool  b  ) 
 

If b is true, then this instance will override the generation rate of the source with its own generation rate value. If b is false then the generation rate will be taken from the source.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004