/* -*- Objc -*- */ /* * $Id: ParticleExplosion.m,v 1.1 2003/07/15 13:59:10 madruon Exp $ * * Copyright (C) 2003 Free Software Foundation, Inc. * * This file is part of GNU Hégémonie. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "ParticleSystem/ParticleExplosion.h" @implementation ParticleExplosion /** * Initialisation of all commons variables. */ - (id) initWithPosition: (coord_t)position orientation: (coord_t)orientation texture: (GLuint)textureName { self = [super init]; if (self != nil) { [self setInifiniteSystem: NO]; [self setNumberOfParticles: 500]; [self setPosition: position]; [self setOrientation: orientation]; [self setDirectionXMin: -1.0 directionXMax: 1.0 directionXStep: 0.1]; [self setDirectionYMin: -1.0 directionYMax: 1.0 directionYStep: 0.1]; [self setDirectionZMin: -1.0 directionZMax: 1.0 directionZStep: 0.1]; [self setLifeMin: 0.1 lifeMax: 0.8 lifeStep: 0.1]; [self setSpeedMin: 100.0 speedMax: 150.0 speedStep: 1.0]; [self setSizeMin: 0.1 sizeMax: 0.5 sizeStep: 0.1]; [self setColorRedMin: 1.0 colorRedMax: 1.0 colorRedStep: 0.0]; [self setColorGreenMin: 1.0 colorGreenMax: 0.5 colorGreenStep: -0.1]; [self setColorBlueMin: 1.0 colorBlueMax: 1.0 colorBlueStep: 0.0]; [self setShininess: 3.0]; [self setTexture:textureName]; [self generate]; } return self; } /* - (void) move: (double)elapsedTime { [super move: elapsedTime]; } */ /** * Removes the array. All particles are deleted. */ - (void) dealloc { [super dealloc]; } @end