@c -*-texinfo-*-
@node MeshObject Fire, MeshObject Snow, MeshObject Fountain, MeshObject
@subsection Fire Mesh Object
@cindex MeshObject
@cindex Fire Particle System
@cindex @code{iMeshObject}
@cindex @code{iMeshObjectFactory}
@cindex @code{iMeshObjectType}
@cindex @code{iFireState}
@cindex @code{iParticleState}

@emph{Written by Jorrit Tyberghein,
@email{jorrit.tyberghein@@gmail.com}.}

A fire is a particle system that emulates a torch or flame.  Also see the
general particle system documentation which is valid for all particle systems.
@xref{MeshObject PartSys}.

@subsubheading Basic Structure

The following @sc{scf} class names are used (for @code{csLoadPlugin}):

@itemize @bullet
@item
Type plugin: @samp{crystalspace.mesh.object.fire}
@item
Loader plugin: @samp{crystalspace.mesh.loader.fire}
@item
Factory loader plugin: @samp{crystalspace.mesh.loader.factory.fire}
@end itemize

Objects in this plugin implement the following @sc{scf} interfaces (get
with @code{scfQueryInterface}):

@itemize @bullet
@item
@emph{MeshObject}
@itemize @bullet
@item
Implements @samp{iMeshObject}
@item
Implements @samp{iParticleState}
@item
Implements @samp{iFireState}
@end itemize
@item
@emph{MeshObjectFactory}
@itemize @bullet
@item
Implements @samp{iMeshObjectFactory}
@end itemize
@item
@emph{MeshObjectFactory}
@itemize @bullet
@item
Implements @samp{iMeshObjectType}
@end itemize
@end itemize

@subsubheading Factory State Interface

This plugin has no factory state interface.

@subsubheading Factory Loader

The fire mesh factory loader has no parameters.

@subsubheading Object State Interface

@samp{iFireState} is the @sc{scf} interface that you can
use to set/get settings for a fire object. The definition of this
interface can be found in @file{CS/include/imesh/fire.h} and that's also the
include file you need to include in your applications to use this plugin.
Using this interface you can access the number of particles, the size
of the particles, and various other fire parameters.

In addition you can use @samp{iParticleState}.

@subsubheading Object Loader

Also see the general documentation for particle systems for other recognized
keywords.  @xref{MeshObject PartSys}.

@table @code
@item <dropsize w="" h="" />
Size of the flame particles (width and height).
@item <origin x="" y="" z="" />
Origin of the flame.  Usually this is (0,0,0) and the engine is responsible for
setting the correct position of the flame.  This works better for hierarchical
transformations.
@item <originbox>
@example
	<min x="" y="" z="" />
	<min x="" y="" z="" />
</originbox>
@end example
Origin of the flame as a box. Usually this is (0,0,0, 0,0,0) and the engine
is responsible for setting the correct position of the flame.  This works
better for hierarchical transformations.
@item <direction x="" y="" z="" />
Direction of the flame.
@item <swirl>swirlValue</swirl>
Swirl.
@item <colorscale>colorScaleValue</colorscale>
Value for color scale.
@item <totaltime>totalTime</totaltime>
Total time.
@item <lighting>yes/no</lighting>
Disable or enable lighting for the fire particles.
@item <number>nrParticles</number>
Number of particles to use.
@end table
