Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 460


Ignore:
Timestamp:
Dec 12, 2007, 1:18:46 AM (17 years ago)
Author:
landauf
Message:

first try to add a WorldEntity. at the moment it's just a class with an Ogre::SceneNode

Location:
code/branches/objecthierarchy/src
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/CMakeLists.txt

    r454 r460  
    1414        orxonox/core/SignalHandler.cc
    1515        orxonox/objects/BaseObject.cc
     16        orxonox/objects/WorldEntity.cc
    1617        orxonox/objects/test1.cc
    1718        orxonox/objects/test2.cc
     
    3536        orxonox/core/SignalHandler.h
    3637        orxonox/objects/BaseObject.h
     38        orxonox/objects/WorldEntity.h
    3739        orxonox/objects/Test.h
    3840        orxonox/objects/test1.h
  • code/branches/objecthierarchy/src/orxonox/core/CoreIncludes.h

    r457 r460  
    2222#include "OgreVector3.h"
    2323#include "OgreColourValue.h"
     24#include "OgreQuaternion.h"
     25#include "OgreMatrix3.h"
    2426
    2527
     
    3032    typedef Ogre::Vector3 Vector3;
    3133    typedef Ogre::ColourValue ColourValue;
     34    typedef Ogre::Radian Radian;
     35    typedef Ogre::Real Real;
     36    typedef Ogre::Quaternion Quaternion;
     37    typedef Ogre::Matrix3 Matrix3;
    3238}
    3339
  • code/branches/objecthierarchy/src/orxonox/core/OrxonoxClass.h

    r447 r460  
    103103
    104104            /** @brief Sets the name of the object. @param name The name */
    105             inline void setName(const std::string& name) { this->name_ = name; }
     105            inline virtual void setName(const std::string& name) { this->name_ = name; }
    106106
    107107            /** @returns the name of the object. */
     
    109109
    110110            /** @brief Sets the state of the objects activity. @param bActive True = active */
    111             inline void setActive(bool bActive) { this->bActive_ = bActive; }
     111            inline virtual void setActive(bool bActive) { this->bActive_ = bActive; }
    112112
    113113            /** @returns the state of the objects activity. */
     
    115115
    116116            /** @brief Sets the state of the objects visibility. @param bVisible True = visible */
    117             inline void setVisible(bool bVisible) { this->bVisible_ = bVisible; }
     117            inline virtual void setVisible(bool bVisible) { this->bVisible_ = bVisible; }
    118118
    119119            /** @returns the state of the objects visibility. */
  • code/branches/objecthierarchy/src/orxonox/orxonox.cc

    r457 r460  
    3131 */
    3232
    33 #include <Ogre.h>
     33#include <OgreSceneNode.h>
     34#include <OgreSceneManager.h>
     35#include <OgreRoot.h>
     36#include <OgreFrameListener.h>
     37#include <OgreConfigFile.h>
     38#include <OgreTextureManager.h>
     39#include <OgreEntity.h>
     40#include <OgreRenderWindow.h>
     41
    3442#include <OIS/OIS.h>
    3543#include <CEGUI/CEGUI.h>
     
    4654#include "objects/Tickable.h"
    4755#include "objects/Timer.h"
     56#include "objects/WorldEntity.h"
    4857
    4958#include "objects/BaseObject.h"
     
    633642        std::cout << "4\n";
    634643
     644        std::cout << "Test 12\n";
     645        std::cout << "1\n";
     646
     647        WorldEntity* test12_1 = new WorldEntity;
     648
     649        std::cout << sizeof(WorldEntity) << std::endl;
     650
     651        std::cout << "2\n";
     652
     653
     654
    635655        startRenderLoop();
    636656      }
     
    721741      void setupScene()
    722742      {
    723         Ogre::SceneManager *mgr = mRoot->createSceneManager(Ogre::ST_GENERIC, "Default SceneManager");
    724         Ogre::Camera *cam = mgr->createCamera("Camera");
     743        WorldEntity::sceneManager_s = mRoot->createSceneManager(Ogre::ST_GENERIC, "Default SceneManager");
     744        Ogre::Camera *cam = WorldEntity::sceneManager_s->createCamera("Camera");
    725745        Ogre::Viewport *vp = mRoot->getAutoCreatedWindow()->addViewport(cam);
    726746      }
Note: See TracChangeset for help on using the changeset viewer.