ESyS-Particle  2.3.4
BasicParticle.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2017 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.apache.org/licenses/LICENSE-2.0 //
10 // //
12 
13 #ifndef __BASICPARTICLE_H
14 #define __BASICPARTICLE_H
15 
16 // -- project includes --
17 #include "vec3.h"
18 
30 class CBasicParticle
31 {
32 protected:
33  Vec3 m_pos;
34  double m_rad;
35  int m_id;
36 
37 public:
39  CBasicParticle(int,const Vec3&,double);
40 
41  inline Vec3& getPPos() {return m_pos;};
42  inline Vec3 getPos() const {return m_pos;};
43  inline double getRad() const {return m_rad;};
44  inline int getID() const {return m_id;};
45 
46  inline void moveBy(Vec3 v){m_pos+=v;};
47  inline void moveTo(Vec3 v){m_pos=v;};
48  inline void setRad(double r){m_rad=r;};
49 };
50 
51 #endif //__BASICPARTICLE_H
CBasicParticle::m_pos
Vec3 m_pos
position
Definition: BasicParticle.h:47
CBasicParticle::getPPos
Vec3 & getPPos()
Definition: BasicParticle.h:41
vec3.h
CBasicParticle::m_rad
double m_rad
radius
Definition: BasicParticle.h:48
CBasicParticle::setRad
void setRad(double r)
move absolute
Definition: BasicParticle.h:48
CBasicParticle::m_id
int m_id
Definition: BasicParticle.h:35
Vec3
Definition: vec3.h:47
CBasicParticle::getID
int getID() const
Definition: BasicParticle.h:44
CBasicParticle::moveBy
void moveBy(Vec3 v)
Definition: BasicParticle.h:46
CBasicParticle::getRad
double getRad() const
Definition: BasicParticle.h:43
CBasicParticle::CBasicParticle
CBasicParticle()
CBasicParticle::getPos
Vec3 getPos() const
Definition: BasicParticle.h:42
CBasicParticle
Basic Particle class. Contains only the "geometric part" of the particle, i.e. position and radius,...
Definition: BasicParticle.h:45
CBasicParticle::moveTo
void moveTo(Vec3 v)
move relative to current position
Definition: BasicParticle.h:47