Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 15, 2008, 11:26:16 PM (15 years ago)
Author:
landauf
Message:
  • Readded smooth camera movement (configurable through CameraPosition), works also with camera-position-changes
  • Added free mouse look (press left control key)
  • Made strength of boost-blur configurable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/orxonox/objects/worldentities/WorldEntity.cc

    r2365 r2478  
    7979                this->detachFromParent();
    8080
     81            this->node_->removeAllChildren();
     82
    8183            if (this->getScene()->getSceneManager())
    8284                this->getScene()->getSceneManager()->destroySceneNode(this->node_->getName());
     
    125127    }
    126128
     129    void WorldEntity::attachNode(Ogre::SceneNode* node)
     130    {
     131        Ogre::Node* parent = node->getParent();
     132        if (parent)
     133            parent->removeChild(node);
     134        this->node_->addChild(node);
     135    }
     136
     137    void WorldEntity::detachNode(Ogre::SceneNode* node)
     138    {
     139        this->node_->removeChild(node);
     140//        this->getScene()->getRootSceneNode()->addChild(node);
     141    }
     142
     143    void WorldEntity::attachToNode(Ogre::SceneNode* node)
     144    {
     145        Ogre::Node* parent = this->node_->getParent();
     146        if (parent)
     147            parent->removeChild(this->node_);
     148        node->addChild(this->node_);
     149    }
     150
     151    void WorldEntity::detachFromNode(Ogre::SceneNode* node)
     152    {
     153        node->removeChild(this->node_);
     154//        this->getScene()->getRootSceneNode()->addChild(this->node_);
     155    }
     156
    127157    void WorldEntity::attach(WorldEntity* object)
    128158    {
     
    135165        if (object->getParent())
    136166            object->detachFromParent();
    137         else
    138         {
    139             Ogre::Node* parent = object->node_->getParent();
    140             if (parent)
    141                 parent->removeChild(object->node_);
    142         }
    143167
    144         this->node_->addChild(object->node_);
     168        this->attachNode(object->node_);
     169
    145170        this->children_.insert(object);
    146171        object->parent_ = this;
     
    150175    void WorldEntity::detach(WorldEntity* object)
    151176    {
    152         this->node_->removeChild(object->node_);
     177        this->detachNode(object->node_);
    153178        this->children_.erase(object);
    154179        object->parent_ = 0;
    155180        object->parentID_ = OBJECTID_UNKNOWN;
    156 
    157 //        this->getScene()->getRootSceneNode()->addChild(object->node_);
    158181    }
    159182
Note: See TracChangeset for help on using the changeset viewer.