Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

particlesystem.h

Go to the documentation of this file.
00001 /*********************************************************************
00002 * lescegra                                                           *
00003 *                                                                    *
00004 * http://geeky.kicks-ass.org/projects/lescegra.html                  *
00005 *                                                                    *
00006 * Copyright 2003 by Enno Cramer <uebergeek@web.de>                   *
00007 *                                                                    *
00008 * This library is free software; you can redistribute it and/or      *
00009 * modify it under the terms of the GNU Library General Public        *
00010 * License as published by the Free Software Foundation; either       *
00011 * version 2 of the License, or (at your option) any later version.   *
00012 *                                                                    *
00013 * This library is distributed in the hope that it will be useful,    *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of     *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  *
00016 * Library General Public License for more details.                   *
00017 *                                                                    *
00018 * You should have received a copy of the GNU Library General Public  *
00019 * License along with this library; if not, write to the Free         *
00020 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
00021 *********************************************************************/
00022 
00023 #ifndef LSG_PARTICLESYSTEM_H
00024 #define LSG_PARTICLESYSTEM_H 1
00025 
00026 /**
00027  * \file  particlesystem.h
00028  * \brief Particle system container
00029  */
00030 
00031 #include <lescegra/sg/group.h>
00032 
00033 #include <lescegra/particle/particle.h>
00034 
00035 #include <lescegra/util/list.h>
00036 
00037 /**
00038  * \ingroup particle
00039  * \brief   Particle system container
00040  *
00041  * LsgGroup node to encapsulate all particles and modifiers that belong to one
00042  * particle system.
00043  */
00044 typedef struct {
00045     LsgGroup super;
00046     LsgList* modifiers;
00047 } LsgParticleSystem;
00048 
00049 /**
00050  * \relates LsgParticleSystem
00051  * Allocate and initialize a new LsgParticleSystem instance.
00052  * @return a new LsgParticleSystem instance
00053  */
00054 LsgParticleSystem* LsgParticleSystem_create(void);
00055 
00056 /**
00057  * \relates LsgParticleSystem
00058  * Constructor for LsgParticleSystem. Create an initially empty particle system.
00059  * @param self      The instance variable
00060  */
00061 void LsgParticleSystem_init(LsgParticleSystem* self);
00062 
00063 /**
00064  * \relates LsgParticleSystem
00065  * Update the particle system by updating all containd particles and running all
00066  * modifiers update methods.
00067  * @param self      The instance variable
00068  * @param now       The current time
00069  */
00070 void LsgParticleSystem_update(LsgParticleSystem* self, float now);
00071 
00072 /**
00073  * \relates LsgParticleSystem
00074  * Destroy the particle system.
00075  * @param self      The instance variable
00076  */
00077 void LsgParticleSystem_destroy(LsgParticleSystem* self);
00078 
00079 /**
00080  * Display the particle system. Reuse parent implementation.
00081  */
00082 #define LsgParticleSystem_display(self) LsgGroup_display(&(self)->super)
00083 
00084 /**
00085  * Clean the particle system. Reuse parant implementation.
00086  */
00087 #define LsgParticleSystem_clean(self)   LsgGroup_clean(&(self)->super)
00088 
00089 #endif

(c) 2003, by Enno Cramer
generated on 13 Jul 2003
lescegra - doxygen