Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4471 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Jun 2, 2005, 2:05:58 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: synchronisable class commented, light altered

Location:
orxonox/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/defs/debug.h

    r4389 r4471  
    7878
    7979#define DEBUG_MODULE_NULL_PARENT        0
     80#define DEBUG_MODULE_NETWORK            0
    8081
    8182
  • orxonox/trunk/src/lib/graphics/light.cc

    r4381 r4471  
    5151}
    5252
     53
    5354/**
    5455   \brief destroys a Light
     
    5859  glDisable(lightsV[this->lightNumber]);
    5960}
     61
    6062
    6163/**
     
    7678}
    7779
     80
    7881/**
    7982   \brief Sets a Position of this Light.
     
    8790}
    8891
     92
    8993/**
    9094   \brief sets an emitting Diffuse color of this Light
     
    103107}
    104108
     109
    105110/**
    106111   \brief sets an emitting Specular color of this Light
     
    119124}
    120125
     126
    121127/**
    122128   \brief Sets the AttenuationType of this Light Source
     
    136142}
    137143
     144
    138145/**
    139146   \brief stets the direction of the Spot Light.
     
    149156}
    150157
     158
    151159/**
    152160   \brief sets the cutoff angle of the Light.
     
    159167}
    160168
     169
    161170/**
    162171   \returns the Position of the Light
     
    166175  return Vector(this->lightPosition[0], this->lightPosition[1], this->lightPosition[2]);
    167176}
     177
    168178
    169179/**
     
    176186  glLightfv(lightsV[this->lightNumber], GL_POSITION, pos);
    177187}
     188
    178189
    179190/**
     
    235246}
    236247
     248
    237249/**
    238250   \brief singleton-Reference to the Light-class
    239251*/
    240252LightManager* LightManager::singletonRef = NULL;
     253
    241254
    242255/**
     
    250263}
    251264
     265
    252266/**
    253267   \brief initializes a new Light with default values, and enables GL_LIGHTING
     
    257271  lights[lightNumber] = new Light(lightNumber);
    258272}
     273
    259274
    260275/**
     
    272287}
    273288
     289
    274290/**
    275291   \brief Adds a new Light
     
    290306}
    291307
     308
    292309/**
    293310   \brief select the light to work with
     
    304321}
    305322
     323
    306324/**
    307325   \brief Delete the current Light
     
    317335  this->deleteLight(this->currentLight->getLightNumber());
    318336}
     337
    319338
    320339/**
     
    331350    }
    332351}
     352
    333353
    334354/**
     
    364384}
    365385
     386
    366387/**
    367388   \brief sets The Position of the currently selected Light
     
    372393  this->currentLight->setPosition(position);
    373394}
     395
    374396
    375397/**
     
    389411}
    390412
     413
    391414/**
    392415   \brief sets an emitting Diffuse color of the currently selected Light
     
    405428}
    406429
     430
    407431/**
    408432   \brief sets an emitting Specular color of the currently selected Light
     
    421445}
    422446
     447
    423448/**
    424449   \brief Sets the AttenuationType of th currently selecte LightSource Light Source
     
    452477}
    453478
     479
    454480/**
    455481   \brief sets the cutoff angle of the Light.
     
    466492}
    467493
     494
    468495// get Attributes
    469496/**
     
    480507    return this->currentLight->getPosition();
    481508}
     509
    482510
    483511/**
     
    496524}
    497525
     526
    498527/**
    499528   \returns a pointer to a Light
     
    504533  return this->lights[lightNumber];
    505534}
     535
    506536
    507537/**
  • orxonox/trunk/src/lib/network/synchronisable.cc

    r3476 r4471  
    1616*/
    1717
     18#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_NETWORK
    1819
    1920#include "synchronisable.h"
     
    2324
    2425
    25 
     26/**
     27   \brief constructor for this class
     28 */
    2629Synchronisable::Synchronisable () {}
    2730
    2831
    29 
     32/**
     33   \brief deconstructor for this class
     34*/
    3035Synchronisable::~Synchronisable () {}
    3136
    3237
     38/**
     39   \brief gets the state of this object
     40   \returns the state
     41*/
     42worldEntityState* Synchronisable::getState()
     43{}
     44
     45
     46/**
     47   \brief sets the state of this object
     48   \param state: the current state
     49*/
     50void Synchronisable::setState(worldEntityState* state)
     51{}
  • orxonox/trunk/src/lib/network/synchronisable.h

    r3476 r4471  
     1/*!
     2    \file synchronisable.h
     3    \brief informations about objects, that needs to be synchronized over the network
     4
     5    this is just an idea, no implementatin yet. but sounds very good to me!
     6*/
    17
    28#ifndef _SYNCHRONISABLE_H
    39#define _SYNCHRONISABLE_H
    410
    5 #include "data_tank.h"
    611
    712
     13//! this is a... ehm... i have no idea...
     14typedef struct worldEntityState
     15{
     16  int    entity;                   //!< probably a entity id? hm...
     17};
     18
     19
     20//! an abstract class to handle the synchronisation process
    821class Synchronisable {
    922
     
    1225  ~Synchronisable ();
    1326
    14   struct worldEntityState {
    15     /*Vector position; */
    16     /*Vector orientation; */
    17   };
     27  worldEntityState* getState();
     28  void setState(worldEntityState* state);
    1829
    19   worldEntityState* getState();
    20   void setState(worldEntityState*);
    21 
     30  worldentityState state;            //!< the current state of the object
    2231};
    2332
Note: See TracChangeset for help on using the changeset viewer.