j3d.org Code

org.j3d.geom.particle
Interface ParticleFactory

All Known Implementing Classes:
ParticleSystem

public interface ParticleFactory

Abstract representation of a mechanism to create instances of Particles.

A ParticleFactory is registered with a ParticleSystem and should initialize the fields of the Particle based on the physical entity being modelled (rain, dust, stones etc)

Version:
$Revision: 2.0 $
Author:
Daniel Selman

Method Summary
 int coordinatesPerParticle()
          Request the number of coordinates each particle will use.
 Particle createParticle()
          Create a new particle instance.
 int numColorComponents()
          Request the number of color components this particle uses.
 int numTexCoordComponents()
          Request the number of texture coordinate components this particle uses.
 

Method Detail

coordinatesPerParticle

int coordinatesPerParticle()
Request the number of coordinates each particle will use. Used so that the manager can allocate the correct length array.

Returns:
The number of coordinates this particle uses

numColorComponents

int numColorComponents()
Request the number of color components this particle uses. Should be a value of 4 or 3 to indicate use or not of alpha channel.

Returns:
The number of color components in use

numTexCoordComponents

int numTexCoordComponents()
Request the number of texture coordinate components this particle uses. Should be a value of 2 or 3 to indicate use or not of 2D or 3D textures.

Returns:
The number of color components in use

createParticle

Particle createParticle()
Create a new particle instance.

Returns:
The new instance created

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org