Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 515


Ignore:
Timestamp:
Dec 13, 2007, 6:21:22 PM (17 years ago)
Author:
nicolape
Message:

Added some objects for the level loader

Location:
code/branches/FICN
Files:
26 added
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/bin/levels/sample.oxw

    r511 r515  
    1919               
    2020                <Skybox src="Orxonox/BlueStarSkyBox" />
    21                                
     21
     22                <SceneNode name="OgreHeadNode" pos="0,0,0" />                           
     23
     24                <Entity name="ASSF" src="assf2.mesh" node="OgreHeadNode" />
     25
     26                <Camera name="Camera" pos="0,0,-250" lookat="0,0,0" node="OgreHeadNode" />
     27
     28                <SpaceshipSteeringObject node="OgreHeadNode" forward="500" rotateupdown="200" rotaterightleft="200" looprightleft="200" />
     29
     30               
    2231
    2332
    24                                
    25                                
    2633        </world>
     34
    2735
    2836        <scripts>
  • code/branches/FICN/src/orxonox/objects/CMakeLists.txt

    r507 r515  
    99  Ambient.cc
    1010  Skybox.cc
     11  SceneNode.cc
     12  Entity.cc
     13  Camera.cc
     14  SpaceshipSteeringObject.cc
    1115)
    1216
  • code/branches/FICN/src/orxonox/orxonox.cc

    r512 r515  
    6060
    6161#include "spaceship_steering.h"
    62 SpaceshipSteering* steering;
    6362
    6463
     
    8483      : mKeyboard(keyboard), mMouse(mouse)
    8584      {
     85       
     86        SpaceshipSteering* steering = orxonox::Orxonox::getSingleton()->getSteeringPointer();
     87       
    8688        speed = 250;
    8789        loop = 100;
     
    101103
    102104        auMan_->update();
     105
     106        SpaceshipSteering* steering = orxonox::Orxonox::getSingleton()->getSteeringPointer();
    103107
    104108        mKeyboard->capture();
     
    141145        }
    142146
    143         steering->tick(evt.timeSinceLastFrame);
     147                steering->tick(evt.timeSinceLastFrame);
     148               
     149               
     150               
    144151//      scenemanager->spacehip->tick(evt.timesincelastframe);
    145152        if(mKeyboard->isKeyDown(OIS::KC_ESCAPE))
     
    348355    loader_->loadLevel();
    349356
     357
     358
     359
     360
    350361        /*
    351362    auMan_->ambientAdd("a1");
     
    362373    SceneManager *mgr = ogre_->getSceneManager();
    363374
     375        /*
    364376    Camera *cam = mgr->createCamera("Camera");
    365377    cam->setPosition(Vector3(0,0,-250));
    366378    cam->lookAt(Vector3(0,0,0));
     379
     380
    367381    Viewport *vp = ogre_->getRoot()->getAutoCreatedWindow()->addViewport(cam);
    368382
    369 
     383/*
    370384    Entity* head = mgr->createEntity("ASSF", "assf2.mesh");
    371385    SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("OgreHeadNode", Vector3(0,0,0));
     
    393407    steering = new SpaceshipSteering(500, 200, 200, 200);
    394408    steering->addNode(node);
    395 
     409    */
    396410
    397411  }
  • code/branches/FICN/src/orxonox/orxonox.h

    r473 r515  
    1616#include "../loader/LevelLoader.h"
    1717#include "../audio/AudioManager.h"
     18#include "spaceship_steering.h"
    1819
    1920
     
    3334      static Orxonox* getSingleton();
    3435      inline SceneManager* getSceneManager() { return ogre_->getSceneManager(); };
     36      inline GraphicsEngine* getOgrePointer() { return ogre_; };
     37      inline SpaceshipSteering* getSteeringPointer() { return steering_; };
    3538    private:
    3639      Orxonox();
     
    5457      loader::LevelLoader*  loader_;    //!< level loader builds the scene
    5558      audio::AudioManager*  auMan_;     //!< audio manager
     59      SpaceshipSteering*        steering_;
    5660      static Orxonox*       singletonRef_;
    5761      OIS::Keyboard*        keyboard_;
  • code/branches/FICN/src/orxonox/spaceship_steering.cc

    r513 r515  
    2828#include "Ogre.h"
    2929#include "spaceship_steering.h"
     30#include <iostream>
    3031using namespace Ogre;
    3132
     
    3334maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float
    3435maxSpeedLoopRightLeft) {
     36       
     37        std::cout << "Steering was loaded";
    3538  moveForward_ = 0;
    3639  rotateUp_ = 0;
  • code/branches/FICN/src/orxonox/spaceship_steering.h

    r337 r515  
    33
    44#include "OgrePrerequisites.h"
     5
    56
    67class SpaceshipSteering
     
    5859};
    5960
     61
    6062#endif
Note: See TracChangeset for help on using the changeset viewer.