/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Benjamin Grauer co-programmer: ... */ /*! \file field.h \brief abstract definition of a Physical Field This is a totally abstract class, that only enables different Physical Fields to exist on a common Level. */ #ifndef _FIELD_H #define _FIELD_H #include "p_node.h" // FORWARD DEFINITION //! An abstract class that represents a Force. class Field : public PNode { public: Field(); virtual ~Field(); /** \param data This is the data given to this force, to calculate the ForceVector \returns The Force Vector */ virtual Vector& calcForce(Vector& data) = 0; void setMagnitude(const float& magnitude); /** \returns The Magnitude of the Field */ const float& getMagnitude(void) const {return this->magnitude;} void setAttenuation(const float& attenuation); /** \returns The Attenuation of the Fiels */ const float& getAttenuation(void) const {return this->attenuation;} private: float magnitude; //!< The strength of the field float attenuation; //!< The Attenuation (the bigger the shorter the influenced distance). }; #endif /* _FIELD_H */