00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef OPENCAL_FOUNTAIN_H
00012
#define OPENCAL_FOUNTAIN_H
00013
00014
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
00028
00033 class OPENCAL_API Fountain:
public ParticleSystem
00034 {
00035
protected:
00036
00037 Vector3 m_position, m_velocity;
00038
float m_lifeSpan;
00039 map<PointMass *, float> m_ages;
00040
00041
public:
00042
00043 Fountain(
System *parent);
00044
virtual ~Fountain();
00045
00046
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
00053
void setPosition(
const Vector3 &position) { m_position = position; }
00054
void setVelocity(
const Vector3 &velocity) { m_velocity = velocity; }
00055
00056
protected:
00057
00058
void killParticles();
00059
void bornParticles();
00060 };
00061 }
00062
00063
#endif // OPENCAL_FOUNTAIN_H