particle_base.h 702 Bytes
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef PARTBASE_H
#define PARTBASE_H

#include "Geometry/vector_gen.h"

namespace CGoGN
{

namespace Algo
{

namespace MovingObjects
{

typedef Geom::Vec3f VEC3;

/* A particle base defines a position with a displacement function */

class ParticleBase
{
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
public :
	VEC3 m_position;

	ParticleBase()
	{
		m_position.zero();
	}

	ParticleBase(VEC3 position)
	{
		m_position = position;
	}

	virtual unsigned int getState()
	{
		return 0;
	}

	/**
	* @param newPosition new position to reach
	*/
	virtual bool move(VEC3 position)
	{
		m_position = position;
		return true;
	}

	VEC3 getPosition() { return m_position; }
Pierre Kraemer's avatar
Pierre Kraemer committed
49
50
};

51
} // namespace MovingObjects
Pierre Kraemer's avatar
Pierre Kraemer committed
52

53
} // namespace Algo
Pierre Kraemer's avatar
Pierre Kraemer committed
54

55
} // namespace CGoGN
Pierre Kraemer's avatar
Pierre Kraemer committed
56
57

#endif