Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4731 in orxonox.OLD for orxonox/trunk/src/lib/physics


Ignore:
Timestamp:
Jun 29, 2005, 2:10:40 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: ok, Gravity, and PhysicalConnection loadable

Location:
orxonox/trunk/src/lib/physics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/physics/physics_connection.cc

    r4728 r4731  
    3737  this->setClassID(CL_PHYSICS_CONNECTION, "PhysicsConnection");
    3838  this->type = PCON_PhysIField;
     39
    3940  this->subject = subject;
    4041  this->field = field;
     
    5556  LoadParam<PhysicsConnection>(root, "field", this, &PhysicsConnection::setField)
    5657      .describe("set the field by name");
     58
     59  PhysicsEngine::getInstance()->addConnection(this);
    5760}
    5861
     
    7376  this->subject = PhysicsEngine::getInstance()->getPhysicsInterfaceByName(subjectName);
    7477  if (this->subject == NULL)
     78  {
    7579    PRINTF(2)("subject: (%s) not found for PhysicsConnection\n", subjectName);
     80  }
     81  else
     82    PRINTF(5)("subject::%s\n", this->subject->getName());
    7683}
    7784
     
    8390  this->field = PhysicsEngine::getInstance()->getFieldByName(fieldName);
    8491  if (this->field == NULL)
    85     PRINTF(2)("field: (%s) not found for PhysicsConnection\n", fieldName);
     92  {
     93        PRINTF(2)("field: (%s) not found for PhysicsConnection\n", fieldName);
     94  }
     95  else
     96    PRINTF(5)("field::%s\n", this->field->getName());
     97
    8698}
    8799
  • orxonox/trunk/src/lib/physics/physics_connection.h

    r4728 r4731  
    2323// Forward Declaration
    2424
    25 //! A class that Handles Physical Connection between subjects
     25//! A class that Handles Physical Connection between different subjects
    2626class PhysicsConnection : public BaseObject
    2727{
  • orxonox/trunk/src/lib/physics/physics_engine.cc

    r4730 r4731  
    6060  const TiXmlElement* element = NULL;
    6161
    62   PRINTF(0)("Loading Physical Fields\n");
     62  PRINTF(4)("Loading Physical Fields\n");
    6363  element = root->FirstChildElement("Fields");
    64   printf("PPPPPOOOOINNNTERRRR: %p\n", element);
    6564  element = element->FirstChildElement();
    66   printf("PPPPPOOOOINNNTERRRR: %p\n", element);
    6765  while (element != NULL)
    6866  {
    69     Factory::getFirst()->fabricate(element)->getName();
     67    Factory::getFirst()->fabricate(element);
    7068
    7169    element = element->NextSiblingElement();
     
    7371  element = NULL;
    7472
    75   PRINTF(0)("Loading Physical Connections\n");
     73  PRINTF(4)("Loading Physical Connections\n");
    7674  element = root->FirstChildElement("Connections");
    7775  element = element->FirstChildElement();
Note: See TracChangeset for help on using the changeset viewer.