Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jun 11, 2005, 12:55:48 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: setClassID implemented in all files

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

Legend:

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

    r4480 r4597  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    3131PhysicsConnection::PhysicsConnection(PhysicsInterface* subject, Field* field)
    3232{
     33  this->setClassID(CL_PHYSICS_CONNECTION, "PhysicsConnection");
    3334  this->type = PCON_PhysIField;
    3435  this->subject = subject;
     
    4344
    4445*/
    45 PhysicsConnection::~PhysicsConnection () 
     46PhysicsConnection::~PhysicsConnection ()
    4647{
    4748  PhysicsEngine::getInstance()->removeConnection(this);
    4849}
    4950
    50 /** 
     51/**
    5152    \brief applies the Force to some Object.
    5253*/
  • orxonox/trunk/src/lib/physics/physics_connection.h

    r4480 r4597  
    1 /*! 
     1/*!
    22    \file physics_connection.h
    33    \brief Definition of The Physical Connection Class.
    44*/
    55
    6 #ifndef _PHYSICS_CONNECTION_H 
     6#ifndef _PHYSICS_CONNECTION_H
    77#define _PHYSICS_CONNECTION_H
    88
     
    1414
    1515//! An enumerator for different ConnectionTypes
    16 typedef enum PCON_Type { PCON_PhysIPhysI = 0,
    17                          PCON_PhysIField = 1};
     16typedef enum PCON_Type
     17{
     18  PCON_PhysIPhysI = 1,
     19  PCON_PhysIField = 2
     20};
    1821
    1922
     
    3437 private:
    3538  PCON_Type type;                    //!< What kind of connection this is.
    36  
     39
    3740  PhysicsInterface* subject;         //!< The main Subject of this Connection.
    3841  PhysicsInterface* partner2;        //!< The second partner of this Connection.
    39  
     42
    4043  Field* field;                      //!< The field to connect either subject of ParticleSystem to.
    4144};
  • orxonox/trunk/src/lib/physics/physics_engine.cc

    r4558 r4597  
    3030PhysicsEngine::PhysicsEngine()
    3131{
    32    this->setClassName ("PhysicsEngine");
    33 
    34    this->connections = new tList<PhysicsConnection>;
    35    this->interfaces = new tList<PhysicsInterface>;
    36    this->fields = new tList<Field>;
     32  this->setClassID(CL_PHYSICS_ENGINE, "PhysicsEngine");
     33  this->setName("PhysicsEngine");
     34  this->connections = new tList<PhysicsConnection>;
     35  this->interfaces = new tList<PhysicsInterface>;
     36  this->fields = new tList<Field>;
    3737}
    3838
  • orxonox/trunk/src/lib/physics/physics_interface.cc

    r4558 r4597  
    3535/**
    3636   \brief standard constructor
    37 */
     37 */
    3838PhysicsInterface::PhysicsInterface (void* objectPointer)
    3939{
     40  this->setClassID(CL_PHYSICS_INTERFACE, "PhysicsInterface");
    4041  this->objectPointer = objectPointer;
    4142
    42   //   this->setClassName ("PhysicsInterface");
    43    this->mass = 1;
    44    this->massChildren = 0;
    45    this->forceSum = Vector(0, 0, 0);
    46    this->bForceApplied = false;
     43  this->mass = 1;
     44  this->massChildren = 0;
     45  this->forceSum = Vector(0, 0, 0);
     46  this->bForceApplied = false;
    4747
    4848   PhysicsEngine::getInstance()->addPhysicsInterface(this);
  • orxonox/trunk/src/lib/physics/physics_interface.h

    r4558 r4597  
    2828class PhysicsInterface : virtual public BaseObject
    2929{
    30 
    3130 public:
    3231  PhysicsInterface(void* objectPointer);
Note: See TracChangeset for help on using the changeset viewer.