Changeset 4298 in orxonox.OLD for orxonox/branches/physics/src
- Timestamp:
- May 26, 2005, 2:03:33 PM (20 years ago)
- Location:
- orxonox/branches/physics/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/lib/graphics/light.h
r3603 r4298 11 11 #define _LIGHT_H 12 12 13 #include " world_entity.h"13 #include "p_node.h" 14 14 #include "glincl.h" 15 15 … … 21 21 22 22 //! A class that handles Lights. The LightManager operates on this. 23 class Light : public WorldEntity23 class Light : public PNode 24 24 { 25 25 public: -
orxonox/branches/physics/src/subprojects/particles/Makefile.am
r4297 r4298 40 40 $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc \ 41 41 $(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc \ 42 $(MAINSRCDIR)/lib/graphics/light.cc \ 42 43 $(MAINSRCDIR)/util/state.cc \ 43 44 $(MAINSRCDIR)/world_entities/camera.cc \ -
orxonox/branches/physics/src/subprojects/particles/Makefile.in
r4297 r4298 55 55 am_particles_OBJECTS = framework.$(OBJEXT) particle_engine.$(OBJEXT) \ 56 56 particle_system.$(OBJEXT) particle_emitter.$(OBJEXT) \ 57 state.$(OBJEXT) camera.$(OBJEXT) model.$(OBJEXT) \58 objModel.$(OBJEXT) primitive_model.$(OBJEXT) array.$(OBJEXT) \59 material.$(OBJEXT) texture.$(OBJEXT) graphics_engine.$(OBJEXT) \60 base_object.$(OBJEXT) vector.$(OBJEXT) \61 resource_manager.$(OBJEXT) text_engine.$(OBJEXT) \62 p_node.$(OBJEXT) null_parent.$(OBJEXT)57 light.$(OBJEXT) state.$(OBJEXT) camera.$(OBJEXT) \ 58 model.$(OBJEXT) objModel.$(OBJEXT) primitive_model.$(OBJEXT) \ 59 array.$(OBJEXT) material.$(OBJEXT) texture.$(OBJEXT) \ 60 graphics_engine.$(OBJEXT) base_object.$(OBJEXT) \ 61 vector.$(OBJEXT) resource_manager.$(OBJEXT) \ 62 text_engine.$(OBJEXT) p_node.$(OBJEXT) null_parent.$(OBJEXT) 63 63 particles_OBJECTS = $(am_particles_OBJECTS) 64 64 particles_DEPENDENCIES = $(MAINSRCDIR)/lib/physics/libORXphysics.a … … 70 70 @AMDEP_TRUE@ ./$(DEPDIR)/framework.Po \ 71 71 @AMDEP_TRUE@ ./$(DEPDIR)/graphics_engine.Po \ 72 @AMDEP_TRUE@ ./$(DEPDIR)/ material.Po ./$(DEPDIR)/model.Po \73 @AMDEP_TRUE@ ./$(DEPDIR)/ null_parent.Po ./$(DEPDIR)/objModel.Po \74 @AMDEP_TRUE@ ./$(DEPDIR)/ p_node.Po \72 @AMDEP_TRUE@ ./$(DEPDIR)/light.Po ./$(DEPDIR)/material.Po \ 73 @AMDEP_TRUE@ ./$(DEPDIR)/model.Po ./$(DEPDIR)/null_parent.Po \ 74 @AMDEP_TRUE@ ./$(DEPDIR)/objModel.Po ./$(DEPDIR)/p_node.Po \ 75 75 @AMDEP_TRUE@ ./$(DEPDIR)/particle_emitter.Po \ 76 76 @AMDEP_TRUE@ ./$(DEPDIR)/particle_engine.Po \ … … 207 207 $(MAINSRCDIR)/lib/graphics/particles/particle_system.cc \ 208 208 $(MAINSRCDIR)/lib/graphics/particles/particle_emitter.cc \ 209 $(MAINSRCDIR)/lib/graphics/light.cc \ 209 210 $(MAINSRCDIR)/util/state.cc \ 210 211 $(MAINSRCDIR)/world_entities/camera.cc \ … … 295 296 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framework.Po@am__quote@ 296 297 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphics_engine.Po@am__quote@ 298 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/light.Po@am__quote@ 297 299 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@ 298 300 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@ … … 373 375 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 374 376 @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` 377 378 light.o: $(MAINSRCDIR)/lib/graphics/light.cc 379 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT light.o -MD -MP -MF "$(DEPDIR)/light.Tpo" -c -o light.o `test -f '$(MAINSRCDIR)/lib/graphics/light.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/light.cc; \ 380 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/light.Tpo" "$(DEPDIR)/light.Po"; else rm -f "$(DEPDIR)/light.Tpo"; exit 1; fi 381 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/light.cc' object='light.o' libtool=no @AMDEPBACKSLASH@ 382 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/light.Po' tmpdepfile='$(DEPDIR)/light.TPo' @AMDEPBACKSLASH@ 383 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 384 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o light.o `test -f '$(MAINSRCDIR)/lib/graphics/light.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/light.cc 385 386 light.obj: $(MAINSRCDIR)/lib/graphics/light.cc 387 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT light.obj -MD -MP -MF "$(DEPDIR)/light.Tpo" -c -o light.obj `if test -f '$(MAINSRCDIR)/lib/graphics/light.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/light.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/light.cc'; fi`; \ 388 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/light.Tpo" "$(DEPDIR)/light.Po"; else rm -f "$(DEPDIR)/light.Tpo"; exit 1; fi 389 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/light.cc' object='light.obj' libtool=no @AMDEPBACKSLASH@ 390 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/light.Po' tmpdepfile='$(DEPDIR)/light.TPo' @AMDEPBACKSLASH@ 391 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 392 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o light.obj `if test -f '$(MAINSRCDIR)/lib/graphics/light.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/light.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/light.cc'; fi` 375 393 376 394 state.o: $(MAINSRCDIR)/util/state.cc -
orxonox/branches/physics/src/subprojects/particles/framework.cc
r4297 r4298 48 48 bool Framework::draw(float dt) 49 49 { 50 51 52 50 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); 53 51 glLoadIdentity(); // Reset the view … … 94 92 if (mouse1Down) 95 93 { 96 int mX = event.button.x; 97 int mY = event.button.y; 98 int wH = GraphicsEngine::getInstance()->getResolutionY(); 99 int wW = GraphicsEngine::getInstance()->getResolutionX(); 100 Vector tmpV (mX, mY, sqrt ( (float) abs(wH * wH/4 - (wW/2-mX) * (wW/2-mX) - (wH/2-mY) * (wH/2-mY)) )); 101 // PRINTF(0)("tmpV: %f, %f, %f\n", tmpV.x, tmpV.y, tmpV.z); 102 p2 = tmpV-M; 103 p2.y = -p2.y; 104 rotAxis = p1.cross(p2); 105 // PRINTF(0)("rotAxis: %f, %f, %f\n", rotAxis.x, rotAxis.y, rotAxis.z); 106 107 // in case that there is no rotation-axis defined 108 if (rotAxis.x != 0 || rotAxis.y != 0 || rotAxis.z != 0) 94 /* 95 int mX = event.button.x; 96 int mY = event.button.y; 97 int wH = GraphicsEngine::getInstance()->getResolutionY(); 98 int wW = GraphicsEngine::getInstance()->getResolutionX(); 99 Vector tmpV (mX, mY, sqrt ( (float) abs(wH * wH/4 - (wW/2-mX) * (wW/2-mX) - (wH/2-mY) * (wH/2-mY)) )); 100 // PRINTF(0)("tmpV: %f, %f, %f\n", tmpV.x, tmpV.y, tmpV.z); 101 p2 = tmpV-M; 102 p2.y = -p2.y; 103 rotAxis = p1.cross(p2); 104 // PRINTF(0)("rotAxis: %f, %f, %f\n", rotAxis.x, rotAxis.y, rotAxis.z); 105 106 // in case that there is no rotation-axis defined 107 if (rotAxis.x != 0 || rotAxis.y != 0 || rotAxis.z != 0) 109 108 { 110 111 112 113 114 115 116 117 118 119 109 rotAxis.normalize(); 110 // PRINTF(0)("rotAxis: %f, %f, %f\n", rotAxis.x, rotAxis.y, rotAxis.z, rotAngle); 111 112 rotAngle = angleRad (p1, p2); 113 rotQ = Quaternion (rotAngle, rotAxis); 114 rotQ = rotQ * rotQlast; 115 rotQ.matrix (matQ); 116 // dir = rotQ.apply(dir); 117 // dir.normalize(); 118 // PRINTF(0)("rotAxis: %f, %f, %f, %f\n", dir.x, dir.y, dir.z, rotAngle); 120 119 } 121 rotQlast = rotQ; 122 p1 = p2; 120 rotQlast = rotQ; 121 p1 = p2; 122 */ 123 123 124 124 } … … 172 172 { 173 173 case SDLK_x: 174 174 175 175 break; 176 176 case SDLK_c: -
orxonox/branches/physics/src/world_entities/camera.h
r3953 r4298 19 19 This class controls the viewpoint from which the World is rendered. 20 20 */ 21 class Camera : public PNode 21 class Camera : public PNode 22 22 { 23 23 private:
Note: See TracChangeset
for help on using the changeset viewer.