Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5111 in orxonox.OLD for trunk/src/lib/graphics/render2D


Ignore:
Timestamp:
Aug 23, 2005, 11:13:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: reverted the last steps, because they created a huge pack of seg-faults

Location:
trunk/src/lib/graphics/render2D
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r5110 r5111  
    5555
    5656  tIterator<Element2D>* iterator = this->children->getIterator();
    57   Element2D* pn = iterator->firstElement();
     57  Element2D* pn = iterator->nextElement();
    5858  while( pn != NULL)
    5959  {
     
    214214void Element2D::setRelCoor2D (const Vector& relCoord)
    215215{
    216   if (this->toCoordinate!= NULL)
    217   {
    218     delete this->toCoordinate;
    219     this->toCoordinate = NULL;
    220   }
    221216  this->relCoordinate = relCoord;
    222217  this->bRelCoorChanged = true;
     
    232227void Element2D::setRelCoor2D (float x, float y, float z)
    233228{
    234   this->setRelCoor2D(Vector(x,y,z));
     229  this->setAbsCoor2D(Vector(x,y,z));
    235230}
    236231
     
    293288void Element2D::setAbsCoor2D (const Vector& absCoord)
    294289{
    295   if (this->toCoordinate!= NULL)
    296   {
    297     delete this->toCoordinate;
    298     this->toCoordinate = NULL;
    299   }
    300 
    301290  if( likely(this->parentMode & E2D_PARENT_MOVEMENT))
    302291  {
     
    373362void Element2D::setRelDir2D (float relDir)
    374363{
    375   if (this->toDirection!= NULL)
    376   {
    377     delete this->toDirection;
    378     this->toDirection = NULL;
    379   }
    380 
    381364  this->relDirection = relDir;
    382365  this->bRelDirChanged = true;
     
    403386void Element2D::setAbsDir2D (float absDir)
    404387{
    405   if (this->toDirection!= NULL)
    406   {
    407     delete this->toDirection;
    408     this->toDirection = NULL;
    409   }
    410 
    411388  if (likely(this->parent != NULL))
    412389    this->relDirection = absDir - this->parent->getAbsDir2D();
     
    479456{
    480457  tIterator<Element2D>* iterator = this->children->getIterator();
    481   Element2D* pn = iterator->firstElement();
     458  Element2D* pn = iterator->nextElement();
    482459
    483460  while( pn != NULL)
     
    687664  {
    688665    tIterator<Element2D>* iterator = this->children->getIterator();
    689     Element2D* pn = iterator->firstElement();
     666    Element2D* pn = iterator->nextElement();
    690667    while( pn != NULL)
    691668    {
     
    697674
    698675      pn->update2D(dt);
     676          //pn = this->children->nextElement();
    699677      pn = iterator->nextElement();
    700678    }
     
    734712  {
    735713    tIterator<Element2D>* iterator = this->children->getIterator();
    736     Element2D* pn = iterator->firstElement();
     714      //PNode* pn = this->children->enumerate ();
     715    Element2D* pn = iterator->nextElement();
    737716    while( pn != NULL)
    738717    {
  • trunk/src/lib/graphics/render2D/element_2d.h

    r5109 r5111  
    108108    /** @returns the relative position */
    109109    inline const Vector& getRelCoor2D () const { return this->prevRelCoordinate; };
    110     /** @returns the Relative Coordinate Destination */
    111     inline const Vector& getRelCoorSoft2D() const { return (this->toCoordinate)?*this->toCoordinate:this->relCoordinate; };
    112110    const Vector& getRelCoor2Dpx() const;
    113111    void setAbsCoor2D (const Vector& absCoord);
     
    125123    /** @returns the relative Direction */
    126124    inline float getRelDir2D () const { return this->prevRelDirection; };
    127     /** @returns the Relative Directional Destination */
    128     inline float getRelDirSoft2D() const { return (this->toDirection)?*this->toDirection:this->relDirection; };
    129125    void setAbsDir2D (float absDir);
    130126    /** @returns the absolute Direction */
  • trunk/src/lib/graphics/render2D/render_2d.cc

    r5110 r5111  
    105105  {
    106106    tIterator<Element2D>* iterator = this->element2DList[i]->getIterator();
    107     Element2D* elem = iterator->firstElement();
     107    Element2D* elem = iterator->nextElement();
    108108    while (elem != NULL)
    109109    {
     
    131131    {
    132132      tIterator<Element2D>* iterator = this->element2DList[i]->getIterator();
    133       Element2D* elem = iterator->firstElement();
     133      Element2D* elem = iterator->nextElement();
    134134      while (elem != NULL)
    135135      {
Note: See TracChangeset for help on using the changeset viewer.