Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.