Changeset 4180 in orxonox.OLD for orxonox/branches/physics
- Timestamp:
- May 13, 2005, 11:57:13 PM (20 years ago)
- Location:
- orxonox/branches/physics/src
- Files:
-
- 1 added
- 2 edited
- 2 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/Makefile.am
r4179 r4180 23 23 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common 24 24 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/physics 25 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/physics/fields 25 26 AM_CXXFLAGS+=-I$(MAINSRCDIR)/subprojects 26 27 … … 89 90 util/physics/physical_interaction_sym.cc \ 90 91 util/physics/physical_interaction_asym.cc \ 91 util/physics/field.cc \ 92 util/physics/fields/field.cc \ 93 util/physics/fields/gravity.cc \ 92 94 lib/math/vector.cc \ 93 95 lib/math/curve.cc \ … … 161 163 util/physics/physical_interaction_sym.h \ 162 164 util/physics/physical_interaction_asym.h \ 163 util/physics/field.h \ 165 util/physics/fields/field.h \ 166 util/physics/fields/gravity.h \ 164 167 lib/util/ini_parser.h \ 165 168 lib/math/vector.h \ -
orxonox/branches/physics/src/Makefile.in
r4179 r4180 92 92 physical_interaction_sym.$(OBJEXT) \ 93 93 physical_interaction_asym.$(OBJEXT) field.$(OBJEXT) \ 94 vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \ 95 tinyxml.$(OBJEXT) tinystr.$(OBJEXT) tinyxmlerror.$(OBJEXT) \ 94 gravity.$(OBJEXT) vector.$(OBJEXT) curve.$(OBJEXT) \ 95 glmenu_imagescreen.$(OBJEXT) tinyxml.$(OBJEXT) \ 96 tinystr.$(OBJEXT) tinyxmlerror.$(OBJEXT) \ 96 97 tinyxmlparser.$(OBJEXT) benchmark.$(OBJEXT) 97 98 orxonox_OBJECTS = $(am_orxonox_OBJECTS) … … 115 116 @AMDEP_TRUE@ ./$(DEPDIR)/glmenu_imagescreen.Po \ 116 117 @AMDEP_TRUE@ ./$(DEPDIR)/graphics_engine.Po \ 118 @AMDEP_TRUE@ ./$(DEPDIR)/gravity.Po \ 117 119 @AMDEP_TRUE@ ./$(DEPDIR)/helper_parent.Po \ 118 120 @AMDEP_TRUE@ ./$(DEPDIR)/i_physics.Po ./$(DEPDIR)/ini_parser.Po \ … … 282 284 target_vendor = @target_vendor@ 283 285 MAINSRCDIR = . 284 AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/util/physics -I$(MAINSRCDIR)/ subprojects286 AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/util/physics -I$(MAINSRCDIR)/util/physics/fields -I$(MAINSRCDIR)/subprojects 285 287 noinst_LIBRARIES = libORXgui.a 286 288 orxonox_DEPENDENCIES = libORXgui.a … … 340 342 util/physics/physical_interaction_sym.cc \ 341 343 util/physics/physical_interaction_asym.cc \ 342 util/physics/field.cc \ 344 util/physics/fields/field.cc \ 345 util/physics/fields/gravity.cc \ 343 346 lib/math/vector.cc \ 344 347 lib/math/curve.cc \ … … 412 415 util/physics/physical_interaction_sym.h \ 413 416 util/physics/physical_interaction_asym.h \ 414 util/physics/field.h \ 417 util/physics/fields/field.h \ 418 util/physics/fields/gravity.h \ 415 419 lib/util/ini_parser.h \ 416 420 lib/math/vector.h \ … … 548 552 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glmenu_imagescreen.Po@am__quote@ 549 553 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphics_engine.Po@am__quote@ 554 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gravity.Po@am__quote@ 550 555 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper_parent.Po@am__quote@ 551 556 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i_physics.Po@am__quote@ … … 1513 1518 @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` 1514 1519 1515 field.o: util/physics/field .cc1516 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT field.o -MD -MP -MF "$(DEPDIR)/field.Tpo" -c -o field.o `test -f 'util/physics/field .cc' || echo '$(srcdir)/'`util/physics/field.cc; \1520 field.o: util/physics/fields/field.cc 1521 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT field.o -MD -MP -MF "$(DEPDIR)/field.Tpo" -c -o field.o `test -f 'util/physics/fields/field.cc' || echo '$(srcdir)/'`util/physics/fields/field.cc; \ 1517 1522 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/field.Tpo" "$(DEPDIR)/field.Po"; else rm -f "$(DEPDIR)/field.Tpo"; exit 1; fi 1518 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/physics/field .cc' object='field.o' libtool=no @AMDEPBACKSLASH@1523 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/physics/fields/field.cc' object='field.o' libtool=no @AMDEPBACKSLASH@ 1519 1524 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/field.Po' tmpdepfile='$(DEPDIR)/field.TPo' @AMDEPBACKSLASH@ 1520 1525 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1521 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o field.o `test -f 'util/physics/field .cc' || echo '$(srcdir)/'`util/physics/field.cc1522 1523 field.obj: util/physics/field .cc1524 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT field.obj -MD -MP -MF "$(DEPDIR)/field.Tpo" -c -o field.obj `if test -f 'util/physics/field .cc'; then $(CYGPATH_W) 'util/physics/field.cc'; else $(CYGPATH_W) '$(srcdir)/util/physics/field.cc'; fi`; \1526 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o field.o `test -f 'util/physics/fields/field.cc' || echo '$(srcdir)/'`util/physics/fields/field.cc 1527 1528 field.obj: util/physics/fields/field.cc 1529 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT field.obj -MD -MP -MF "$(DEPDIR)/field.Tpo" -c -o field.obj `if test -f 'util/physics/fields/field.cc'; then $(CYGPATH_W) 'util/physics/fields/field.cc'; else $(CYGPATH_W) '$(srcdir)/util/physics/fields/field.cc'; fi`; \ 1525 1530 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/field.Tpo" "$(DEPDIR)/field.Po"; else rm -f "$(DEPDIR)/field.Tpo"; exit 1; fi 1526 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/physics/field .cc' object='field.obj' libtool=no @AMDEPBACKSLASH@1531 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/physics/fields/field.cc' object='field.obj' libtool=no @AMDEPBACKSLASH@ 1527 1532 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/field.Po' tmpdepfile='$(DEPDIR)/field.TPo' @AMDEPBACKSLASH@ 1528 1533 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1529 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o field.obj `if test -f 'util/physics/field.cc'; then $(CYGPATH_W) 'util/physics/field.cc'; else $(CYGPATH_W) '$(srcdir)/util/physics/field.cc'; fi` 1534 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o field.obj `if test -f 'util/physics/fields/field.cc'; then $(CYGPATH_W) 'util/physics/fields/field.cc'; else $(CYGPATH_W) '$(srcdir)/util/physics/fields/field.cc'; fi` 1535 1536 gravity.o: util/physics/fields/gravity.cc 1537 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gravity.o -MD -MP -MF "$(DEPDIR)/gravity.Tpo" -c -o gravity.o `test -f 'util/physics/fields/gravity.cc' || echo '$(srcdir)/'`util/physics/fields/gravity.cc; \ 1538 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/gravity.Tpo" "$(DEPDIR)/gravity.Po"; else rm -f "$(DEPDIR)/gravity.Tpo"; exit 1; fi 1539 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/physics/fields/gravity.cc' object='gravity.o' libtool=no @AMDEPBACKSLASH@ 1540 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/gravity.Po' tmpdepfile='$(DEPDIR)/gravity.TPo' @AMDEPBACKSLASH@ 1541 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1542 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gravity.o `test -f 'util/physics/fields/gravity.cc' || echo '$(srcdir)/'`util/physics/fields/gravity.cc 1543 1544 gravity.obj: util/physics/fields/gravity.cc 1545 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gravity.obj -MD -MP -MF "$(DEPDIR)/gravity.Tpo" -c -o gravity.obj `if test -f 'util/physics/fields/gravity.cc'; then $(CYGPATH_W) 'util/physics/fields/gravity.cc'; else $(CYGPATH_W) '$(srcdir)/util/physics/fields/gravity.cc'; fi`; \ 1546 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/gravity.Tpo" "$(DEPDIR)/gravity.Po"; else rm -f "$(DEPDIR)/gravity.Tpo"; exit 1; fi 1547 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/physics/fields/gravity.cc' object='gravity.obj' libtool=no @AMDEPBACKSLASH@ 1548 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/gravity.Po' tmpdepfile='$(DEPDIR)/gravity.TPo' @AMDEPBACKSLASH@ 1549 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1550 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gravity.obj `if test -f 'util/physics/fields/gravity.cc'; then $(CYGPATH_W) 'util/physics/fields/gravity.cc'; else $(CYGPATH_W) '$(srcdir)/util/physics/fields/gravity.cc'; fi` 1530 1551 1531 1552 vector.o: lib/math/vector.cc … … 1779 1800 1780 1801 distdir: $(DISTFILES) 1781 $(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/particles $(distdir)/lib/gui/gui $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/subprojects $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/util/physics $(distdir)/ world_entities1802 $(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/particles $(distdir)/lib/gui/gui $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/subprojects $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/util/physics $(distdir)/util/physics/fields $(distdir)/world_entities 1782 1803 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ 1783 1804 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ -
orxonox/branches/physics/src/util/physics/fields/field.h
r4179 r4180 42 42 \returns The Force Vector 43 43 */ 44 virtual Vector & calcForce(Vector& data)= 0;44 virtual Vector calcForce(const Vector& data) const = 0; 45 45 46 46 void setMagnitude(const float& magnitude); 47 47 /** \returns The Magnitude of the Field */ 48 const float& getMagnitude(void) const {return this->magnitude;}48 inline const float& getMagnitude(void) const {return this->magnitude;} 49 49 50 50 void setAttenuation(const float& attenuation); 51 51 /** \returns The Attenuation of the Fiels */ 52 const float& getAttenuation(void) const {return this->attenuation;}52 inline const float& getAttenuation(void) const {return this->attenuation;} 53 53 54 54 private: -
orxonox/branches/physics/src/util/physics/fields/gravity.cc
r4178 r4180 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 17 17 18 #include " proto_class.h"18 #include "gravity.h" 19 19 20 20 using namespace std; … … 25 25 \todo this constructor is not jet implemented - do it 26 26 */ 27 ProtoClass::ProtoClass()27 Gravity::Gravity () 28 28 { 29 this->setClassName (" ProtoClass");29 this->setClassName ("Gravity"); 30 30 } 31 31 … … 35 35 36 36 */ 37 ProtoClass::~ProtoClass()37 Gravity::~Gravity () 38 38 { 39 39 // delete what has to be deleted here 40 40 } 41 42 /** 43 \brief calculates the Gravity on any point in space 44 \param data The Position of the Point in space to attache gravity to. 45 \returns The force. 46 */ 47 Vector Gravity::calcForce(const Vector& data) const 48 { 49 return /*(this->getAbsDir().apply(Vector(0,1,0)))*/ Vector(0,-1,0) * this->getMagnitude(); 50 } 51 52 -
orxonox/branches/physics/src/util/physics/fields/gravity.h
r4178 r4180 1 1 /*! 2 \file proto_class.h2 \file gravity.h 3 3 \brief Definition of ... 4 4 5 5 */ 6 6 7 #ifndef _ PROTO_CLASS_H8 #define _ PROTO_CLASS_H7 #ifndef _GRAVITY_H 8 #define _GRAVITY_H 9 9 10 #include " base_object.h"10 #include "field.h" 11 11 12 12 // FORWARD DEFINITION … … 15 15 16 16 //! A class for ... 17 class ProtoClass : public BaseObject{17 class Gravity : public Field { 18 18 19 19 public: 20 ProtoClass();21 virtual ~ ProtoClass();20 Gravity(); 21 virtual ~Gravity(); 22 22 23 virtual Vector calcForce(const Vector& data) const; 23 24 24 25 private: … … 26 27 }; 27 28 28 #endif /* _ PROTO_CLASS_H */29 #endif /* _GRAVITY_H */
Note: See TracChangeset
for help on using the changeset viewer.