FExtendPotential.hpp 1.12 KB
Newer Older
1 2
#ifndef FEXTENDPOTENTIAL_HPP
#define FEXTENDPOTENTIAL_HPP
3
// [--License--]
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

#include "../Utils/FGlobal.hpp"

/**
* @author Berenger Bramas (berenger.bramas@inria.fr)
* @class FExtendPotential
* Please read the license
* This class is an extenssion.
* It proposes a Potential (FReal).
*/
class FExtendPotential {
protected:
    FReal potential;   //< The potential extended

public:
    /** Default constructor */
    FExtendPotential() : potential(0) {
    }

    /** Copy constructor */
    FExtendPotential(const FExtendPotential& other) : potential(other.potential) {
    }

    /** Copy operator */
    FExtendPotential& operator=(const FExtendPotential& other) {
        this->potential = other.potential;
        return *this;
    }

    /** To get the potential */
    FReal getPotential() const {
        return this->potential;
    }

    /** To set the potential */
    void setPotential(const FReal inPotential) {
        this->potential = inPotential;
    }

43 44 45 46 47
    /** To inc the potential */
    void incPotential(const FReal inPotential) {
        this->potential += inPotential;
    }

48 49 50 51 52
};


#endif //FEXTENDPOTENTIAL_HPP

53
// [--END--]