Changeset 4293 in orxonox.OLD for orxonox/branches/physics
- Timestamp:
- May 26, 2005, 10:34:14 AM (20 years ago)
- Location:
- orxonox/branches/physics/src
- Files:
-
- 8 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/Makefile.am
r4291 r4293 60 60 util/loading/factory.cc \ 61 61 util/loading/load_param.cc \ 62 util/state.cc \ 62 63 story_entities/story_entity.cc \ 63 64 story_entities/campaign.cc \ … … 116 117 util/object_manager.h \ 117 118 util/garbage_collector.h \ 119 util/state.h \ 118 120 story_entities/story_entity.h \ 119 121 story_entities/story_def.h \ -
orxonox/branches/physics/src/Makefile.in
r4291 r4293 60 60 garbage_collector.$(OBJEXT) list.$(OBJEXT) \ 61 61 resource_manager.$(OBJEXT) factory.$(OBJEXT) \ 62 load_param.$(OBJEXT) st ory_entity.$(OBJEXT) campaign.$(OBJEXT) \63 world.$(OBJEXT) world_entity.$(OBJEXT) camera.$(OBJEXT) \64 player.$(OBJEXT) environment.$(OBJEXT) skysphere.$(OBJEXT) \65 sky box.$(OBJEXT) terrain.$(OBJEXT) weapon.$(OBJEXT) \66 projectile.$(OBJEXT) satellite.$(OBJEXT) \62 load_param.$(OBJEXT) state.$(OBJEXT) story_entity.$(OBJEXT) \ 63 campaign.$(OBJEXT) world.$(OBJEXT) world_entity.$(OBJEXT) \ 64 camera.$(OBJEXT) player.$(OBJEXT) environment.$(OBJEXT) \ 65 skysphere.$(OBJEXT) skybox.$(OBJEXT) terrain.$(OBJEXT) \ 66 weapon.$(OBJEXT) projectile.$(OBJEXT) satellite.$(OBJEXT) \ 67 67 character_attributes.$(OBJEXT) test_gun.$(OBJEXT) \ 68 68 test_bullet.$(OBJEXT) test_entity.$(OBJEXT) p_node.$(OBJEXT) \ … … 112 112 @AMDEP_TRUE@ ./$(DEPDIR)/resource_manager.Po \ 113 113 @AMDEP_TRUE@ ./$(DEPDIR)/satellite.Po ./$(DEPDIR)/skybox.Po \ 114 @AMDEP_TRUE@ ./$(DEPDIR)/skysphere.Po \114 @AMDEP_TRUE@ ./$(DEPDIR)/skysphere.Po ./$(DEPDIR)/state.Po \ 115 115 @AMDEP_TRUE@ ./$(DEPDIR)/story_entity.Po \ 116 116 @AMDEP_TRUE@ ./$(DEPDIR)/substring.Po ./$(DEPDIR)/terrain.Po \ … … 274 274 util/loading/factory.cc \ 275 275 util/loading/load_param.cc \ 276 util/state.cc \ 276 277 story_entities/story_entity.cc \ 277 278 story_entities/campaign.cc \ … … 330 331 util/object_manager.h \ 331 332 util/garbage_collector.h \ 333 util/state.h \ 332 334 story_entities/story_entity.h \ 333 335 story_entities/story_def.h \ … … 512 514 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skybox.Po@am__quote@ 513 515 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skysphere.Po@am__quote@ 516 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Po@am__quote@ 514 517 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@ 515 518 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/substring.Po@am__quote@ … … 750 753 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 751 754 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o load_param.obj `if test -f 'util/loading/load_param.cc'; then $(CYGPATH_W) 'util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/util/loading/load_param.cc'; fi` 755 756 state.o: util/state.cc 757 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.o -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.o `test -f 'util/state.cc' || echo '$(srcdir)/'`util/state.cc; \ 758 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi 759 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/state.cc' object='state.o' libtool=no @AMDEPBACKSLASH@ 760 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.TPo' @AMDEPBACKSLASH@ 761 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 762 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o state.o `test -f 'util/state.cc' || echo '$(srcdir)/'`util/state.cc 763 764 state.obj: util/state.cc 765 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.obj -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.obj `if test -f 'util/state.cc'; then $(CYGPATH_W) 'util/state.cc'; else $(CYGPATH_W) '$(srcdir)/util/state.cc'; fi`; \ 766 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi 767 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/state.cc' object='state.obj' libtool=no @AMDEPBACKSLASH@ 768 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.TPo' @AMDEPBACKSLASH@ 769 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 770 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o state.obj `if test -f 'util/state.cc'; then $(CYGPATH_W) 'util/state.cc'; else $(CYGPATH_W) '$(srcdir)/util/state.cc'; fi` 752 771 753 772 story_entity.o: story_entities/story_entity.cc -
orxonox/branches/physics/src/lib/graphics/particles/particle_system.cc
r4193 r4293 20 20 #include "particle_emitter.h" 21 21 #include "particle_engine.h" 22 23 #include "field.h" 24 22 25 #include "compiler.h" 23 26 #include "material.h" 24 25 #include "field.h" 27 #include "state.h" 28 26 29 27 30 // needed to find the Position of the Camera 28 31 #include "world.h" 29 #include "camera.h"30 32 31 33 using namespace std; … … 337 339 //! \todo implement a faster code for the look-at Camera algorithm. 338 340 339 Camera* camera = WorldInterface::getInstance()->getCurrentWorld()->getLocalCamera(); //!< \todo MUST be different341 const PNode* camera = State::getInstance()->getCamera(); //!< \todo MUST be different 340 342 Vector cameraPos = camera->getAbsCoor(); 341 Vector cameraTargetPos = camera->getTarget()->getAbsCoor();343 Vector cameraTargetPos = State::getInstance()->getCameraTarget()->getAbsCoor(); 342 344 Vector view = cameraTargetPos - cameraPos; 343 345 Vector up = Vector(0, 1, 0); -
orxonox/branches/physics/src/story_entities/world.cc
r4283 r4293 21 21 22 22 #include "orxonox.h" 23 24 #include "state.h" 23 25 24 26 #include "p_node.h" … … 203 205 this->debugWorldNr = worldID; 204 206 this->entities = new tList<WorldEntity>(); 207 208 State::getInstance(); 205 209 } 206 210 … … 282 286 this->localCamera = new Camera(); 283 287 this->localCamera->setName ("camera"); 284 288 289 State::getInstance()->setCamera(this->localCamera, this->localCamera->getTarget()); 290 285 291 GraphicsEngine::getInstance()->displayFPS(true); 286 292 } -
orxonox/branches/physics/src/subprojects/particles/Makefile.am
r4292 r4293 14 14 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/util 15 15 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/math 16 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/physics 17 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/physics/fields 16 18 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/tinyxml 17 19 AM_CXXFLAGS+=-I$(MAINSRCDIR)/defs … … 30 32 AM_LDFLAGS=$(MWINDOWS) 31 33 32 bin_PROGRAMS =importer34 bin_PROGRAMS = particles 33 35 36 particles_LDADD = $(MAINSRCDIR)/lib/physics/libORXphysics.a 34 37 35 importer_SOURCES= framework.cc \ 38 particles_SOURCES= framework.cc \ 39 $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc \ 40 $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc \ 41 $(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc \ 42 $(MAINSRCDIR)/util/state.cc \ 36 43 $(MAINSRCDIR)/lib/graphics/importer/model.cc \ 37 44 $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \ … … 48 55 $(MAINSRCDIR)/lib/coord/null_parent.cc 49 56 50 noinst_HEADERS = framework.h 57 noinst_HEADERS = framework.h -
orxonox/branches/physics/src/subprojects/particles/Makefile.in
r4292 r4293 16 16 17 17 18 SOURCES = $( importer_SOURCES)18 SOURCES = $(particles_SOURCES) 19 19 20 20 srcdir = @srcdir@ … … 39 39 POST_UNINSTALL = : 40 40 host_triplet = @host@ 41 bin_PROGRAMS = importer$(EXEEXT)41 bin_PROGRAMS = particles$(EXEEXT) 42 42 subdir = src/subprojects/particles 43 43 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ … … 53 53 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 54 54 PROGRAMS = $(bin_PROGRAMS) 55 am_importer_OBJECTS = framework.$(OBJEXT) model.$(OBJEXT) \ 56 objModel.$(OBJEXT) primitive_model.$(OBJEXT) array.$(OBJEXT) \ 57 material.$(OBJEXT) texture.$(OBJEXT) graphics_engine.$(OBJEXT) \ 55 am_particles_OBJECTS = framework.$(OBJEXT) particle_engine.$(OBJEXT) \ 56 particle_system.$(OBJEXT) particle_emitter.$(OBJEXT) \ 57 state.$(OBJEXT) model.$(OBJEXT) objModel.$(OBJEXT) \ 58 primitive_model.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT) \ 59 texture.$(OBJEXT) graphics_engine.$(OBJEXT) \ 58 60 base_object.$(OBJEXT) vector.$(OBJEXT) \ 59 61 resource_manager.$(OBJEXT) text_engine.$(OBJEXT) \ 60 62 p_node.$(OBJEXT) null_parent.$(OBJEXT) 61 importer_OBJECTS = $(am_importer_OBJECTS)62 importer_LDADD = $(LDADD) 63 particles_OBJECTS = $(am_particles_OBJECTS) 64 particles_DEPENDENCIES = $(MAINSRCDIR)/lib/physics/libORXphysics.a 63 65 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) 64 66 depcomp = $(SHELL) $(top_srcdir)/depcomp … … 71 73 @AMDEP_TRUE@ ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \ 72 74 @AMDEP_TRUE@ ./$(DEPDIR)/p_node.Po \ 75 @AMDEP_TRUE@ ./$(DEPDIR)/particle_emitter.Po \ 76 @AMDEP_TRUE@ ./$(DEPDIR)/particle_engine.Po \ 77 @AMDEP_TRUE@ ./$(DEPDIR)/particle_system.Po \ 73 78 @AMDEP_TRUE@ ./$(DEPDIR)/primitive_model.Po \ 74 79 @AMDEP_TRUE@ ./$(DEPDIR)/resource_manager.Po \ 75 @AMDEP_TRUE@ ./$(DEPDIR)/ text_engine.Po ./$(DEPDIR)/texture.Po \76 @AMDEP_TRUE@ ./$(DEPDIR)/ vector.Po80 @AMDEP_TRUE@ ./$(DEPDIR)/state.Po ./$(DEPDIR)/text_engine.Po \ 81 @AMDEP_TRUE@ ./$(DEPDIR)/texture.Po ./$(DEPDIR)/vector.Po 77 82 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 78 83 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) … … 80 85 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ 81 86 -o $@ 82 SOURCES = $( importer_SOURCES)83 DIST_SOURCES = $( importer_SOURCES)87 SOURCES = $(particles_SOURCES) 88 DIST_SOURCES = $(particles_SOURCES) 84 89 HEADERS = $(noinst_HEADERS) 85 90 ETAGS = etags … … 195 200 target_vendor = @target_vendor@ 196 201 MAINSRCDIR = ../.. 197 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)/lib/ tinyxml -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/loading -I$(MAINSRCDIR)/util/track -I$(MAINSRCDIR)/subprojects202 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)/lib/physics -I$(MAINSRCDIR)/lib/physics/fields -I$(MAINSRCDIR)/lib/tinyxml -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/loading -I$(MAINSRCDIR)/util/track -I$(MAINSRCDIR)/subprojects 198 203 AM_LDFLAGS = $(MWINDOWS) 199 importer_SOURCES = framework.cc \ 204 particles_LDADD = $(MAINSRCDIR)/lib/physics/libORXphysics.a 205 particles_SOURCES = framework.cc \ 206 $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc \ 207 $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc \ 208 $(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc \ 209 $(MAINSRCDIR)/util/state.cc \ 200 210 $(MAINSRCDIR)/lib/graphics/importer/model.cc \ 201 211 $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \ … … 212 222 $(MAINSRCDIR)/lib/coord/null_parent.cc 213 223 214 noinst_HEADERS = framework.h 224 noinst_HEADERS = framework.h 215 225 all: all-am 216 226 … … 269 279 clean-binPROGRAMS: 270 280 -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 271 importer$(EXEEXT): $(importer_OBJECTS) $(importer_DEPENDENCIES)272 @rm -f importer$(EXEEXT)273 $(CXXLINK) $( importer_LDFLAGS) $(importer_OBJECTS) $(importer_LDADD) $(LIBS)281 particles$(EXEEXT): $(particles_OBJECTS) $(particles_DEPENDENCIES) 282 @rm -f particles$(EXEEXT) 283 $(CXXLINK) $(particles_LDFLAGS) $(particles_OBJECTS) $(particles_LDADD) $(LIBS) 274 284 275 285 mostlyclean-compile: … … 288 298 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objModel.Po@am__quote@ 289 299 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@ 300 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_emitter.Po@am__quote@ 301 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_engine.Po@am__quote@ 302 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particle_system.Po@am__quote@ 290 303 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@ 291 304 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@ 305 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Po@am__quote@ 292 306 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_engine.Po@am__quote@ 293 307 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@ … … 309 323 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 310 324 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 325 326 particle_engine.o: $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc 327 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_engine.o -MD -MP -MF "$(DEPDIR)/particle_engine.Tpo" -c -o particle_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc; \ 328 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/particle_engine.Tpo" "$(DEPDIR)/particle_engine.Po"; else rm -f "$(DEPDIR)/particle_engine.Tpo"; exit 1; fi 329 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc' object='particle_engine.o' libtool=no @AMDEPBACKSLASH@ 330 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/particle_engine.Po' tmpdepfile='$(DEPDIR)/particle_engine.TPo' @AMDEPBACKSLASH@ 331 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 332 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particle_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc 333 334 particle_engine.obj: $(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc 335 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_engine.obj -MD -MP -MF "$(DEPDIR)/particle_engine.Tpo" -c -o particle_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; fi`; \ 336 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/particle_engine.Tpo" "$(DEPDIR)/particle_engine.Po"; else rm -f "$(DEPDIR)/particle_engine.Tpo"; exit 1; fi 337 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc' object='particle_engine.obj' libtool=no @AMDEPBACKSLASH@ 338 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/particle_engine.Po' tmpdepfile='$(DEPDIR)/particle_engine.TPo' @AMDEPBACKSLASH@ 339 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 340 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particle_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_engine.cc'; fi` 341 342 particle_system.o: $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc 343 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_system.o -MD -MP -MF "$(DEPDIR)/particle_system.Tpo" -c -o particle_system.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc; \ 344 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/particle_system.Tpo" "$(DEPDIR)/particle_system.Po"; else rm -f "$(DEPDIR)/particle_system.Tpo"; exit 1; fi 345 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc' object='particle_system.o' libtool=no @AMDEPBACKSLASH@ 346 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/particle_system.Po' tmpdepfile='$(DEPDIR)/particle_system.TPo' @AMDEPBACKSLASH@ 347 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 348 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particle_system.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc 349 350 particle_system.obj: $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc 351 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_system.obj -MD -MP -MF "$(DEPDIR)/particle_system.Tpo" -c -o particle_system.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; fi`; \ 352 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/particle_system.Tpo" "$(DEPDIR)/particle_system.Po"; else rm -f "$(DEPDIR)/particle_system.Tpo"; exit 1; fi 353 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc' object='particle_system.obj' libtool=no @AMDEPBACKSLASH@ 354 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/particle_system.Po' tmpdepfile='$(DEPDIR)/particle_system.TPo' @AMDEPBACKSLASH@ 355 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 356 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particle_system.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_system.cc'; fi` 357 358 particle_emitter.o: $(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc 359 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_emitter.o -MD -MP -MF "$(DEPDIR)/particle_emitter.Tpo" -c -o particle_emitter.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc; \ 360 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/particle_emitter.Tpo" "$(DEPDIR)/particle_emitter.Po"; else rm -f "$(DEPDIR)/particle_emitter.Tpo"; exit 1; fi 361 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc' object='particle_emitter.o' libtool=no @AMDEPBACKSLASH@ 362 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/particle_emitter.Po' tmpdepfile='$(DEPDIR)/particle_emitter.TPo' @AMDEPBACKSLASH@ 363 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 364 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particle_emitter.o `test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc 365 366 particle_emitter.obj: $(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc 367 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particle_emitter.obj -MD -MP -MF "$(DEPDIR)/particle_emitter.Tpo" -c -o particle_emitter.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; fi`; \ 368 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/particle_emitter.Tpo" "$(DEPDIR)/particle_emitter.Po"; else rm -f "$(DEPDIR)/particle_emitter.Tpo"; exit 1; fi 369 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc' object='particle_emitter.obj' libtool=no @AMDEPBACKSLASH@ 370 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/particle_emitter.Po' tmpdepfile='$(DEPDIR)/particle_emitter.TPo' @AMDEPBACKSLASH@ 371 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 372 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particle_emitter.obj `if test -f '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc'; fi` 373 374 state.o: $(MAINSRCDIR)/util/state.cc 375 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.o -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.o `test -f '$(MAINSRCDIR)/util/state.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/state.cc; \ 376 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi 377 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/util/state.cc' object='state.o' libtool=no @AMDEPBACKSLASH@ 378 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.TPo' @AMDEPBACKSLASH@ 379 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 380 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o state.o `test -f '$(MAINSRCDIR)/util/state.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/state.cc 381 382 state.obj: $(MAINSRCDIR)/util/state.cc 383 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.obj -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.obj `if test -f '$(MAINSRCDIR)/util/state.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/state.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/state.cc'; fi`; \ 384 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi 385 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/util/state.cc' object='state.obj' libtool=no @AMDEPBACKSLASH@ 386 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.TPo' @AMDEPBACKSLASH@ 387 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 388 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o state.obj `if test -f '$(MAINSRCDIR)/util/state.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/state.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/state.cc'; fi` 311 389 312 390 model.o: $(MAINSRCDIR)/lib/graphics/importer/model.cc -
orxonox/branches/physics/src/subprojects/particles/framework.cc
r4283 r4293 16 16 #include "framework.h" 17 17 18 #include " vector.h"19 20 #include "primitive_model.h" 18 #include "physics_engine.h" 19 #include "particle_engine.h" 20 21 21 #include "debug.h" 22 22 #include "graphics_engine.h" … … 25 25 26 26 int verbose; 27 void DrawGLScene() 28 { 29 currFrame = SDL_GetTicks(); 30 dt = currFrame - lastFrame; 31 if (dt == 0) 32 dist += (zoomTo-dist)/500; 33 else 34 dist += (zoomTo-dist)/500 *(float)dt; 35 36 rotatorP += rotatorV *(float)dt; 27 28 bool mainLoop() 29 { 30 while(true) 31 { 32 if (!keyHandler()) 33 return false; 34 35 // Draw the scene 36 draw(); 37 38 } 39 40 } 41 42 43 bool draw() 44 { 37 45 38 46 … … 45 53 gluLookAt (0, dist , dist, 0,0,0, up.x,up.y,up.z); 46 54 47 glMatrixMode(GL_MODELVIEW); 48 glPushMatrix(); 49 // glRotatef (180, dir.x, dir.y, dir.z); 50 glMultMatrixf (*matQ); 51 if (obj) 52 obj->draw(); 53 54 glPopMatrix(); 55 55 56 56 57 SDL_GL_SwapBuffers(); // Swap the buffers 58 59 } 60 bool tick() 61 { 62 currFrame = SDL_GetTicks(); 63 float dt = (float)(currFrame - lastFrame) /1000.0; 64 if (dt == 0) 65 dist += (zoomTo-dist); 66 else 67 dist += (zoomTo-dist) *(float)dt; 68 rotatorP += rotatorV *(float)dt; 69 70 ParticleEngine::getInstance()->tick(dt); 71 57 72 lastFrame = currFrame; 58 } 59 60 61 int main(int argc, char *argv[]) 62 { 63 verbose = 3; 64 65 Uint8* keys; // This variable will be used in the keyboard routine 66 int done = false; // We aren't done yet, are we? 67 68 // Create a new OpenGL window with the title "Cone3D Basecode" at 69 // 640x480x32, fullscreen and check for errors along the way 70 GraphicsEngine::getInstance(); 71 72 if (argc>=3) 73 obj = new OBJModel (argv[1], atof(argv[2])); 74 else if (argc>=2) 75 obj = new OBJModel(argv[1]); 76 else 77 obj = new PrimitiveModel(CYLINDER); 78 79 M = Vector(GraphicsEngine::getInstance()->getResolutionY()/2, GraphicsEngine::getInstance()->getResolutionX()/2, 0); 80 rotAxis = Vector (0.0,1.0,0.0); 81 rotAngle = 0; 82 83 matQ[0][0] = matQ[1][1] = matQ[2][2] = matQ[3][3] = 1; 84 rotQ = Quaternion (rotAngle, rotAxis); 85 rotQlast = rotQ; 86 dir = Vector (0.0, 0.0, 1.0); 87 up = Vector (0.0, 1.0, 0.0); 88 89 glEnable(GL_LIGHTING); 90 glEnable(GL_DEPTH_TEST); 91 92 GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0}; 93 GLfloat light0Position[] = {10.0, 10.0, 10.0, 0.0}; 94 GLfloat light1Position[] = {-10.0, -7.0, -6.0, 0.0}; 95 GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0}; 96 97 glEnable(GL_LIGHT0); 98 glLightfv(GL_LIGHT0, GL_POSITION, light0Position); 99 glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight); 100 glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight); 101 102 glEnable(GL_LIGHT1); 103 glLightfv(GL_LIGHT1, GL_POSITION, light1Position); 104 glLightfv(GL_LIGHT1, GL_DIFFUSE, whiteLight); 105 glLightfv(GL_LIGHT1, GL_SPECULAR, whiteLight); 106 107 108 glEnable(GL_TEXTURE_2D); 109 rotatorP = .0; 110 rotatorV = .0; 111 dist = 5.0; 112 zoomTo = dist; 113 // Build the font from a TGA image font.tga in the data directory 114 // Hide the mouse cursor 115 SDL_ShowCursor(2); 116 mouse1Down = false; 117 73 74 } 75 76 77 bool keyHandler() 78 { 118 79 // This is the main loop for the entire program and it will run until done==TRUE 119 while(!done)120 80 { 121 // Draw the scene122 DrawGLScene();123 81 // And poll for events 124 82 SDL_Event event; … … 210 168 { 211 169 case SDLK_x: 212 delete obj; 213 obj = NULL; 170 214 171 break; 215 172 case SDLK_c: 216 if (!obj) 217 obj = new OBJModel(argv[1]); 173 218 174 break; 219 175 case SDLK_a: … … 229 185 case SDL_QUIT: 230 186 // then we're done and we'll end this program 231 done=true;232 187 return false; 188 break; 233 189 default: 234 190 break; 235 191 } 236 237 192 238 193 } … … 242 197 243 198 // and check if ESCAPE has been pressed. If so then quit 244 if(keys[SDLK_ESCAPE]) done=true;199 if(keys[SDLK_ESCAPE]) return false; 245 200 } 246 201 return true; 202 } 203 204 205 int main(int argc, char *argv[]) 206 { 207 verbose = 3; 208 209 210 // Create a new OpenGL window with the title "Cone3D Basecode" at 211 // 640x480x32, fullscreen and check for errors along the way 212 GraphicsEngine::getInstance(); 213 214 215 216 M = Vector(GraphicsEngine::getInstance()->getResolutionY()/2, GraphicsEngine::getInstance()->getResolutionX()/2, 0); 217 rotAxis = Vector (0.0,1.0,0.0); 218 rotAngle = 0; 219 220 matQ[0][0] = matQ[1][1] = matQ[2][2] = matQ[3][3] = 1; 221 rotQ = Quaternion (rotAngle, rotAxis); 222 rotQlast = rotQ; 223 dir = Vector (0.0, 0.0, 1.0); 224 up = Vector (0.0, 1.0, 0.0); 225 226 glEnable(GL_LIGHTING); 227 glEnable(GL_DEPTH_TEST); 228 229 GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0}; 230 GLfloat light0Position[] = {10.0, 10.0, 10.0, 0.0}; 231 GLfloat light1Position[] = {-10.0, -7.0, -6.0, 0.0}; 232 GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0}; 233 234 glEnable(GL_LIGHT0); 235 glLightfv(GL_LIGHT0, GL_POSITION, light0Position); 236 glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight); 237 glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight); 238 239 glEnable(GL_LIGHT1); 240 glLightfv(GL_LIGHT1, GL_POSITION, light1Position); 241 glLightfv(GL_LIGHT1, GL_DIFFUSE, whiteLight); 242 glLightfv(GL_LIGHT1, GL_SPECULAR, whiteLight); 243 244 245 glEnable(GL_TEXTURE_2D); 246 rotatorP = .0; 247 rotatorV = .0; 248 dist = 5.0; 249 zoomTo = dist; 250 // Build the font from a TGA image font.tga in the data directory 251 // Hide the mouse cursor 252 SDL_ShowCursor(2); 253 mouse1Down = false; 254 255 mainLoop(); 256 247 257 // Kill the GL & SDL screens 248 if (obj) 249 delete obj; 258 250 259 delete GraphicsEngine::getInstance(); 251 260 // And quit -
orxonox/branches/physics/src/subprojects/particles/framework.h
r4283 r4293 2 2 #define _FRAMEWORK_H 3 3 4 #include "objModel.h"5 4 #include "vector.h" 5 #include "glincl.h" 6 6 7 7 float rotatorP; … … 13 13 Uint32 lastFrame; 14 14 Uint32 currFrame; 15 Uint32 dt;16 17 15 18 16 Vector dir; … … 29 27 Quaternion rotQlast; 30 28 29 Uint8* keys; // This variable will be used in the keyboard routine 31 30 bool mouse1Down; 32 31 33 Model* obj; 34 32 bool mainLoop(); 33 bool draw(); 34 bool tick(); 35 bool keyHandler(); 35 36 36 37 #endif /* _FRAMEWORK_H */ -
orxonox/branches/physics/src/util/state.cc
r4289 r4293 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_WORLD_ENTITY 17 17 18 #include " proto_singleton.h"18 #include "state.h" 19 19 20 20 using namespace std; … … 24 24 \brief standard constructor 25 25 */ 26 ProtoSingleton::ProtoSingleton()26 State::State () 27 27 { 28 this->setClassName (" ProtoSingleton");28 this->setClassName ("State"); 29 29 30 this->camera = NULL; 31 this->cameraTarget = NULL; 30 32 } 31 33 … … 33 35 \brief the singleton reference to this class 34 36 */ 35 ProtoSingleton* ProtoSingleton::singletonRef = NULL;37 State* State::singletonRef = NULL; 36 38 37 39 /** 38 40 \returns a Pointer to this Class 39 41 */ 40 ProtoSingleton* ProtoSingleton::getInstance(void)42 State* State::getInstance(void) 41 43 { 42 if (! ProtoSingleton::singletonRef)43 ProtoSingleton::singletonRef = new ProtoSingleton();44 return ProtoSingleton::singletonRef;44 if (!State::singletonRef) 45 State::singletonRef = new State(); 46 return State::singletonRef; 45 47 } 46 48 … … 49 51 50 52 */ 51 ProtoSingleton::~ProtoSingleton()53 State::~State () 52 54 { 53 ProtoSingleton::singletonRef = NULL;55 State::singletonRef = NULL; 54 56 55 57 } 58 59 /** 60 \sets camera and target of the current Camera 61 */ 62 void State::setCamera(const PNode* camera, const PNode* cameraTarget) 63 { 64 this->camera = camera; 65 this->cameraTarget = cameraTarget; 66 } -
orxonox/branches/physics/src/util/state.h
r4289 r4293 1 1 /*! 2 2 \file proto_singleton.h 3 \brief Definition of the ...singleton Class3 \brief Definition of the States-singleton Class 4 4 5 5 */ 6 6 7 #ifndef _ PROTO_SINGLETON_H8 #define _ PROTO_SINGLETON_H7 #ifndef _STATE_H 8 #define _STATE_H 9 9 10 10 #include "base_object.h" 11 11 12 12 // FORWARD DEFINITION 13 class PNode; 13 14 14 //! A default singleton class.15 class ProtoSingleton: public BaseObject {15 //! A Singleton class, that handles some states about orxonox's objects 16 class State : public BaseObject { 16 17 17 18 public: 18 static ProtoSingleton* getInstance(void); 19 virtual ~ProtoSingleton(void); 19 static State* getInstance(void); 20 virtual ~State(void); 21 22 void setCamera(const PNode* camera, const PNode* cameraTarget); 23 const PNode* getCamera(void) const { return this->camera; }; 24 const PNode* getCameraTarget(void) const { return this->cameraTarget; }; 20 25 21 26 private: 22 ProtoSingleton(void); 23 static ProtoSingleton* singletonRef; 27 State(void); 28 static State* singletonRef; 29 30 const PNode* camera; 31 const PNode* cameraTarget; 24 32 }; 25 33 26 #endif /* _ PROTO_SINGLETON_H */34 #endif /* _STATE_H */
Note: See TracChangeset
for help on using the changeset viewer.