Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2008, 4:16:52 PM (15 years ago)
Author:
rgrieder
Message:

Finally merged physics stuff. Target is physics_merge because I'll have to do some testing first.

Location:
code/branches/physics_merge
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics_merge

  • code/branches/physics_merge/src/orxonox/objects/Scene.h

    r2371 r2442  
    5353                { return this->rootSceneNode_; }
    5454
     55            inline btDiscreteDynamicsWorld* getPhysicalWorld() const
     56                { return this->physicalWorld_; }
     57
    5558            void setSkybox(const std::string& skybox);
    5659            inline const std::string& getSkybox() const
     
    6568                { return this->bShadows_; }
    6669
     70            inline bool hasPhysics()
     71                { return this->physicalWorld_ != 0; }
     72            void setPhysicalWorld(bool wantsPhysics);//, const Vector3& worldAabbMin, const Vector3& worldAabbMax);
     73
     74            void addRigidBody(btRigidBody* body);
     75            void removeRigidBody(btRigidBody* body);
     76
    6777            virtual void tick(float dt);
    6878
     
    7585            void networkcallback_applyAmbientLight()
    7686                { this->setAmbientLight(this->ambientLight_); }
     87            void networkcallback_hasPhysics()
     88                { this->setPhysicalWorld(this->bHasPhysics_); }
    7789
    78             Ogre::SceneManager*    sceneManager_;
    79             Ogre::SceneNode*       rootSceneNode_;
    80             std::string            skybox_;
    81             ColourValue            ambientLight_;
    82             std::list<BaseObject*> objects_;
    83             bool                   bShadows_;
     90            Ogre::SceneManager*      sceneManager_;
     91            Ogre::SceneNode*         rootSceneNode_;
     92
     93            btDiscreteDynamicsWorld* physicalWorld_;
     94            std::set<btRigidBody*>   physicsQueue_;
     95            bool                     bHasPhysics_;
     96
     97            std::string              skybox_;
     98            ColourValue              ambientLight_;
     99            std::list<BaseObject*>   objects_;
     100            bool                     bShadows_;
    84101    };
    85102}
Note: See TracChangeset for help on using the changeset viewer.