Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2007, 10:41:04 PM (16 years ago)
Author:
rgrieder
Message:
 
Location:
code/branches/main_reto
Files:
1 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/main_reto/include/OrxonoxShip.h

    r126 r127  
    66using namespace Ogre;
    77
    8 class OrxonoxShip : public Entity
     8class OrxonoxShip
    99{
    1010public:
    11         OrxonoxShip(const Ogre::String, Ogre::MeshPtr&);
     11        OrxonoxShip(SceneManager*, SceneNode*);
    1212        virtual ~OrxonoxShip();
     13
     14        /*void setThrust(float);
     15        void setSideThrust(float);*/
    1316
    1417        virtual bool initialise();
    1518
    1619protected:
     20        SceneManager *mSceneMgr;
     21        SceneNode *mRootNode;
     22        Entity *mShip;
    1723};
    1824
  • code/branches/main_reto/include/RunManager.h

    r126 r127  
    3838        OrxonoxScene *mScene;
    3939        Camera* mCamera;
    40         SteerableNode *mShipNode;
     40        SceneNode *mShipNode;
    4141        OrxonoxShip *mShip;
    4242
  • code/branches/main_reto/include/SteerableNode.h

    r126 r127  
    66using namespace Ogre;
    77
    8 class SteerableNode : public SceneNode
     8class SteerableNode
    99{
    1010public:
  • code/branches/main_reto/src/RunManager.cpp

    r126 r127  
    88mTranslateVector(Vector3::ZERO), mStatsOn(true), mNumScreenShots(0),
    99mMoveScale(0.0f), mRotScale(0.0f), mTimeUntilNextToggle(0), mFiltering(TFO_BILINEAR),
    10 mAniso(1), mSceneDetailIndex(0), mMoveSpeed(100), mRotateSpeed(36), mDebugOverlay(0),
     10mAniso(1), mSceneDetailIndex(0), mMoveSpeed(300), mRotateSpeed(36), mDebugOverlay(0),
    1111mInputManager(0), mMouse(0), mKeyboard(0), mJoy(0)
    1212{
     
    1818        // background scene
    1919        mScene = new OrxonoxScene(mSceneMgr);
     20
     21        // create a steerable SceneNode for the spaceship to be attached to
     22        mShipNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("ShipNode", Vector3(20, 20, 20));
     23
     24        // spaceship
     25        mShip = new OrxonoxShip(mSceneMgr, mShipNode);
     26
     27        // load all resources and create the entities
     28        mScene->initialise();
     29        mShip->initialise();
     30
    2031        // create camera and viewport
    2132        createCamera();
    2233        createViewports();
    23         mScene->initialise();
    24 
    25         // create a steerable SceneNode for the spaceship to be attached to
    26         /*mShipNode = new SteerableNode(mSceneMgr, "shipNode");
    27         mShipNode->setPosition(Vector3(20, 20, 20));
    28         mSceneMgr->getRootSceneNode()->addChild(mShipNode);*/
    29 
    30         // spaceship
    31         /*mShip = static_cast<OrxonoxShip*>(mSceneMgr->createEntity("ship", "ninja.mesh"));
    32         mShipNode->attachObject(mShip);*/
    33 
     34
     35        // Set default mipmap level (NB some APIs ignore this)
     36        TextureManager::getSingleton().setDefaultNumMipmaps(5);
    3437
    3538        using namespace OIS;
     
    7679        if (mScene)
    7780                delete mScene;
    78 
    79         /*if (mShipNode)
    80                 delete mShipNode;
    81 
    82         if (mShip)
    83                 delete mShip;*/
    8481}
    8582
     
    369366{
    370367        mCamera = mSceneMgr->createCamera("PlayerCam");
     368        mShipNode->attachObject(mCamera);
    371369        mCamera->setNearClipDistance(5);
    372370        mCamera->setPosition(Vector3(0,10,500));
     
    384382        mCamera->setAspectRatio(
    385383                Real(vp->getActualWidth()) / Real(vp->getActualHeight()));
    386 
    387         // Set default mipmap level (NB some APIs ignore this)
    388         TextureManager::getSingleton().setDefaultNumMipmaps(5);
    389 }
    390 
    391 
     384}
     385
     386
  • code/branches/main_reto/weapon_framework/weapon_framework.vcproj

    r126 r127  
    211211                                >
    212212                        </File>
    213                         <File
    214                                 RelativePath="..\src\SteerableNode.cpp"
    215                                 >
    216                         </File>
    217213                </Filter>
    218214                <Filter
     
    245241                                >
    246242                        </File>
    247                         <File
    248                                 RelativePath="..\include\SteerableNode.h"
    249                                 >
    250                         </File>
    251243                </Filter>
    252244                <Filter
Note: See TracChangeset for help on using the changeset viewer.