Changeset 10002
- Timestamp:
- Mar 19, 2014, 4:07:48 PM (11 years ago)
- Location:
- code/branches/modularships/src/orxonox/worldentities/pawns
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.cc
r10001 r10002 52 52 #include "collisionshapes/WorldEntityCollisionShape.h" 53 53 #include <BulletCollision/CollisionShapes/btCollisionShape.h> 54 #include <BulletCollision/CollisionShapes/btCompoundShape.h> 55 54 56 55 57 namespace orxonox … … 635 637 // print child shapes of this WECS 636 638 // printChildShapes(ownWECS, 2, 0); 637 printChildShapeMap(ownWECS->getShapesMap()); 639 printBtChildShapes((btCompoundShape*)(ownWECS->getCollisionShape()), 2, 0); 640 // printChildShapeMap(ownWECS->getShapesMap()); 638 641 639 642 … … 699 702 printChildShapes((CompoundCollisionShape*)(cs->getAttachedShape(i)), indent+2, i); 700 703 } 701 */ 704 705 }*/ 706 } 707 708 void Pawn::printBtChildShapes(btCompoundShape* cs, int indent, int subshape) 709 { 710 // e.g. " Childshape 1 (WECS 0x126dc8c0) has 2 childshapes:" 711 printSpaces(indent); orxout() << "Childshape " << subshape << " (btCS* " << cs << ") has " << cs->getNumChildShapes() << " childshapes:" << endl; 712 713 for (int i=0; i < cs->getNumChildShapes(); i++) 714 { 715 printSpaces(indent+2); orxout() << "- " << i << " - - -" << endl; 716 717 // For each childshape, print: 718 719 // pointer to the btCollisionShape 720 printSpaces(indent+2); orxout() << "btCollisionShape*: " << cs->getChildShape(i) << endl; 721 722 // if the childshape is a CompoundCollisionShape, print its children. 723 if (cs->getChildShape(i)->isCompound()) 724 { 725 printSpaces(indent+2); orxout() << "This shape is compound." << endl; 726 printBtChildShapes((btCompoundShape*)(cs->getChildShape(i)), indent+2, i); 727 } 728 702 729 } 703 730 } … … 708 735 } 709 736 710 void Pawn::printSpaces(int num ber)711 { 712 for(int i=0; i<num ber; i++)737 void Pawn::printSpaces(int num) 738 { 739 for(int i=0; i<num; i++) 713 740 orxout() << " "; 714 741 } -
code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.h
r10001 r10002 234 234 virtual int isMyCollisionShape(const btCollisionShape* cs); 235 235 void printChildShapes(CompoundCollisionShape* cs, int indent, int subshape); 236 void printBtChildShapes(btCompoundShape* cs, int indent, int subshape); 236 237 void printSpaces(int num); 237 238 void printChildShapeMap(std::map<CollisionShape*, btCollisionShape*> map);
Note: See TracChangeset
for help on using the changeset viewer.