Changeset 4181 in orxonox.OLD
- Timestamp:
- May 14, 2005, 12:28:44 AM (19 years ago)
- Location:
- orxonox/branches/physics/src
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/Makefile.am
r4180 r4181 90 90 util/physics/physical_interaction_sym.cc \ 91 91 util/physics/physical_interaction_asym.cc \ 92 util/physics/physics_connection.cc \ 92 93 util/physics/fields/field.cc \ 93 94 util/physics/fields/gravity.cc \ … … 163 164 util/physics/physical_interaction_sym.h \ 164 165 util/physics/physical_interaction_asym.h \ 166 util/physics/physics_connection.h \ 165 167 util/physics/fields/field.h \ 166 168 util/physics/fields/gravity.h \ -
orxonox/branches/physics/src/Makefile.in
r4180 r4181 91 91 physical_interaction.$(OBJEXT) \ 92 92 physical_interaction_sym.$(OBJEXT) \ 93 physical_interaction_asym.$(OBJEXT) field.$(OBJEXT)\94 gravity.$(OBJEXT) vector.$(OBJEXT) curve.$(OBJEXT) \95 glmenu_imagescreen.$(OBJEXT) tinyxml.$(OBJEXT) \96 tiny str.$(OBJEXT) tinyxmlerror.$(OBJEXT) \93 physical_interaction_asym.$(OBJEXT) \ 94 physics_connection.$(OBJEXT) field.$(OBJEXT) gravity.$(OBJEXT) \ 95 vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \ 96 tinyxml.$(OBJEXT) tinystr.$(OBJEXT) tinyxmlerror.$(OBJEXT) \ 97 97 tinyxmlparser.$(OBJEXT) benchmark.$(OBJEXT) 98 98 orxonox_OBJECTS = $(am_orxonox_OBJECTS) … … 140 140 @AMDEP_TRUE@ ./$(DEPDIR)/physical_interaction_asym.Po \ 141 141 @AMDEP_TRUE@ ./$(DEPDIR)/physical_interaction_sym.Po \ 142 @AMDEP_TRUE@ ./$(DEPDIR)/physics_connection.Po \ 142 143 @AMDEP_TRUE@ ./$(DEPDIR)/physics_engine.Po \ 143 144 @AMDEP_TRUE@ ./$(DEPDIR)/player.Po \ … … 342 343 util/physics/physical_interaction_sym.cc \ 343 344 util/physics/physical_interaction_asym.cc \ 345 util/physics/physics_connection.cc \ 344 346 util/physics/fields/field.cc \ 345 347 util/physics/fields/gravity.cc \ … … 415 417 util/physics/physical_interaction_sym.h \ 416 418 util/physics/physical_interaction_asym.h \ 419 util/physics/physics_connection.h \ 417 420 util/physics/fields/field.h \ 418 421 util/physics/fields/gravity.h \ … … 581 584 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/physical_interaction_asym.Po@am__quote@ 582 585 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/physical_interaction_sym.Po@am__quote@ 586 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/physics_connection.Po@am__quote@ 583 587 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/physics_engine.Po@am__quote@ 584 588 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@ … … 1517 1521 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1518 1522 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o physical_interaction_asym.obj `if test -f 'util/physics/physical_interaction_asym.cc'; then $(CYGPATH_W) 'util/physics/physical_interaction_asym.cc'; else $(CYGPATH_W) '$(srcdir)/util/physics/physical_interaction_asym.cc'; fi` 1523 1524 physics_connection.o: util/physics/physics_connection.cc 1525 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT physics_connection.o -MD -MP -MF "$(DEPDIR)/physics_connection.Tpo" -c -o physics_connection.o `test -f 'util/physics/physics_connection.cc' || echo '$(srcdir)/'`util/physics/physics_connection.cc; \ 1526 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/physics_connection.Tpo" "$(DEPDIR)/physics_connection.Po"; else rm -f "$(DEPDIR)/physics_connection.Tpo"; exit 1; fi 1527 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/physics/physics_connection.cc' object='physics_connection.o' libtool=no @AMDEPBACKSLASH@ 1528 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/physics_connection.Po' tmpdepfile='$(DEPDIR)/physics_connection.TPo' @AMDEPBACKSLASH@ 1529 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1530 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o physics_connection.o `test -f 'util/physics/physics_connection.cc' || echo '$(srcdir)/'`util/physics/physics_connection.cc 1531 1532 physics_connection.obj: util/physics/physics_connection.cc 1533 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT physics_connection.obj -MD -MP -MF "$(DEPDIR)/physics_connection.Tpo" -c -o physics_connection.obj `if test -f 'util/physics/physics_connection.cc'; then $(CYGPATH_W) 'util/physics/physics_connection.cc'; else $(CYGPATH_W) '$(srcdir)/util/physics/physics_connection.cc'; fi`; \ 1534 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/physics_connection.Tpo" "$(DEPDIR)/physics_connection.Po"; else rm -f "$(DEPDIR)/physics_connection.Tpo"; exit 1; fi 1535 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/physics/physics_connection.cc' object='physics_connection.obj' libtool=no @AMDEPBACKSLASH@ 1536 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/physics_connection.Po' tmpdepfile='$(DEPDIR)/physics_connection.TPo' @AMDEPBACKSLASH@ 1537 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1538 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o physics_connection.obj `if test -f 'util/physics/physics_connection.cc'; then $(CYGPATH_W) 'util/physics/physics_connection.cc'; else $(CYGPATH_W) '$(srcdir)/util/physics/physics_connection.cc'; fi` 1519 1539 1520 1540 field.o: util/physics/fields/field.cc -
orxonox/branches/physics/src/util/physics/fields/field.cc
r4180 r4181 28 28 { 29 29 this->setClassName ("Field"); 30 this->setMagnitude(1); 31 this->setAttenuation(0); 30 32 } 31 33 -
orxonox/branches/physics/src/util/physics/physics_connection.cc
r4178 r4181 10 10 11 11 ### File Specific: 12 main-programmer: ...12 main-programmer: Benjamin Grauer 13 13 co-programmer: ... 14 14 */ … … 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 17 17 18 #include "proto_class.h" 18 #include "physics_connection.h" 19 19 20 20 21 using namespace std; … … 23 24 /** 24 25 \brief standard constructor 25 \todo this constructor is not jet implemented - do it26 26 */ 27 P rotoClass::ProtoClass()27 PhysicsConnection::PhysicsConnection () 28 28 { 29 this->setClassName ("ProtoClass"); 29 this->setClassName ("PhysicsConnection"); 30 connection = NULL; 30 31 } 31 32 … … 35 36 36 37 */ 37 P rotoClass::~ProtoClass()38 PhysicsConnection::~PhysicsConnection () 38 39 { 39 // delete what has to be deleted here 40 if (this->connection) 41 delete this->connection; 40 42 } 43 44 45 46 47 48 49 bool PhysicsConnection::addConnection(ParticleSystem* particleSystem, Field* field) 50 { 51 if (!this->connection) 52 { 53 this->connection = new PhysConnection; 54 this->connection->type = PCON_ParticlesField; 55 this->connection->particleSystem = particleSystem; 56 this->connection->field = field; 57 } 58 } -
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.