Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9406 in orxonox.OLD for trunk/src/lib/coord


Ignore:
Timestamp:
Jul 24, 2006, 11:09:47 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the proxy back

merged with commandsvn merge -r9346:HEAD https://svn.orxonox.net/orxonox/branches/proxy .

no conflicts

Location:
trunk/src/lib/coord
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/coord/p_node.cc

    r9235 r9406  
    2121#include "class_list.h"
    2222
     23#include "netdefs.h"
     24
    2325#include <algorithm>
    2426#include "compiler.h"
     
    2729#include "glincl.h"
    2830#include "color.h"
    29 
    30 #include "synchronizeable.h"
    3131
    3232/**
     
    7777PNode::~PNode ()
    7878{
    79   PRINTF(4)("delete %s::%s\n", this->getClassName(), this->getName());
     79  PRINTF(4)("delete %s::%s\n", this->getClassCName(), this->getCName());
    8080  // remove the Node, delete it's children (if required).
    8181  std::list<PNode*>::iterator deleteNode;
     
    9191      {
    9292        PRINTF(4)("%s::%s deletes %s::%s\n",
    93                   this->getClassName(), this->getName(),
    94                   (*deleteNode)->getClassName(), (*deleteNode)->getName());
     93                  this->getClassCName(), this->getCName(),
     94                  (*deleteNode)->getClassCName(), (*deleteNode)->getCName());
    9595        delete (*deleteNode);
    9696      }
     
    9898      {
    9999        PRINTF(4)("%s::%s reparents %s::%s\n",
    100                   this->getClassName(), this->getName(),
    101                   (*deleteNode)->getClassName(), (*deleteNode)->getName());
     100                  this->getClassCName(), this->getCName(),
     101                  (*deleteNode)->getClassCName(), (*deleteNode)->getCName());
    102102        (*deleteNode)->reparent();
    103103      }
     
    106106    {
    107107      PRINTF(4)("%s::%s deletes PNode: %s::%s\n",
    108                 this->getClassName(), this->getName(),
    109                 (*deleteNode)->getClassName(), (*deleteNode)->getName());
     108                this->getClassCName(), this->getCName(),
     109                (*deleteNode)->getClassCName(), (*deleteNode)->getCName());
    110110      delete (*deleteNode);
    111111    }
     
    509509  {
    510510    PRINTF(1)("Tried to reparent to own child '%s::%s' to '%s::%s'.\n",
    511               this->getClassName(), this->getName(), child->getClassName(), child->getName());
     511              this->getClassCName(), this->getCName(), child->getClassCName(), child->getCName());
    512512    child->parent = NULL;
    513513    child->parentCoorChanged();
     
    519519{
    520520  PNode* tmpNode = node->parent;
    521   printf("entering seek PNode loop for name: %s, uid: %i\n", node->getName(), node->getUniqueID());
     521  printf("entering seek PNode loop for name: %s, uid: %i\n", node->getCName(), node->getUniqueID());
    522522  if(tmpNode)
    523     printf("  @node name: %s, uid: %d\n", tmpNode->getName(), tmpNode->getUniqueID());
     523    printf("  @node name: %s, uid: %d\n", tmpNode->getCName(), tmpNode->getUniqueID());
    524524  while( tmpNode != NULL && tmpNode->getUniqueID() == NET_UID_UNASSIGNED)
    525525  {
    526     printf("  @node name: %s, uid: %d\n", tmpNode->getName(), tmpNode->getUniqueID());
     526    printf("  @node name: %s, uid: %d\n", tmpNode->getCName(), tmpNode->getUniqueID());
    527527    tmpNode = tmpNode->parent;
    528528  }
     
    604604        (*reparenter)->parentMode & PNODE_REPARENT_ON_PARENTS_REMOVE)
    605605    {
    606       printf("TEST----------------%s ---- %s\n", this->getClassName(), (*reparenter)->getClassName());
     606      printf("TEST----------------%s ---- %s\n", this->getClassCName(), (*reparenter)->getClassCName());
    607607      (*reparenter)->reparent();
    608       printf("REPARENTED TO: %s::%s\n",(*reparenter)->getParent()->getClassName(),(*reparenter)->getParent()->getName());
     608      printf("REPARENTED TO: %s::%s\n",(*reparenter)->getParent()->getClassCName(),(*reparenter)->getParent()->getCName());
    609609    }
    610610  }
     
    628628  else
    629629    PRINTF(2)("Not Found PNode's (%s::%s) new Parent by Name: %s\n",
    630         this->getClassName(), this->getName(), parentName.c_str());
     630        this->getClassCName(), this->getCName(), parentName.c_str());
    631631}
    632632
     
    785785          delete this->toCoordinate;
    786786          this->toCoordinate = NULL;
    787           PRINTF(5)("SmoothMove of %s finished\n", this->getName());
     787          PRINTF(5)("SmoothMove of %s finished\n", this->getCName());
    788788        }
    789789      }
     
    793793        if (unlikely (shiftLen >= 1.0))
    794794          shiftLen = 1.0;
    795         //printf("%s::%s %f\n", this->getClassName(), this->getName(), this->toStep );
     795        //printf("%s::%s %f\n", this->getClassCName(), this->getName(), this->toStep );
    796796        Quaternion rotQuat = Quaternion::quatSlerp(this->relDirection,*this->toDirection, shiftLen);
    797797        if (this->relDirection.distance(rotQuat) > PNODE_ITERATION_DELTA)
     
    804804          delete this->toDirection;
    805805          this->toDirection = NULL;
    806           PRINTF(5)("SmoothRotate of %s finished\n", this->getName());
     806          PRINTF(5)("SmoothRotate of %s finished\n", this->getCName());
    807807          this->bRelDirChanged = true;
    808808        }
     
    812812      this->lastAbsCoordinate = this->absCoordinate;
    813813
    814       PRINTF(5)("PNode::update - '%s::%s' - (%f, %f, %f)\n", this->getClassName(), this->getName(),
     814      PRINTF(5)("PNode::update - '%s::%s' - (%f, %f, %f)\n", this->getClassCName(), this->getCName(),
    815815                this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    816816
     
    840840    else // Nodes without a Parent are handled faster :: MOST LIKELY THE NULLPARENT
    841841    {
    842       PRINTF(4)("update ParentLess Node (%s::%s) - (%f, %f, %f)\n", this->getClassName(), this->getName(),
     842      PRINTF(4)("update ParentLess Node (%s::%s) - (%f, %f, %f)\n", this->getClassCName(), this->getCName(),
    843843                this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    844844      if (this->bRelCoorChanged)
     
    913913
    914914  PRINT(0)("PNode(%s::%s) - absCoord: (%0.2f, %0.2f, %0.2f), relCoord(%0.2f, %0.2f, %0.2f), direction(%0.2f, %0.2f, %0.2f) - %s - %d childs\n",
    915            this->getClassName(),
    916            this->getName(),
     915           this->getClassCName(),
     916           this->getCName(),
    917917           this->absCoordinate.x,
    918918           this->absCoordinate.y,
     
    10901090{
    10911091  Synchronizeable::varChangeHandler( id );
    1092  
     1092
    10931093  if ( std::find( id.begin(), id.end(), relCoordinate_handle ) != id.end() )
    10941094  {
  • trunk/src/lib/coord/p_node.h

    r8711 r9406  
    2020
    2121#include "base_object.h"
    22 #include "stdincl.h"
    2322#include "synchronizeable.h"
    2423
     
    112111  /** @returns the absolute position */
    113112  inline const Vector& getLastAbsCoor () const { return this->lastAbsCoordinate; };
    114  
     113
    115114  void shiftCoor (const Vector& shift);
    116115  void shiftCoor (float x, float y, float z) { this->shiftCoor(Vector(x, y, z)); };
Note: See TracChangeset for help on using the changeset viewer.