Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6415 in orxonox.OLD


Ignore:
Timestamp:
Jan 6, 2006, 3:23:36 PM (18 years ago)
Author:
bensch
Message:

network: some debug functions

Location:
branches/network/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/coord/p_node.cc

    r6402 r6415  
    2929
    3030#include "synchronizeable.h"
     31
     32#include "shell_command.h"
     33SHELL_COMMAND(debugNode, PNode, debugNodeSC);
    3134
    3235using namespace std;
  • branches/network/src/lib/coord/p_node.h

    r6402 r6415  
    174174  // DEBUG //
    175175  void countChildNodes(int& nodes) const;
     176  void debugNodeSC (unsigned int depth = 1, unsigned int level = 0) { this->debugNode(depth, level); };
    176177  void debugNode (unsigned int depth = 1, unsigned int level = 0) const;
    177178  void debugDraw(unsigned int depth = 1, float size = 1.0, const Vector& color = Vector(1, 0, 0), unsigned int level = 0) const;
  • branches/network/src/world_entities/world_entity.cc

    r6341 r6415  
    3535    ->defaultValues(2, "models/ships/fighter.obj", 1.0);
    3636
     37SHELL_COMMAND(debugEntity, WorldEntity, debugWE);
    3738
    3839/**
     
    343344}
    344345
     346
     347/**
     348 * Debug the WorldEntity
     349 */
     350void WorldEntity::debugWE()
     351{
     352  PRINT(0)("WorldEntity %s::%s  (DEBUG)\n", this->getClassName(), this->getName());
     353  PRINT(0)("ModelCount %d - ", this->models.size());
     354  for (unsigned int i = 0; i < this->models.size(); i++)
     355  {
     356    if (models[i] != NULL)
     357      PRINT(0)(" : %d:%s", i, this->models[i]->getName());
     358  }
     359  PRINT(0)("\n");
     360
     361}
     362
     363
    345364/**
    346365 * Writes data from network containing information about the state
  • branches/network/src/world_entities/world_entity.h

    r6341 r6415  
    6060  void drawBVTree(unsigned int depth, int drawMode) const;
    6161
     62
     63  void debugWE();
     64
    6265  /* @returns the Count of Faces on this WorldEntity */
    6366  //unsigned int getFaceCount () const { return (this->model != NULL)?this->model->getFaceCount():0; };
Note: See TracChangeset for help on using the changeset viewer.