Changeset 4179 in orxonox.OLD for orxonox/branches/physics/src/util/physics/field.h
- Timestamp:
- May 13, 2005, 11:39:44 PM (19 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/util/physics/field.h
r4178 r4179 1 /*! 2 \file proto_class.h 3 \brief Definition of ... 1 /* 2 orxonox - the future of 3D-vertical-scrollers 4 3 4 Copyright (C) 2004 orx 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 ### File Specific: 12 main-programmer: Benjamin Grauer 13 co-programmer: ... 5 14 */ 6 15 7 #ifndef _PROTO_CLASS_H 8 #define _PROTO_CLASS_H 16 /*! 17 \file field.h 18 \brief abstract definition of a Physical Field 9 19 10 #include "base_object.h" 20 This is a totally abstract class, that only enables different Physical Fields to 21 exist on a common Level. 22 */ 23 24 #ifndef _FIELD_H 25 #define _FIELD_H 26 27 #include "p_node.h" 11 28 12 29 // FORWARD DEFINITION … … 14 31 15 32 16 //! A class for ... 17 class ProtoClass : public BaseObject { 33 //! An abstract class that represents a Force. 34 class Field : public PNode 35 { 36 public: 37 Field(); 38 virtual ~Field(); 18 39 19 public: 20 ProtoClass(); 21 virtual ~ProtoClass(); 40 /** 41 \param data This is the data given to this force, to calculate the ForceVector 42 \returns The Force Vector 43 */ 44 virtual Vector& calcForce(Vector& data) = 0; 22 45 46 void setMagnitude(const float& magnitude); 47 /** \returns The Magnitude of the Field */ 48 const float& getMagnitude(void) const {return this->magnitude;} 49 50 void setAttenuation(const float& attenuation); 51 /** \returns The Attenuation of the Fiels */ 52 const float& getAttenuation(void) const {return this->attenuation;} 23 53 24 54 private: 25 55 float magnitude; //!< The strength of the field 56 float attenuation; //!< The Attenuation (the bigger the shorter the influenced distance). 26 57 }; 27 58 28 #endif /* _ PROTO_CLASS_H */59 #endif /* _FIELD_H */
Note: See TracChangeset
for help on using the changeset viewer.