Changeset 9406 in orxonox.OLD for trunk/src/lib/coord
- Timestamp:
- Jul 24, 2006, 11:09:47 AM (18 years ago)
- Location:
- trunk/src/lib/coord
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r9235 r9406 21 21 #include "class_list.h" 22 22 23 #include "netdefs.h" 24 23 25 #include <algorithm> 24 26 #include "compiler.h" … … 27 29 #include "glincl.h" 28 30 #include "color.h" 29 30 #include "synchronizeable.h"31 31 32 32 /** … … 77 77 PNode::~PNode () 78 78 { 79 PRINTF(4)("delete %s::%s\n", this->getClass Name(), this->getName());79 PRINTF(4)("delete %s::%s\n", this->getClassCName(), this->getCName()); 80 80 // remove the Node, delete it's children (if required). 81 81 std::list<PNode*>::iterator deleteNode; … … 91 91 { 92 92 PRINTF(4)("%s::%s deletes %s::%s\n", 93 this->getClass Name(), this->getName(),94 (*deleteNode)->getClass Name(), (*deleteNode)->getName());93 this->getClassCName(), this->getCName(), 94 (*deleteNode)->getClassCName(), (*deleteNode)->getCName()); 95 95 delete (*deleteNode); 96 96 } … … 98 98 { 99 99 PRINTF(4)("%s::%s reparents %s::%s\n", 100 this->getClass Name(), this->getName(),101 (*deleteNode)->getClass Name(), (*deleteNode)->getName());100 this->getClassCName(), this->getCName(), 101 (*deleteNode)->getClassCName(), (*deleteNode)->getCName()); 102 102 (*deleteNode)->reparent(); 103 103 } … … 106 106 { 107 107 PRINTF(4)("%s::%s deletes PNode: %s::%s\n", 108 this->getClass Name(), this->getName(),109 (*deleteNode)->getClass Name(), (*deleteNode)->getName());108 this->getClassCName(), this->getCName(), 109 (*deleteNode)->getClassCName(), (*deleteNode)->getCName()); 110 110 delete (*deleteNode); 111 111 } … … 509 509 { 510 510 PRINTF(1)("Tried to reparent to own child '%s::%s' to '%s::%s'.\n", 511 this->getClass Name(), this->getName(), child->getClassName(), child->getName());511 this->getClassCName(), this->getCName(), child->getClassCName(), child->getCName()); 512 512 child->parent = NULL; 513 513 child->parentCoorChanged(); … … 519 519 { 520 520 PNode* tmpNode = node->parent; 521 printf("entering seek PNode loop for name: %s, uid: %i\n", node->get Name(), node->getUniqueID());521 printf("entering seek PNode loop for name: %s, uid: %i\n", node->getCName(), node->getUniqueID()); 522 522 if(tmpNode) 523 printf(" @node name: %s, uid: %d\n", tmpNode->get Name(), tmpNode->getUniqueID());523 printf(" @node name: %s, uid: %d\n", tmpNode->getCName(), tmpNode->getUniqueID()); 524 524 while( tmpNode != NULL && tmpNode->getUniqueID() == NET_UID_UNASSIGNED) 525 525 { 526 printf(" @node name: %s, uid: %d\n", tmpNode->get Name(), tmpNode->getUniqueID());526 printf(" @node name: %s, uid: %d\n", tmpNode->getCName(), tmpNode->getUniqueID()); 527 527 tmpNode = tmpNode->parent; 528 528 } … … 604 604 (*reparenter)->parentMode & PNODE_REPARENT_ON_PARENTS_REMOVE) 605 605 { 606 printf("TEST----------------%s ---- %s\n", this->getClass Name(), (*reparenter)->getClassName());606 printf("TEST----------------%s ---- %s\n", this->getClassCName(), (*reparenter)->getClassCName()); 607 607 (*reparenter)->reparent(); 608 printf("REPARENTED TO: %s::%s\n",(*reparenter)->getParent()->getClass Name(),(*reparenter)->getParent()->getName());608 printf("REPARENTED TO: %s::%s\n",(*reparenter)->getParent()->getClassCName(),(*reparenter)->getParent()->getCName()); 609 609 } 610 610 } … … 628 628 else 629 629 PRINTF(2)("Not Found PNode's (%s::%s) new Parent by Name: %s\n", 630 this->getClass Name(), this->getName(), parentName.c_str());630 this->getClassCName(), this->getCName(), parentName.c_str()); 631 631 } 632 632 … … 785 785 delete this->toCoordinate; 786 786 this->toCoordinate = NULL; 787 PRINTF(5)("SmoothMove of %s finished\n", this->get Name());787 PRINTF(5)("SmoothMove of %s finished\n", this->getCName()); 788 788 } 789 789 } … … 793 793 if (unlikely (shiftLen >= 1.0)) 794 794 shiftLen = 1.0; 795 //printf("%s::%s %f\n", this->getClass Name(), this->getName(), this->toStep );795 //printf("%s::%s %f\n", this->getClassCName(), this->getName(), this->toStep ); 796 796 Quaternion rotQuat = Quaternion::quatSlerp(this->relDirection,*this->toDirection, shiftLen); 797 797 if (this->relDirection.distance(rotQuat) > PNODE_ITERATION_DELTA) … … 804 804 delete this->toDirection; 805 805 this->toDirection = NULL; 806 PRINTF(5)("SmoothRotate of %s finished\n", this->get Name());806 PRINTF(5)("SmoothRotate of %s finished\n", this->getCName()); 807 807 this->bRelDirChanged = true; 808 808 } … … 812 812 this->lastAbsCoordinate = this->absCoordinate; 813 813 814 PRINTF(5)("PNode::update - '%s::%s' - (%f, %f, %f)\n", this->getClass Name(), this->getName(),814 PRINTF(5)("PNode::update - '%s::%s' - (%f, %f, %f)\n", this->getClassCName(), this->getCName(), 815 815 this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 816 816 … … 840 840 else // Nodes without a Parent are handled faster :: MOST LIKELY THE NULLPARENT 841 841 { 842 PRINTF(4)("update ParentLess Node (%s::%s) - (%f, %f, %f)\n", this->getClass Name(), this->getName(),842 PRINTF(4)("update ParentLess Node (%s::%s) - (%f, %f, %f)\n", this->getClassCName(), this->getCName(), 843 843 this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 844 844 if (this->bRelCoorChanged) … … 913 913 914 914 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->getClass Name(),916 this->get Name(),915 this->getClassCName(), 916 this->getCName(), 917 917 this->absCoordinate.x, 918 918 this->absCoordinate.y, … … 1090 1090 { 1091 1091 Synchronizeable::varChangeHandler( id ); 1092 1092 1093 1093 if ( std::find( id.begin(), id.end(), relCoordinate_handle ) != id.end() ) 1094 1094 { -
trunk/src/lib/coord/p_node.h
r8711 r9406 20 20 21 21 #include "base_object.h" 22 #include "stdincl.h"23 22 #include "synchronizeable.h" 24 23 … … 112 111 /** @returns the absolute position */ 113 112 inline const Vector& getLastAbsCoor () const { return this->lastAbsCoordinate; }; 114 113 115 114 void shiftCoor (const Vector& shift); 116 115 void shiftCoor (float x, float y, float z) { this->shiftCoor(Vector(x, y, z)); };
Note: See TracChangeset
for help on using the changeset viewer.