Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5406 in orxonox.OLD


Ignore:
Timestamp:
Oct 19, 2005, 6:30:07 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: update the Element2D-tree in the right order

Location:
trunk/src
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Makefile.am

    r5353 r5406  
    1313                       util/libORXutils.a \
    1414                       lib/gui/gtk_gui/libORXgui.a \
    15                        lib/gui/gl_gui/libORXglgui.a \
    1615                       lib/graphics/importer/libORXimporter.a \
    1716                       lib/graphics/libORXgraphics.a \
     
    2322                       lib/graphics/spatial_separation/libORXquadtree.a \
    2423                       lib/tinyxml/libtinyxml.a \
     24                       lib/gui/gl_gui/libORXglgui.a \
    2525                       lib/shell/libORXshell.a
    2626
     
    2828                lib/libORXlibs.a \
    2929                lib/gui/gtk_gui/libORXgui.a \
    30                 lib/gui/gl_gui/libORXglgui.a \
    3130                lib/graphics/importer/libORXimporter.a \
    3231                lib/graphics/libORXgraphics.a \
     
    3837                lib/graphics/spatial_separation/libORXquadtree.a \
    3938                lib/tinyxml/libtinyxml.a \
     39                lib/gui/gl_gui/libORXglgui.a \
    4040                lib/shell/libORXshell.a \
    4141                $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
  • trunk/src/Makefile.in

    r5353 r5406  
    227227                       util/libORXutils.a \
    228228                       lib/gui/gtk_gui/libORXgui.a \
    229                        lib/gui/gl_gui/libORXglgui.a \
    230229                       lib/graphics/importer/libORXimporter.a \
    231230                       lib/graphics/libORXgraphics.a \
     
    237236                       lib/graphics/spatial_separation/libORXquadtree.a \
    238237                       lib/tinyxml/libtinyxml.a \
     238                       lib/gui/gl_gui/libORXglgui.a \
    239239                       lib/shell/libORXshell.a
    240240
     
    242242                lib/libORXlibs.a \
    243243                lib/gui/gtk_gui/libORXgui.a \
    244                 lib/gui/gl_gui/libORXglgui.a \
    245244                lib/graphics/importer/libORXimporter.a \
    246245                lib/graphics/libORXgraphics.a \
     
    252251                lib/graphics/spatial_separation/libORXquadtree.a \
    253252                lib/tinyxml/libtinyxml.a \
     253                lib/gui/gl_gui/libORXglgui.a \
    254254                lib/shell/libORXshell.a \
    255255                $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
  • trunk/src/lib/coord/p_node.cc

    r5397 r5406  
    1212   main-programmer: Patrick Boenzli
    1313   co-programmer:
    14 
    15    @todo Smooth-Parent: delay, speed
    1614*/
    1715
     
    3129#include "vector.h"
    3230
    33 //#include "vector.h"
    34 //#include "quaternion.h"
     31#include "color.h"
    3532
    3633using namespace std;
     
    278275  this->setAbsCoor(Vector(x, y, z));
    279276}
     277
     278/**
     279 * @param absCoord set absolute coordinate
     280 * @todo check off
     281 */
     282void PNode::setAbsCoorSoft (const Vector& absCoordSoft, float bias)
     283{
     284  if (this->toCoordinate == NULL)
     285    this->toCoordinate = new Vector;
     286
     287  if( likely(this->parentMode & PNODE_MOVEMENT))
     288  {
     289      /* if you have set the absolute coordinates this overrides all other changes */
     290    if (likely(this->parent != NULL))
     291      *this->toCoordinate = absCoordSoft - parent->getAbsCoor ();
     292    else
     293      *this->toCoordinate = absCoordSoft;
     294  }
     295  if( this->parentMode & PNODE_ROTATE_MOVEMENT)
     296  {
     297    if (likely(this->parent != NULL))
     298      *this->toCoordinate = absCoordSoft - parent->getAbsCoor ();
     299    else
     300      *this->toCoordinate = absCoordSoft;
     301  }
     302}
     303
    280304
    281305/**
     
    695719  }
    696720}
    697 #include "color.h"
    698721
    699722/**
     
    767790    {
    768791      // drawing the Dependency graph
    769       if (this != NullParent::getInstance())
     792     if (this != NullParent::getInstance())
    770793      {
    771794       glBegin(GL_LINES);
  • trunk/src/lib/coord/p_node.h

    r5405 r5406  
    6565  void setAbsCoor (const Vector& absCoord);
    6666  void setAbsCoor (float x, float y, float z);
     67  void setAbsCoorSoft(const Vector& absCoordSoft, float bias = 1.0);
     68  void setAbsCoorSoft(float x, float y, float z, float bias = 1.0);
    6769  /** @returns the absolute position */
    6870  inline const Vector& getAbsCoor () const { return this->absCoordinate; };
  • trunk/src/lib/graphics/graphics_engine.cc

    r5397 r5406  
    508508void GraphicsEngine::update(float dt)
    509509{
    510   NullElement2D::getInstance()->update2D(dt);
     510  Render2D::getInstance()->update(dt);
    511511}
    512512
  • trunk/src/lib/graphics/render2D/render_2d.cc

    r5404 r5406  
    5252
    5353/**
     54 * updates all the 2d-elements
     55 * @param dt the timestep since last dt
     56 */
     57void Render2D::update(float dt)
     58{
     59  NullElement2D::getInstance()->update2D(dt);
     60}
     61
     62
     63/**
    5464 * ticks all the 2d-elements
    5565 * @param dt the timestep since last dt
  • trunk/src/lib/graphics/render2D/render_2d.h

    r5405 r5406  
    2222    inline static Render2D* getInstance() { if (!singletonRef) singletonRef = new Render2D();  return singletonRef; };
    2323
     24    void update(float dt);
    2425    void tick(float dt);
    2526    void draw(short layer) const;
  • trunk/src/lib/gui/gl_gui/Makefile.am

    r5384 r5406  
    1010
    1111libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \
    12                         glgui_handler.cc \
    13                         glgui_mainwidget.cc \
     12                        glgui_handler.cc \
     13                        glgui_mainwidget.cc \
    1414                        glgui_widget.cc \
    1515                        glgui_button.cc \
  • trunk/src/lib/gui/gl_gui/Makefile.in

    r5384 r5406  
    202202libORXglgui_a_CPPFLAGS = -DBUILD_ORXONOX
    203203libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \
    204                         glgui_handler.cc \
    205                         glgui_mainwidget.cc \
     204                        glgui_handler.cc \
     205                        glgui_mainwidget.cc \
    206206                        glgui_widget.cc \
    207207                        glgui_button.cc \
  • trunk/src/lib/gui/gl_gui/glgui_handler.cc

    r5401 r5406  
    1818#include "glgui_handler.h"
    1919#include "event_handler.h"
     20
     21#include "glgui_mainwidget.h"
    2022
    2123using namespace std;
     
    6365
    6466}
     67
     68void GLGuiHandler::draw()
     69{
     70  GLGuiMainWidget::getInstance()->draw2D(E2D_LAYER_TOP);
     71}
     72
     73
     74void GLGuiHandler::tick(float dt)
     75{
     76
     77}
  • trunk/src/lib/gui/gl_gui/glgui_handler.h

    r5405 r5406  
    1717  virtual ~GLGuiHandler(void);
    1818  /** @returns a Pointer to the only object of this Class */
    19   inline static GLGuiHandler* getInstance(void) { if (!singletonRef) singletonRef = new GLGuiHandler();  return singletonRef; };
     19  inline static GLGuiHandler* getInstance(void) { if (!GLGuiHandler::singletonRef) GLGuiHandler::singletonRef = new GLGuiHandler();  return GLGuiHandler::singletonRef; };
    2020
    2121  void activate();
     
    2424
    2525  virtual void process(const Event &event);
     26  void draw();
     27  void tick(float dt);
    2628
    2729 private:
  • trunk/src/lib/gui/gl_gui/glgui_widget.cc

    r5404 r5406  
    5050  this->clickable = true;
    5151  this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE);
    52   this->setParent2D((Element2D*)NULL);
     52//  this->setParent2D((Element2D*)NULL);
    5353
    5454  this->backMat = NULL;
  • trunk/src/lib/shell/shell_completion.cc

    r5330 r5406  
    3333/**
    3434 * standard constructor
    35 */
     35 */
    3636ShellCompletion::ShellCompletion(ShellInput* input)
    3737{
     
    4343/**
    4444 * standard deconstructor
    45 */
     45 */
    4646ShellCompletion::~ShellCompletion ()
    4747{
     
    299299
    300300/**
    301  * searches for classes, which beginn with completionBegin
     301 * @brief searches for classes, which beginn with completionBegin
    302302 * @param inputList the List to parse through
    303303 * @param completionBegin the beginning string
  • trunk/src/story_entities/world.cc

    r5401 r5406  
    924924{
    925925  GarbageCollector::getInstance()->update();
     926  GraphicsEngine::getInstance()->update(this->dtS);
    926927  NullParent::getInstance()->update (this->dtS);
    927   GraphicsEngine::getInstance()->update(this->dtS);
    928928
    929929  SoundEngine::getInstance()->update();
Note: See TracChangeset for help on using the changeset viewer.