Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4293 in orxonox.OLD for orxonox/branches/physics/src/subprojects


Ignore:
Timestamp:
May 26, 2005, 10:34:14 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/physics: intoducing state: stors the Camera position globally somewhere we have to store this data

Location:
orxonox/branches/physics/src/subprojects/particles
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics/src/subprojects/particles/Makefile.am

    r4292 r4293  
    1414AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/util
    1515AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/math
     16AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/physics
     17AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/physics/fields
    1618AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/tinyxml
    1719AM_CXXFLAGS+=-I$(MAINSRCDIR)/defs
     
    3032AM_LDFLAGS=$(MWINDOWS)
    3133
    32 bin_PROGRAMS=importer
     34bin_PROGRAMS = particles
    3335
     36particles_LDADD = $(MAINSRCDIR)/lib/physics/libORXphysics.a
    3437
    35 importer_SOURCES= framework.cc \
     38particles_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 \
    3643                  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
    3744                  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
     
    4855                  $(MAINSRCDIR)/lib/coord/null_parent.cc
    4956
    50 noinst_HEADERS = framework.h 
     57noinst_HEADERS = framework.h
  • orxonox/branches/physics/src/subprojects/particles/Makefile.in

    r4292 r4293  
    1616
    1717
    18 SOURCES = $(importer_SOURCES)
     18SOURCES = $(particles_SOURCES)
    1919
    2020srcdir = @srcdir@
     
    3939POST_UNINSTALL = :
    4040host_triplet = @host@
    41 bin_PROGRAMS = importer$(EXEEXT)
     41bin_PROGRAMS = particles$(EXEEXT)
    4242subdir = src/subprojects/particles
    4343DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
     
    5353binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5454PROGRAMS = $(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) \
     55am_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) \
    5860        base_object.$(OBJEXT) vector.$(OBJEXT) \
    5961        resource_manager.$(OBJEXT) text_engine.$(OBJEXT) \
    6062        p_node.$(OBJEXT) null_parent.$(OBJEXT)
    61 importer_OBJECTS = $(am_importer_OBJECTS)
    62 importer_LDADD = $(LDADD)
     63particles_OBJECTS = $(am_particles_OBJECTS)
     64particles_DEPENDENCIES = $(MAINSRCDIR)/lib/physics/libORXphysics.a
    6365DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
    6466depcomp = $(SHELL) $(top_srcdir)/depcomp
     
    7173@AMDEP_TRUE@    ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \
    7274@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 \
    7378@AMDEP_TRUE@    ./$(DEPDIR)/primitive_model.Po \
    7479@AMDEP_TRUE@    ./$(DEPDIR)/resource_manager.Po \
    75 @AMDEP_TRUE@    ./$(DEPDIR)/text_engine.Po ./$(DEPDIR)/texture.Po \
    76 @AMDEP_TRUE@    ./$(DEPDIR)/vector.Po
     80@AMDEP_TRUE@    ./$(DEPDIR)/state.Po ./$(DEPDIR)/text_engine.Po \
     81@AMDEP_TRUE@    ./$(DEPDIR)/texture.Po ./$(DEPDIR)/vector.Po
    7782CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    7883        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    8085CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
    8186        -o $@
    82 SOURCES = $(importer_SOURCES)
    83 DIST_SOURCES = $(importer_SOURCES)
     87SOURCES = $(particles_SOURCES)
     88DIST_SOURCES = $(particles_SOURCES)
    8489HEADERS = $(noinst_HEADERS)
    8590ETAGS = etags
     
    195200target_vendor = @target_vendor@
    196201MAINSRCDIR = ../..
    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)/subprojects
     202AM_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
    198203AM_LDFLAGS = $(MWINDOWS)
    199 importer_SOURCES = framework.cc \
     204particles_LDADD = $(MAINSRCDIR)/lib/physics/libORXphysics.a
     205particles_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 \
    200210                  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
    201211                  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
     
    212222                  $(MAINSRCDIR)/lib/coord/null_parent.cc
    213223
    214 noinst_HEADERS = framework.h 
     224noinst_HEADERS = framework.h
    215225all: all-am
    216226
     
    269279clean-binPROGRAMS:
    270280        -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)
     281particles$(EXEEXT): $(particles_OBJECTS) $(particles_DEPENDENCIES)
     282        @rm -f particles$(EXEEXT)
     283        $(CXXLINK) $(particles_LDFLAGS) $(particles_OBJECTS) $(particles_LDADD) $(LIBS)
    274284
    275285mostlyclean-compile:
     
    288298@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objModel.Po@am__quote@
    289299@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@
    290303@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@
    291304@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@
     305@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Po@am__quote@
    292306@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_engine.Po@am__quote@
    293307@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
     
    309323@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    310324@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
     325
     326particle_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
     334particle_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
     342particle_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
     350particle_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
     358particle_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
     366particle_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
     374state.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
     382state.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`
    311389
    312390model.o: $(MAINSRCDIR)/lib/graphics/importer/model.cc
  • orxonox/branches/physics/src/subprojects/particles/framework.cc

    r4283 r4293  
    1616#include "framework.h"
    1717
    18 #include "vector.h"
    19 
    20 #include "primitive_model.h"
     18#include "physics_engine.h"
     19#include "particle_engine.h"
     20
    2121#include "debug.h"
    2222#include "graphics_engine.h"
     
    2525
    2626int 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
     28bool 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
     43bool draw()
     44{
    3745 
    3846
     
    4553    gluLookAt (0, dist , dist, 0,0,0, up.x,up.y,up.z);
    4654
    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
    5556
    5657  SDL_GL_SwapBuffers(); // Swap the buffers
     58
     59}
     60bool 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
    5772  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
     77bool keyHandler()
     78{
    11879  // This is the main loop for the entire program and it will run until done==TRUE
    119   while(!done)
    12080  {
    121     // Draw the scene
    122     DrawGLScene();
    12381    // And poll for events
    12482    SDL_Event event;
     
    210168          {
    211169          case SDLK_x:
    212             delete obj;
    213             obj = NULL;
     170
    214171            break;
    215172          case SDLK_c:
    216             if (!obj)
    217               obj = new OBJModel(argv[1]);
     173
    218174            break;
    219175          case SDLK_a:
     
    229185      case SDL_QUIT:
    230186        // then we're done and we'll end this program
    231           done=true;
    232           break;
     187        return false;
     188        break;
    233189      default:
    234           break;
     190        break;
    235191      }
    236 
    237192
    238193    }
     
    242197
    243198    // 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;
    245200  }
    246 
     201  return true;
     202}
     203
     204
     205int 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   
    247257  // Kill the GL & SDL screens
    248   if (obj)
    249     delete obj;
     258
    250259  delete GraphicsEngine::getInstance();
    251260  // And quit
  • orxonox/branches/physics/src/subprojects/particles/framework.h

    r4283 r4293  
    22#define _FRAMEWORK_H
    33 
    4 #include "objModel.h"
    54#include "vector.h"
     5#include "glincl.h"
    66
    77float rotatorP;
     
    1313Uint32 lastFrame;
    1414Uint32 currFrame;
    15 Uint32 dt;
    16 
    1715
    1816Vector dir;
     
    2927Quaternion rotQlast;
    3028
     29Uint8* keys; // This variable will be used in the keyboard routine
    3130bool mouse1Down;
    3231
    33 Model* obj;
    34 
     32bool mainLoop();
     33bool draw();
     34bool tick();
     35bool keyHandler();
    3536
    3637#endif /* _FRAMEWORK_H */
Note: See TracChangeset for help on using the changeset viewer.