Changeset 4181 in orxonox.OLD for orxonox/branches/physics/src/util/physics/physics_connection.h
- Timestamp:
- May 14, 2005, 12:28:44 AM (19 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/util/physics/physics_connection.h
r4178 r4181 1 1 /*! 2 \file proto_class.h 3 \brief Definition of ... 4 2 \file physics_connection.h 3 \brief Definition of The Physical Connection Class. 5 4 */ 6 5 7 #ifndef _P ROTO_CLASS_H8 #define _P ROTO_CLASS_H6 #ifndef _PHYSICS_CONNECTION_H 7 #define _PHYSICS_CONNECTION_H 9 8 10 9 #include "base_object.h" 11 10 12 // FORWARD DEFINITION 11 //! An enumerator for different ConnectionTypes 12 typedef enum PCON_Type { PCON_IPhysIPhys = 0, 13 PCON_IPhysField = 1, 14 PCON_ParticlesField = 2 }; 13 15 14 16 17 // Forward Declaration 18 class Field; 19 class IPhysics; 20 class ParticleSystem; 15 21 16 //! A class for ... 17 class ProtoClass : public BaseObject { 22 23 typedef struct PhysConnection 24 { 25 PCON_Type type; //!< What kind of connection this is. 26 27 IPhysics* subject; //!< The main Subject of this Connection. 28 IPhysics* partner2; //!< The second partner of this Connection. 29 30 ParticleSystem* particleSystem; //!< A ParticleSystem in this Connection 31 32 Field* field; //!< The field to connect either subject of ParticleSystem to. 33 }; 34 35 //! A class that Handles Physical Connection between subjects 36 class PhysicsConnection : public BaseObject { 18 37 19 38 public: 20 P rotoClass();21 virtual ~P rotoClass();39 PhysicsConnection(); 40 virtual ~PhysicsConnection(); 22 41 42 bool addConnection(IPhysics* partnerOne, IPhysics* partnerTwo); 43 bool addConnection(IPhysics* subject, Field* field); 44 bool addConnection(ParticleSystem* particleSystem, Field* field); 45 46 inline PhysConnection* getConnection(void) const {return this->connection;} 23 47 24 48 private: 25 49 PhysConnection* connection; //!< The Physical Connection. 26 50 }; 27 51 28 #endif /* _P ROTO_CLASS_H */52 #endif /* _PHYSICS_CONNECTION_H */
Note: See TracChangeset
for help on using the changeset viewer.