Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3528 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Mar 13, 2005, 9:09:25 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: TrackNode gets initialized by TrackManager now.

Location:
orxonox/trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/Makefile.in

    r3521 r3528  
    5555am_orxonox_OBJECTS = orxonox.$(OBJEXT) game_loader.$(OBJEXT) \
    5656        command_node.$(OBJEXT) keynames.$(OBJEXT) camera.$(OBJEXT) \
    57         track_manager.$(OBJEXT) light.$(OBJEXT) story_entity.$(OBJEXT) \
    58         campaign.$(OBJEXT) world.$(OBJEXT) world_entity.$(OBJEXT) \
    59         player.$(OBJEXT) environment.$(OBJEXT) skysphere.$(OBJEXT) \
    60         primitive.$(OBJEXT) ai.$(OBJEXT) p_node.$(OBJEXT) \
    61         null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \
     57        track_manager.$(OBJEXT) track_node.$(OBJEXT) light.$(OBJEXT) \
     58        story_entity.$(OBJEXT) campaign.$(OBJEXT) world.$(OBJEXT) \
     59        world_entity.$(OBJEXT) player.$(OBJEXT) environment.$(OBJEXT) \
     60        skysphere.$(OBJEXT) primitive.$(OBJEXT) ai.$(OBJEXT) \
     61        p_node.$(OBJEXT) null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \
    6262        data_tank.$(OBJEXT) fontset.$(OBJEXT) array.$(OBJEXT) \
    6363        objModel.$(OBJEXT) model.$(OBJEXT) material.$(OBJEXT) \
     
    8888@AMDEP_TRUE@    ./$(DEPDIR)/primitive.Po ./$(DEPDIR)/skysphere.Po \
    8989@AMDEP_TRUE@    ./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/texture.Po \
    90 @AMDEP_TRUE@    ./$(DEPDIR)/track_manager.Po ./$(DEPDIR)/vector.Po \
     90@AMDEP_TRUE@    ./$(DEPDIR)/track_manager.Po \
     91@AMDEP_TRUE@    ./$(DEPDIR)/track_node.Po ./$(DEPDIR)/vector.Po \
    9192@AMDEP_TRUE@    ./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po
    9293CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     
    223224                 camera.cc \
    224225                 track_manager.cc \
     226                 track_node.cc \
    225227                 light.cc \
    226228                 story_entities/story_entity.cc \
     
    262264                 message_structures.h \
    263265                 light.h \
     266                 track_manager.h \
     267                 track_node.h \
    264268                 story_entities/story_entity.h \
    265269                 story_entities/story_def.h \
     
    315319          esac; \
    316320        done; \
    317         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
     321        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
    318322        cd $(top_srcdir) && \
    319           $(AUTOMAKE) --foreign  src/Makefile
     323          $(AUTOMAKE) --gnu  src/Makefile
    320324.PRECIOUS: Makefile
    321325Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    399403@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
    400404@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_manager.Po@am__quote@
     405@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_node.Po@am__quote@
    401406@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
    402407@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world.Po@am__quote@
  • orxonox/trunk/src/lib/Makefile.in

    r3502 r3528  
    181181          esac; \
    182182        done; \
    183         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/Makefile'; \
     183        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/Makefile'; \
    184184        cd $(top_srcdir) && \
    185           $(AUTOMAKE) --foreign  src/lib/Makefile
     185          $(AUTOMAKE) --gnu  src/lib/Makefile
    186186.PRECIOUS: Makefile
    187187Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/graphics/Makefile.in

    r3502 r3528  
    175175          esac; \
    176176        done; \
    177         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/Makefile'; \
     177        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/Makefile'; \
    178178        cd $(top_srcdir) && \
    179           $(AUTOMAKE) --foreign  src/lib/graphics/Makefile
     179          $(AUTOMAKE) --gnu  src/lib/graphics/Makefile
    180180.PRECIOUS: Makefile
    181181Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/graphics/importer/Makefile.in

    r3502 r3528  
    215215          esac; \
    216216        done; \
    217         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile'; \
     217        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile'; \
    218218        cd $(top_srcdir) && \
    219           $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile
     219          $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile
    220220.PRECIOUS: Makefile
    221221Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/gui/Makefile.in

    r3502 r3528  
    177177          esac; \
    178178        done; \
    179         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/Makefile'; \
     179        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/Makefile'; \
    180180        cd $(top_srcdir) && \
    181           $(AUTOMAKE) --foreign  src/lib/gui/Makefile
     181          $(AUTOMAKE) --gnu  src/lib/gui/Makefile
    182182.PRECIOUS: Makefile
    183183Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/gui/console/Makefile.in

    r3502 r3528  
    203203          esac; \
    204204        done; \
    205         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile'; \
     205        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile'; \
    206206        cd $(top_srcdir) && \
    207           $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile
     207          $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile
    208208.PRECIOUS: Makefile
    209209Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/gui/gui/Makefile.in

    r3502 r3528  
    236236          esac; \
    237237        done; \
    238         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile'; \
     238        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile'; \
    239239        cd $(top_srcdir) && \
    240           $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile
     240          $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile
    241241.PRECIOUS: Makefile
    242242Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/track_manager.cc

    r3527 r3528  
    1919#include "p_node.h"
    2020
     21#include "track_node.h"
     22
    2123#include <stdarg.h>
    22 #include "p_node.h"
    2324
    2425using namespace std;
     
    206207{
    207208  this->setClassName ("TrackManager");
     209 
     210  singletonRef = this;
    208211
    209212  PRINTF(3)("Initializing the TrackManager\n");
     
    214217  this->maxTime = 0;
    215218  this->trackElemCount = 1;
    216   this->bindSlave = NULL;
     219  this->bindSlave = TrackNode::getInstance();
    217220}
    218221
     
    242245TrackManager* TrackManager::getInstance(void)
    243246{
    244   if (TrackManager::singletonRef)
    245     return TrackManager::singletonRef;
    246   else
    247     return TrackManager::singletonRef = new TrackManager();
     247  if (!singletonRef)
     248    singletonRef = new TrackManager();
     249  return singletonRef;
    248250}
    249251
     
    694696void TrackManager::setBindSlave(PNode* bindSlave)
    695697{
    696   if (!this->bindSlave)
     698  if (this->bindSlave == TrackNode::getInstance() || bindSlave == TrackNode::getInstance())
    697699    this->bindSlave = bindSlave;
     700  else
     701    PRINTF(2)("Already a Bindslave set that is not the TrackNode itself. Not updating\n");
    698702}
    699703
  • orxonox/trunk/src/track_node.cc

    r3522 r3528  
    2929TrackNode* TrackNode::getInstance ()
    3030{
    31   if (singletonRef == NULL)
     31  if (!singletonRef)
    3232    singletonRef = new TrackNode ();
    3333  return singletonRef;
     
    4141TrackNode::TrackNode ()
    4242{
     43  this->setClassName("TrackNode");
     44  singletonRef = this;
     45
    4346  NullParent::getInstance()->addChild(this);
    4447  this->trackManager = TrackManager::getInstance();
Note: See TracChangeset for help on using the changeset viewer.