Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 14, 2005, 12:28:44 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/physics: simple definition of a PhisicsConnection

File:
1 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics/src/util/physics/physics_connection.cc

    r4178 r4181  
    1010
    1111   ### File Specific:
    12    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1313   co-programmer: ...
    1414*/
     
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
    1717
    18 #include "proto_class.h"
     18#include "physics_connection.h"
     19
    1920
    2021using namespace std;
     
    2324/**
    2425   \brief standard constructor
    25    \todo this constructor is not jet implemented - do it
    2626*/
    27 ProtoClass::ProtoClass ()
     27PhysicsConnection::PhysicsConnection ()
    2828{
    29    this->setClassName ("ProtoClass");
     29   this->setClassName ("PhysicsConnection");
     30   connection = NULL;
    3031}
    3132
     
    3536
    3637*/
    37 ProtoClass::~ProtoClass ()
     38PhysicsConnection::~PhysicsConnection ()
    3839{
    39   // delete what has to be deleted here
     40  if (this->connection)
     41    delete this->connection;
    4042}
     43
     44
     45
     46
     47
     48
     49bool PhysicsConnection::addConnection(ParticleSystem* particleSystem, Field* field)
     50{
     51  if (!this->connection)
     52    {
     53      this->connection = new PhysConnection;
     54      this->connection->type = PCON_ParticlesField;
     55      this->connection->particleSystem = particleSystem;
     56      this->connection->field = field;
     57    }
     58}
Note: See TracChangeset for help on using the changeset viewer.