Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2008, 12:50:05 PM (16 years ago)
Author:
scheusso
Message:

merged network branch to presentation branch

Location:
code/branches/presentation
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/orxonox/objects/worldentities/Backlight.cc

  • code/branches/presentation/src/orxonox/objects/worldentities/Backlight.h

  • code/branches/presentation/src/orxonox/objects/worldentities/Billboard.cc

    r2171 r2371  
    6464    void Billboard::registerVariables()
    6565    {
    66         REGISTERSTRING(this->material_, direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
    67         REGISTERDATA  (this->colour_,   direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
     66        registerVariable(this->material_, variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
     67        registerVariable(this->colour_,   variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
    6868    }
    6969
  • code/branches/presentation/src/orxonox/objects/worldentities/Camera.cc

  • code/branches/presentation/src/orxonox/objects/worldentities/Camera.h

  • code/branches/presentation/src/orxonox/objects/worldentities/ControllableEntity.cc

    r2171 r2371  
    165165                this->client_overwrite_ = this->server_overwrite_;
    166166COUT(0) << "CE: bidirectional synchronization" << std::endl;
    167                 this->setObjectMode(direction::bidirectional);
     167                this->setObjectMode(objectDirection::bidirectional);
    168168            }
    169169        }
     
    178178        this->playerID_ = OBJECTID_UNKNOWN;
    179179        this->bControlled_ = false;
    180         this->setObjectMode(direction::toclient);
     180        this->setObjectMode(objectDirection::toclient);
    181181
    182182        if (this->bDestroyWhenPlayerLeft_)
     
    248248    void ControllableEntity::registerVariables()
    249249    {
    250         REGISTERSTRING(this->cameraPositionTemplate_, direction::toclient);
    251 
    252         REGISTERDATA(this->client_overwrite_,   direction::toserver);
    253        
    254         REGISTERDATA(this->server_position_,    direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
    255         REGISTERDATA(this->server_velocity_,    direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity));
    256         REGISTERDATA(this->server_orientation_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
    257         REGISTERDATA(this->server_overwrite_,   direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
    258 
    259         REGISTERDATA(this->client_position_,    direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
    260         REGISTERDATA(this->client_velocity_,    direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity));
    261         REGISTERDATA(this->client_orientation_, direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
    262 
    263 
    264         REGISTERDATA(this->playerID_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
     250        registerVariable(this->cameraPositionTemplate_, variableDirection::toclient);
     251 
     252        registerVariable(this->client_overwrite_,   variableDirection::toserver);
     253         
     254        registerVariable(this->server_position_,    variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
     255        registerVariable(this->server_velocity_,    variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity));
     256        registerVariable(this->server_orientation_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
     257        registerVariable(this->server_overwrite_,   variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
     258 
     259        registerVariable(this->client_position_,    variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
     260        registerVariable(this->client_velocity_,    variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity));
     261        registerVariable(this->client_orientation_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
     262 
     263 
     264        registerVariable(this->playerID_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
    265265    }
    266266
  • code/branches/presentation/src/orxonox/objects/worldentities/Light.cc

    r2171 r2371  
    7979    void Light::registerVariables()
    8080    {
    81         REGISTERDATA(this->type_, direction::toclient, new NetworkCallback<Light>(this, &Light::changedType));
    82         REGISTERDATA(this->light_->getDiffuseColour(), direction::toclient);
    83         REGISTERDATA(this->light_->getSpecularColour(), direction::toclient);
    84         REGISTERDATA(this->light_->getDirection(), direction::toclient);
     81        registerVariable((int &)this->type_, variableDirection::toclient, new NetworkCallback<Light>(this, &Light::changedType));
     82        registerVariable(this->light_->getDiffuseColour(), variableDirection::toclient);
     83        registerVariable(this->light_->getSpecularColour(), variableDirection::toclient);
     84        registerVariable(this->light_->getDirection(), variableDirection::toclient);
    8585    }
    8686
  • code/branches/presentation/src/orxonox/objects/worldentities/Model.cc

    r2171 r2371  
    4040    Model::Model(BaseObject* creator) : PositionableEntity(creator)
    4141    {
     42        static unsigned int i=10;
    4243        RegisterObject(Model);
    4344
    4445        this->registerVariables();
     46        this->setObjectPriority(i++);
    4547    }
    4648
     
    6163    void Model::registerVariables()
    6264    {
    63         REGISTERSTRING(this->meshSrc_,    direction::toclient, new NetworkCallback<Model>(this, &Model::changedMesh));
    64         REGISTERDATA(this->bCastShadows_, direction::toclient, new NetworkCallback<Model>(this, &Model::changedShadows));
     65        registerVariable(this->meshSrc_,    variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedMesh));
     66        registerVariable(this->bCastShadows_, variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedShadows));
    6567    }
    6668
  • code/branches/presentation/src/orxonox/objects/worldentities/MovableEntity.cc

    r2171 r2371  
    8484    void MovableEntity::registerVariables()
    8585    {
    86         REGISTERDATA(this->velocity_.x, direction::toclient);
    87         REGISTERDATA(this->velocity_.y, direction::toclient);
    88         REGISTERDATA(this->velocity_.z, direction::toclient);
    89 
    90         REGISTERDATA(this->rotationAxis_.x, direction::toclient);
    91         REGISTERDATA(this->rotationAxis_.y, direction::toclient);
    92         REGISTERDATA(this->rotationAxis_.z, direction::toclient);
    93 
    94         REGISTERDATA(this->rotationRate_, direction::toclient);
    95 
    96         REGISTERDATA(this->overwrite_position_,    direction::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
    97         REGISTERDATA(this->overwrite_orientation_, direction::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
     86        registerVariable(this->velocity_.x, variableDirection::toclient);
     87        registerVariable(this->velocity_.y, variableDirection::toclient);
     88        registerVariable(this->velocity_.z, variableDirection::toclient);
     89 
     90        registerVariable(this->rotationAxis_.x, variableDirection::toclient);
     91        registerVariable(this->rotationAxis_.y, variableDirection::toclient);
     92        registerVariable(this->rotationAxis_.z, variableDirection::toclient);
     93 
     94        registerVariable(this->rotationRate_, variableDirection::toclient);
     95 
     96        registerVariable(this->overwrite_position_,    variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
     97        registerVariable(this->overwrite_orientation_, variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
    9898    }
    9999
  • code/branches/presentation/src/orxonox/objects/worldentities/ParticleEmitter.cc

    r2171 r2371  
    7575    void ParticleEmitter::registerVariables()
    7676    {
    77         REGISTERSTRING(this->source_, direction::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
    78         REGISTERDATA  (this->LOD_,    direction::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
     77        registerVariable(this->source_, variableDirection::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
     78        registerVariable((int&)(this->LOD_),    variableDirection::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
    7979    }
    8080
  • code/branches/presentation/src/orxonox/objects/worldentities/ParticleSpawner.cc

  • code/branches/presentation/src/orxonox/objects/worldentities/ParticleSpawner.h

  • code/branches/presentation/src/orxonox/objects/worldentities/PositionableEntity.cc

    r2171 r2371  
    4848    void PositionableEntity::registerVariables()
    4949    {
    50         REGISTERDATA(this->getPosition().x, direction::toclient);
    51         REGISTERDATA(this->getPosition().y, direction::toclient);
    52         REGISTERDATA(this->getPosition().z, direction::toclient);
     50        registerVariable(this->getPosition().x, variableDirection::toclient);
     51        registerVariable(this->getPosition().y, variableDirection::toclient);
     52        registerVariable(this->getPosition().z, variableDirection::toclient);
    5353
    54         REGISTERDATA(this->getOrientation().w, direction::toclient);
    55         REGISTERDATA(this->getOrientation().x, direction::toclient);
    56         REGISTERDATA(this->getOrientation().y, direction::toclient);
    57         REGISTERDATA(this->getOrientation().z, direction::toclient);
     54        registerVariable(this->getOrientation().w, variableDirection::toclient);
     55        registerVariable(this->getOrientation().x, variableDirection::toclient);
     56        registerVariable(this->getOrientation().y, variableDirection::toclient);
     57        registerVariable(this->getOrientation().z, variableDirection::toclient);
    5858    }
    5959}
  • code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.cc

    r2171 r2371  
    9696    void WorldEntity::registerVariables()
    9797    {
    98         REGISTERDATA(this->bActive_,  direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
    99         REGISTERDATA(this->bVisible_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
    100 
    101         REGISTERDATA(this->getScale3D().x, direction::toclient);
    102         REGISTERDATA(this->getScale3D().y, direction::toclient);
    103         REGISTERDATA(this->getScale3D().z, direction::toclient);
    104 
    105         REGISTERDATA(this->parentID_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent));
     98        registerVariable(this->bActive_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
     99        registerVariable(this->bVisible_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
     100 
     101        registerVariable(this->getScale3D().x, variableDirection::toclient);
     102        registerVariable(this->getScale3D().y, variableDirection::toclient);
     103        registerVariable(this->getScale3D().z, variableDirection::toclient);
     104 
     105        registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent));
    106106    }
    107107
  • code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.h

    r2171 r2371  
    3636#include <OgreSceneNode.h>
    3737
    38 #include "network/Synchronisable.h"
     38#include "network/synchronisable/Synchronisable.h"
    3939#include "core/BaseObject.h"
    4040#include "util/Math.h"
  • code/branches/presentation/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r2171 r2371  
    8080    void Pawn::registerVariables()
    8181    {
    82         REGISTERDATA(this->bAlive_, direction::toclient);
    83         REGISTERDATA(this->health_, direction::toclient);
     82        registerVariable(this->bAlive_, variableDirection::toclient);
     83        registerVariable(this->health_, variableDirection::toclient);
    8484    }
    8585
  • code/branches/presentation/src/orxonox/objects/worldentities/pawns/SpaceShip.cc

    r2171 r2371  
    8282    void SpaceShip::registerVariables()
    8383    {
    84         REGISTERDATA(this->maxSpeed_,                direction::toclient);
    85         REGISTERDATA(this->maxSecondarySpeed_,       direction::toclient);
    86         REGISTERDATA(this->maxRotation_,             direction::toclient);
    87         REGISTERDATA(this->translationAcceleration_, direction::toclient);
    88         REGISTERDATA(this->rotationAcceleration_,    direction::toclient);
    89         REGISTERDATA(this->translationDamping_,      direction::toclient);
     84        registerVariable(this->maxSpeed_,                variableDirection::toclient);
     85        registerVariable(this->maxSecondarySpeed_,       variableDirection::toclient);
     86        registerVariable(this->maxRotation_,             variableDirection::toclient);
     87        registerVariable(this->translationAcceleration_, variableDirection::toclient);
     88        registerVariable(this->rotationAcceleration_,    variableDirection::toclient);
     89        registerVariable(this->translationDamping_,      variableDirection::toclient);
    9090    }
    9191
  • code/branches/presentation/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r2171 r2371  
    8686    void Spectator::registerVariables()
    8787    {
    88         REGISTERDATA(this->bGreetingFlareVisible_, direction::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
    89         REGISTERDATA(this->bGreeting_,             direction::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
    90         REGISTERDATA(this->hudmode_,               direction::toclient);
     88        registerVariable(this->bGreetingFlareVisible_, variableDirection::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
     89        registerVariable(this->bGreeting_,             variableDirection::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
     90        registerVariable(this->hudmode_,               variableDirection::toclient);
    9191    }
    9292
  • code/branches/presentation/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc

  • code/branches/presentation/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h

  • code/branches/presentation/src/orxonox/objects/worldentities/triggers/Trigger.cc

  • code/branches/presentation/src/orxonox/objects/worldentities/triggers/Trigger.h

Note: See TracChangeset for help on using the changeset viewer.