Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2017, 4:48:03 PM (7 years ago)
Author:
kohlia
Message:

Near object, near point and at area work!

Location:
code/branches/ScriptableController_HS17/src
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ScriptableController_HS17/src/libraries/core/BaseObject.h

    r11518 r11583  
    193193            static void loadAllEventStates(Element& xmlelement, XMLPort::Mode mode, BaseObject* object, Identifier* identifier);
    194194
    195             virtual void registerToScriptableController(ScriptableController *controller) {}
    196195
    197196        protected:
  • code/branches/ScriptableController_HS17/src/orxonox/Level.cc

    r11562 r11583  
    172172    {
    173173        this->objects_.push_back(object);
    174         object->registerToScriptableController(this->controller_.get());
    175174    }
    176175
     
    208207        orxout(internal_info) << "player entered level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << endl;
    209208        player->switchGametype(this->getGametype());
    210 
    211         if(player->isHumanPlayer() && player->isLocalPlayer())
    212         {
    213             this->getScriptableController()->setPlayer(player);
    214             this->controller_->runScript(this->level_script_);
    215         }
    216209    }
    217210
  • code/branches/ScriptableController_HS17/src/orxonox/Level.h

    r11562 r11583  
    6060                { return this->controller_.get(); }
    6161
     62            inline const std::string &getScript(void)
     63                { return this->level_script_; }
     64
    6265
    6366        private:
  • code/branches/ScriptableController_HS17/src/orxonox/gamestates/GSLevel.cc

    r11355 r11583  
    100100        if (GameMode::isMaster())
    101101        {
     102            orxout(user_info) << "Load level" << std::endl;
    102103            this->loadLevel();
    103104        }
     
    113114            ModifyConsoleCommand(__CC_startMainMenu_name).activate();
    114115        }
     116        orxout(user_info) << "All loaded" << std::endl;
    115117
    116118        if (GameMode::isStandalone())
  • code/branches/ScriptableController_HS17/src/orxonox/infos/GametypeInfo.cc

    r11099 r11583  
    4343#include "interfaces/GametypeMessageListener.h"
    4444#include "interfaces/NotificationListener.h"
     45#include "scriptablecontroller/scriptable_controller.h"
     46#include "Level.h"
    4547
    4648#include "PlayerInfo.h"
     
    310312        {
    311313            if(this->hasStarted() && !this->hasEnded())
    312 
    313314                this->setSpawnedHelper(player, true);
     315        }
     316
     317        if(player->isHumanPlayer() && player->isLocalPlayer())
     318        {
     319            this->getLevel()->getScriptableController()->setPlayer(player);
     320            this-getLevel()->getScriptableController()->runScript(this->getLevel()->getScript());
    314321        }
    315322    }
  • code/branches/ScriptableController_HS17/src/orxonox/scriptablecontroller/scriptable_controller.cc

    r11562 r11583  
    33#include "luatb.h"
    44#include "infos/PlayerInfo.h"
     5#include "core/command/Executor.h"
    56
    67namespace orxonox
     
    1112{
    1213    int ret;
     14
     15    // Not having a script specified at all is not an error
     16    if(file_path.empty())
     17        return 0;
    1318
    1419    // Create a lua object
     
    4550    this->apis_.push_back(std::unique_ptr<ScriptableControllerAPI>(api));
    4651
    47     // Only the caller knows, when the end-of-life of the script is reached,
    48     // so we give him control over when to destroy it.
    4952    return 0;
    5053}
     
    5558}
    5659
    57 void ScriptableController::registerWorldEntity(int id, WorldEntity *obj)
     60void ScriptableController::registerWorldEntity(std::string id, WorldEntity *entity)
    5861{
    59     orxout(user_info) << "WorldEntity registered (id: " << id << ")" << std::endl;
    60     this->worldEntities_[id] = obj;
     62    this->worldEntities_[id] = entity;
    6163}
    6264
    63 void ScriptableController::registerControllableEntity(int id, ControllableEntity *obj)
     65void ScriptableController::registerControllableEntity(std::string id, ControllableEntity *entity)
    6466{
    65     orxout(user_info) << "ControllableEntity registered (id: " << id << ")" << std::endl;
    66     this->worldEntities_[id] = obj;
     67    this->worldEntities_[id] = entity;
    6768}
    6869
    69 WorldEntity *ScriptableController::getWorldEntityByID(int id) const
     70WorldEntity *ScriptableController::getWorldEntityByID(std::string id) const
    7071{
    71     if(id == 0)
     72    if(id == "player" || id == "Player" || id == "PLAYER")
    7273        return this->player_->getControllableEntity();
    7374
    74     auto obj = this->worldEntities_.find(id);
    75     return obj != this->worldEntities_.end() ? obj->second : nullptr;
     75    auto entity = this->worldEntities_.find(id);
     76    return entity != this->worldEntities_.end() ? entity->second : nullptr;
    7677}
    7778
    78 ControllableEntity *ScriptableController::getControllableEntityByID(int id) const
     79ControllableEntity *ScriptableController::getControllableEntityByID(std::string id) const
    7980{
    80     if(id == 0)
     81    if(id == "player" || id == "Player" || id == "PLAYER")
    8182        return this->player_->getControllableEntity();
    8283
    83     auto obj = this->controllabelEntities_.find(id);
    84     return obj != this->controllabelEntities_.end() ? obj->second : nullptr;
    85 }
    86 
    87 void ScriptableController::addNearObjectHandler(int obj1, int obj2, double distance, std::function<void (int,int)> callback)
    88 {
    89     orxout(user_info) << "NearObject registering (id 1: " << obj1 << ", id 2: " << obj2 << ")" << std::endl;
    90 
    91     WorldEntity *entity1 = this->getWorldEntityByID(obj1);
    92     WorldEntity *entity2 = this->getWorldEntityByID(obj2);
    93 
    94     NearObjectHandler *handler1 = new NearObjectHandler(entity2, distance, callback);
    95     NearObjectHandler *handler2 = new NearObjectHandler(entity1, distance, callback);
    96 
    97     this->nearObjectHandlers_[entity1].push_front(std::unique_ptr<NearObjectHandler>(handler1));
    98     this->nearObjectHandlers_[entity2].push_front(std::unique_ptr<NearObjectHandler>(handler2));
    99 
    100     handler1->otherHandler_ = this->nearObjectHandlers_[entity2].begin();
    101     handler2->otherHandler_ = this->nearObjectHandlers_[entity1].begin();
    102 }
    103 
    104 void ScriptableController::objectMoved(WorldEntity *obj)
    105 {
    106     // Temp
    107     return;
    108 
    109     auto &nearObjectHandlers = this->nearObjectHandlers_[obj];
    110     auto handler = nearObjectHandlers.begin();
    111     while(handler != nearObjectHandlers.end())
    112     {
    113         WorldEntity *other = (*handler)->otherObject_;
    114         if((obj->getPosition() - other->getPosition()).length() < (*handler)->distance_)
    115         {
    116             (*handler)->callback_(obj->getID(), other->getID());
    117 
    118             auto otherHandler = (*handler)->otherHandler_;
    119             handler = nearObjectHandlers.erase(handler);
    120             if(nearObjectHandlers.empty())
    121                 this->nearObjectHandlers_.erase(obj);
    122 
    123             this->nearObjectHandlers_[other].erase(otherHandler);
    124             if(this->nearObjectHandlers_[other].empty())
    125                 this->nearObjectHandlers_.erase(other);
    126         }
    127         else
    128         {
    129             handler++;
    130         }
    131     }
     84    auto entity = this->controllabelEntities_.find(id);
     85    return entity != this->controllabelEntities_.end() ? entity->second : nullptr;
    13286}
    13387
  • code/branches/ScriptableController_HS17/src/orxonox/scriptablecontroller/scriptable_controller.h

    r11562 r11583  
    1111#include "worldentities/WorldEntity.h"
    1212#include "worldentities/ControllableEntity.h"
     13#include "tools/Timer.h"
    1314
    1415struct lua_State;
     
    2021{
    2122public:
    22     struct NearObjectHandler
    23     {
    24         NearObjectHandler(WorldEntity *otherObject, double distance, std::function<void (int, int)> callback)
    25             : otherObject_(otherObject), distance_(distance), callback_(callback)
    26         {}
    27 
    28         WorldEntity *otherObject_;
    29         double distance_;
    30         std::function<void (int, int)> callback_;
    31         std::list<std::unique_ptr<NearObjectHandler> >::iterator otherHandler_;
    32     };
    33 
    3423    int runScript(const std::string &file_path);
    3524
    3625    void setPlayer(PlayerInfo *player);
    37     void registerWorldEntity(int id, WorldEntity *obj);
    38     void registerControllableEntity(int id, ControllableEntity *obj);
     26    void registerWorldEntity(std::string id, WorldEntity *entity);
     27    void registerControllableEntity(std::string id, ControllableEntity *entity);
    3928
    40     WorldEntity *getWorldEntityByID(int id) const;
    41     ControllableEntity *getControllableEntityByID(int id) const;
    42 
    43     void addNearObjectHandler(int obj1, int obj2, double distance, std::function<void (int, int)> callback);
    44 
    45     void objectMoved(WorldEntity *obj);
     29    WorldEntity *getWorldEntityByID(std::string id) const;
     30    ControllableEntity *getControllableEntityByID(std::string id) const;
    4631
    4732private:
    4833    std::list<std::unique_ptr<ScriptableControllerAPI> > apis_;
    4934    PlayerInfo *player_;
    50     std::map<int, WorldEntity*> worldEntities_;
    51     std::map<int, ControllableEntity*> controllabelEntities_;
    52 
    53     std::map<WorldEntity*, std::list<std::unique_ptr<NearObjectHandler> > > nearObjectHandlers_;
     35    std::map<std::string, WorldEntity*> worldEntities_;
     36    std::map<std::string, ControllableEntity*> controllabelEntities_;
    5437
    5538    void printLuaError(lua_State *lua);
  • code/branches/ScriptableController_HS17/src/orxonox/scriptablecontroller/scriptable_controller_api.cc

    r11562 r11583  
    1717    LuaTB<ScriptableControllerAPI, decltype(&ScriptableControllerAPI::registerAfterTimeout)>::registerFunction<&ScriptableControllerAPI::registerAfterTimeout>(this, lua, "registerAfterTimeout");
    1818    LuaTB<ScriptableControllerAPI, decltype(&ScriptableControllerAPI::registerAtNearObject)>::registerFunction<&ScriptableControllerAPI::registerAtNearObject>(this, lua, "registerAtNearObject");
     19    LuaTB<ScriptableControllerAPI, decltype(&ScriptableControllerAPI::registerAtNearPoint)>::registerFunction<&ScriptableControllerAPI::registerAtNearPoint>(this, lua, "registerAtNearPoint");
    1920    LuaTB<ScriptableControllerAPI, decltype(&ScriptableControllerAPI::registerAtAreaEnter)>::registerFunction<&ScriptableControllerAPI::registerAtAreaEnter>(this, lua, "registerAtAreaEnter");
    2021    LuaTB<ScriptableControllerAPI, decltype(&ScriptableControllerAPI::registerAtAreaLeave)>::registerFunction<&ScriptableControllerAPI::registerAtAreaLeave>(this, lua, "registerAtAreaLeave");
    21     LuaTB<ScriptableControllerAPI, decltype(&ScriptableControllerAPI::registerAtObjectDestroyed)>::registerFunction<&ScriptableControllerAPI::registerAtObjectDestroyed>(this, lua, "registerAtObjectDestroyed");
    22     LuaTB<ScriptableControllerAPI, decltype(&ScriptableControllerAPI::registerAtPickup)>::registerFunction<&ScriptableControllerAPI::registerAtPickup>(this, lua, "registerAtPickup");
     22//    LuaTB<ScriptableControllerAPI, decltype(&ScriptableControllerAPI::registerAtObjectDestroyed)>::registerFunction<&ScriptableControllerAPI::registerAtObjectDestroyed>(this, lua, "registerAtObjectDestroyed");
     23//    LuaTB<ScriptableControllerAPI, decltype(&ScriptableControllerAPI::registerAtPickup)>::registerFunction<&ScriptableControllerAPI::registerAtPickup>(this, lua, "registerAtPickup");
     24
     25    // Checks for area enter, area leave and near object events
     26    this->areaCheckTimer.setTimer(0.5, true, createExecutor(createFunctor(&ScriptableControllerAPI::checkAreas, this)), false);
    2327}
    2428
     
    3943}
    4044
    41 int ScriptableControllerAPI::registerAtNearObject(std::function<void (int, int)> callback, int obj1, int obj2, double distance)
     45void ScriptableControllerAPI::registerAtNearObject(std::function<void (std::string, std::string)> callback, std::string id1, std::string id2, double distance)
    4246{
    43     //this->controller_->addNearObjectHandler(obj1, obj1, distance, callback);
     47    WorldEntity *entity1 = this->controller_->getWorldEntityByID(id1);
     48    WorldEntity *entity2 = this->controller_->getWorldEntityByID(id2);
     49
     50    if(entity1 != nullptr && entity2 != nullptr)
     51        this->nearObjectHandlers_.push_front(NearObjectHandler(entity1, entity2, id1, id2, distance, callback));
    4452}
    4553
    46 int ScriptableControllerAPI::registerAtAreaEnter(std::function<void (int)> callback, int obj, int x, int y, int z, int dx, int dy, int dz)
     54void ScriptableControllerAPI::registerAtNearPoint(std::function<void (std::string)> callback, std::string id, double x, double y, double z, double distance)
    4755{
     56    WorldEntity *entity = this->controller_->getWorldEntityByID(id);
    4857
     58    if(entity != nullptr)
     59        this->nearPointHandlers_.push_front(NearPointHandler(entity, id, x, y, z, distance, callback));
    4960}
    5061
    51 int ScriptableControllerAPI::registerAtAreaLeave(std::function<void (int)> callback, int obj, int x, int y, int z, int dx, int dy, int dz)
     62void ScriptableControllerAPI::registerAtAreaEnter(std::function<void (std::string)> callback, std::string id, int x, int y, int z, int dx, int dy, int dz)
    5263{
     64    WorldEntity *entity = this->controller_->getWorldEntityByID(id);
    5365
     66    if(entity != nullptr)
     67        this->areaHandlers_.push_front(AreaHandler(entity, id, x, y, z, dx, dy, dz, true, callback));
    5468}
    5569
    56 int ScriptableControllerAPI::registerAtObjectDestroyed(std::function<void (int)> callback, int obj)
     70void ScriptableControllerAPI::registerAtAreaLeave(std::function<void (std::string)> callback, std::string id, int x, int y, int z, int dx, int dy, int dz)
    5771{
     72    WorldEntity *entity = this->controller_->getWorldEntityByID(id);
    5873
     74    if(entity != nullptr)
     75        this->areaHandlers_.push_front(AreaHandler(entity, id, x, y, z, dx, dy, dz, false, callback));
    5976}
    6077
    61 int ScriptableControllerAPI::registerAtPickup(std::function<void (int)> callback, int pickup_id)
     78void ScriptableControllerAPI::checkAreas()
    6279{
     80    // Near object
     81    auto near_obj_handler = this->nearObjectHandlers_.begin();
     82    while(near_obj_handler != this->nearObjectHandlers_.end())
     83    {
     84        if((near_obj_handler->entity1_->getPosition() - near_obj_handler->entity2_->getPosition()).length() < near_obj_handler->distance_)
     85        {
     86            near_obj_handler->callback_(near_obj_handler->id1_, near_obj_handler->id2_);
     87            near_obj_handler = this->nearObjectHandlers_.erase(near_obj_handler);
     88        }
     89        else
     90        {
     91            near_obj_handler++;
     92        }
     93    }
    6394
     95    // Near point
     96    auto near_point_handler = this->nearPointHandlers_.begin();
     97    while(near_point_handler != this->nearPointHandlers_.end())
     98    {
     99        if((near_point_handler->entity_->getPosition() - near_point_handler->point_).length() < near_point_handler->distance_)
     100        {
     101            near_point_handler->callback_(near_point_handler->id_);
     102            near_point_handler = this->nearPointHandlers_.erase(near_point_handler);
     103        }
     104        else
     105        {
     106            near_point_handler++;
     107        }
     108    }
     109
     110    // Areas
     111    auto area_handler = this->areaHandlers_.begin();
     112    while(area_handler != this->areaHandlers_.end())
     113    {
     114        if(area_handler->entity_->getPosition() > area_handler->start_point_ &&
     115           area_handler->entity_->getPosition() < area_handler->end_point_)
     116        {
     117            if(area_handler->atEnter_)
     118            {
     119                area_handler->callback_(area_handler->id_);
     120                area_handler = this->areaHandlers_.erase(area_handler);
     121            }
     122            else
     123            {
     124                area_handler++;
     125            }
     126        }
     127        else
     128        {
     129            if(!area_handler->atEnter_)
     130            {
     131                area_handler->callback_(area_handler->id_);
     132                area_handler = this->areaHandlers_.erase(area_handler);
     133            }
     134            else
     135            {
     136                area_handler++;
     137            }
     138        }
     139    }
    64140}
    65141
  • code/branches/ScriptableController_HS17/src/orxonox/scriptablecontroller/scriptable_controller_api.h

    r11562 r11583  
    44#include <functional>
    55#include "core/CoreIncludes.h"
    6 
    7 // TODO Is pos int or double?
     6#include "tools/Timer.h"
     7#include "OgreVector3.h"
    88
    99struct lua_State;
     
    1313
    1414class ScriptableController;
     15class WorldEntity;
    1516
    1617class ScriptableControllerAPI
     
    2425    void orxPrint(std::string msg);
    2526    void registerAfterTimeout(std::function<void (void)> callback, double timeout);
    26     int registerAtNearObject(std::function<void(int, int)> callback, int obj1, int obj2, double distance);
    27     int registerAtAreaEnter(std::function<void (int)> callback, int obj, int x, int y, int z, int dx, int dy, int dz);
    28     int registerAtAreaLeave(std::function<void (int)> callback, int obj, int x, int y, int z, int dx, int dy, int dz);
    29     int registerAtObjectDestroyed(std::function<void (int)> callback, int obj);
    30     int registerAtPickup(std::function<void (int)> callback, int pickup_id);
    3127
    32     int destroyObject(int obj);
    33     void removeObject(int obj);
    34     int setObjectPosition(int obj, double x, double y, double z);
     28    void registerAtNearObject(std::function<void(std::string, std::string)> callback, std::string id1, std::string id2, double distance);
     29    void registerAtNearPoint(std::function<void (std::string)> callback, std::string id, double x, double y, double z, double distance);
     30    void registerAtAreaEnter(std::function<void (std::string)> callback, std::string obj, int x, int y, int z, int dx, int dy, int dz);
     31    void registerAtAreaLeave(std::function<void (std::string)> callback, std::string obj, int x, int y, int z, int dx, int dy, int dz);
     32
     33    void registerAtObjectDestroyed(std::function<void (std::string)> callback, std::string obj);
     34    void registerAtPickup(std::function<void (int)> callback, int pickup_id);
     35
     36    void destroyObject(std::string obj);
     37    void removeObject(std::string obj);
     38    void setObjectPosition(std::string obj, double x, double y, double z);
    3539
    3640private:
     41    struct NearObjectHandler
     42    {
     43        NearObjectHandler(WorldEntity *entity1, WorldEntity *entity2, std::string id1, std::string id2, double distance, std::function<void (std::string, std::string)> callback)
     44            : entity1_(entity1), entity2_(entity2), id1_(id1), id2_(id2), distance_(distance), callback_(callback)
     45        {}
     46
     47        WorldEntity *entity1_, *entity2_;
     48        std::string id1_, id2_;
     49        double distance_;
     50        std::function<void (std::string, std::string)> callback_;
     51    };
     52
     53    struct NearPointHandler
     54    {
     55        NearPointHandler(WorldEntity *entity, std::string id, double x, double y, double z, double distance, std::function<void (std::string)> callback)
     56            : entity_(entity), id_(id), point_(x, y, z), distance_(distance), callback_(callback)
     57        {}
     58
     59        WorldEntity *entity_;
     60        std::string id_;
     61        Vector3 point_;
     62        double distance_;
     63        std::function<void (std::string)> callback_;
     64    };
     65
     66    struct AreaHandler
     67    {
     68        AreaHandler(WorldEntity *entity, std::string id, double x, double y, double z, double dx, double dy, double dz, bool atEnter, std::function<void (std::string)> callback)
     69            : entity_(entity), id_(id), start_point_(x, y, z), atEnter_(atEnter), callback_(callback)
     70        { this-> end_point_ = this->start_point_ + Vector3(dx, dy, dz); }
     71
     72        WorldEntity *entity_;
     73        std::string id_;
     74        Vector3 start_point_, end_point_;
     75        bool atEnter_;
     76        std::function<void (std::string)> callback_;
     77    };
     78
     79
    3780    lua_State *lua_;
    3881    ScriptableController *controller_;
     82    std::list<NearObjectHandler> nearObjectHandlers_;
     83    std::list<NearPointHandler> nearPointHandlers_;
     84    std::list<AreaHandler> areaHandlers_;
     85    Timer areaCheckTimer;
     86
     87    void checkAreas(void);
    3988};
    4089
  • code/branches/ScriptableController_HS17/src/orxonox/worldentities/ControllableEntity.cc

    r11518 r11583  
    3939
    4040#include "Scene.h"
     41#include "Level.h"
    4142#include "infos/PlayerInfo.h"
    4243#include "controllers/NewHumanController.h"
     
    6869        this->camera_ = nullptr;
    6970        this->xmlcontroller_ = nullptr;
    70         //this->controller_ = nullptr;
    7171        this->reverseCamera_ = nullptr;
    7272        this->bDestroyWhenPlayerLeft_ = false;
     
    127127        XMLPortObject(ControllableEntity, CameraPosition, "camerapositions", addCameraPosition, getCameraPosition, xmlelement, mode);
    128128        XMLPortObject(ControllableEntity, Controller,     "controller",      setXMLController,  getXMLController,  xmlelement, mode);
     129
     130        if(!this->id_.empty() && this->getLevel() != nullptr)
     131            this->getLevel()->getScriptableController()->registerControllableEntity(this->id_, this);
    129132    }
    130133
     
    338341    }
    339342
    340     void ControllableEntity::registerToScriptableController(ScriptableController *controller)
    341     {
    342         controller->registerControllableEntity(this->id_, this);
    343     }
    344 
    345343    void ControllableEntity::setPlayer(PlayerInfo* player)
    346344    {
  • code/branches/ScriptableController_HS17/src/orxonox/worldentities/ControllableEntity.h

    r11518 r11583  
    176176                { return this->team_; }
    177177
    178             virtual void registerToScriptableController(ScriptableController *controller) override;
    179178
    180179        protected:
  • code/branches/ScriptableController_HS17/src/orxonox/worldentities/MobileEntity.cc

    r11562 r11583  
    115115
    116116        this->node_->setPosition(position);
    117         this->getLevel()->getScriptableController()->objectMoved(this);
    118117    }
    119118
  • code/branches/ScriptableController_HS17/src/orxonox/worldentities/WorldEntity.cc

    r11562 r11583  
    4444#include "core/XMLPort.h"
    4545#include "Scene.h"
     46#include "Level.h"
    4647#include "collisionshapes/WorldEntityCollisionShape.h"
    4748#include "scriptablecontroller/scriptable_controller.h"
     
    185186        XMLPortObject(WorldEntity, CollisionShape, "collisionShapes", attachCollisionShape, getAttachedCollisionShape, xmlelement, mode);
    186187
    187         orxout(user_info) << "ID loaded" << std::endl;
     188        if(!this->id_.empty() && this->getLevel() != nullptr)
     189            this->getLevel()->getScriptableController()->registerWorldEntity(this->id_, this);
    188190    }
    189191
     
    280282    }
    281283
    282     void WorldEntity::registerToScriptableController(ScriptableController *controller)
    283     {
    284         orxout(user_info) << "Registering object to SC (" << this->id_ << ")" << std::endl;
    285         controller->registerWorldEntity(this->id_, this);
    286     }
    287 
    288284    /**
    289285    @brief
  • code/branches/ScriptableController_HS17/src/orxonox/worldentities/WorldEntity.h

    r11562 r11583  
    111111            virtual void changedVisibility(void) override;
    112112
    113             inline int getID(void)
     113            inline std::string getID(void)
    114114                { return this->id_; }
    115115
    116             inline void setID(int id)
     116            inline void setID(std::string id)
    117117                { this->id_ = id; }
    118 
    119             virtual void registerToScriptableController(ScriptableController *controller) override;
    120118
    121119            virtual void setPosition(const Vector3& position) = 0;
     
    450448
    451449            btRigidBody*  physicalBody_; //!< Bullet rigid body. Everything physical is applied to this instance.
    452             int           id_;           //!< Used by the ScriptableController to identify objects
     450            std::string   id_;           //!< Used by the ScriptableController to identify objects
    453451
    454452        private:
Note: See TracChangeset for help on using the changeset viewer.