Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

Fountain.h

00001 /*************************************************************************** 00002 * This file is part of OpenCAL: Open Computer Animation Library * 00003 * I created OpenCAL as my master's thesis Computer Science (multimedia) * 00004 * at the tUL university in Diepenbeek, Belgium * 00005 * * 00006 * Copyright (C) 2003-2004 by Jeroen Dierckx * 00007 * jeroen.dierckx@student.luc.ac.be * 00008 * * 00009 ***************************************************************************/ 00010 00011 #ifndef OPENCAL_FOUNTAIN_H 00012 #define OPENCAL_FOUNTAIN_H 00013 00014 // Includes 00015 #include <OpenCAL/global.h> 00016 #include <OpenCAL/ParticleSystem.h> 00017 00018 #include <OpenCAL/Vector3.h> 00019 using OpenCAL::Utils::Vector3; 00020 00021 #include <map> 00022 using std::map; 00023 00024 00025 namespace OpenCAL 00026 { 00027 // Forward declarations 00028 00033 class OPENCAL_API Fountain: public ParticleSystem 00034 { 00035 protected: 00036 // Member variables 00037 Vector3 m_position, m_velocity; 00038 float m_lifeSpan; 00039 map<PointMass *, float> m_ages; 00040 00041 public: 00042 // Constructors and destructor 00043 Fountain(System *parent); 00044 virtual ~Fountain(); 00045 00046 // Get functions 00047 const Vector3 &getPosition() const { return m_position; } 00048 Vector3 *getPositionP() { return &m_position; } 00049 const Vector3 &getVelocity() const { return m_velocity; } 00050 Vector3 *getVelocityP() { return &m_velocity; } 00051 00052 // Set functions 00053 void setPosition(const Vector3 &position) { m_position = position; } 00054 void setVelocity(const Vector3 &velocity) { m_velocity = velocity; } 00055 00056 protected: 00057 // Protected functions 00058 void killParticles(); 00059 void bornParticles(); 00060 }; 00061 } 00062 00063 #endif // OPENCAL_FOUNTAIN_H

Generated on Sun Aug 15 19:19:22 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8