1 / 39

SE Team 9 3D Flyer

SE Team 9 3D Flyer. Cole Hoosier Ryan Hannebaum Leanne Gray Alex Stampbach Matt Cook. Project Statement. GlobalFlyer allows a player to fly a Wright brothers-style airplane in 3D space using the OGRE graphic rendering engine and the FMOD sound system. Presentation Outline. Introduction

debra
Download Presentation

SE Team 9 3D Flyer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SE Team 93D Flyer Cole HoosierRyan HannebaumLeanne GrayAlex StampbachMatt Cook

  2. Project Statement • GlobalFlyer allows a player to fly a Wright brothers-style airplane in 3D space using the OGRE graphic rendering engine and the FMOD sound system.

  3. Presentation Outline • Introduction • Review of web page (including goals) • Overview of OGRE • GlobalFlyer software design • Project plan evaluation • Conclusion

  4. GlobalFlyer Web Site • http://seteam9.cis.ksu.edu/

  5. Overview of OGRE

  6. Common Function/Classes in Ogre • root • sceneManager • sceneNode • Entity • Camera/viewPort • light • frameListener • eventProcessor

  7. root • Constructor • Root(pluginFileName, configFileName, logFileName) • Some Functions • SceneManager* getCurrentSceneManager(void) • void addFrameListener(FrameListener *) • void startRendering(void) • void shutdown(void) • RenderWindow* initialise(bool, “OGRE Render Window””)

  8. sceneManager • Constructor • SceneManager(“[nstance name”) • Some Functions • Camera* createCamera(“name”) • Light* createLight(“name”) • SceneNode* getRootSceneNode(void) • SceneNode* createSceneNode(“name”) • Entity* createEntity(“name”) • void setAmbientLight(ColourValue) • void setWorldGeogmetry(“filename”) • void setSkyPlane(bool, Plane, “materialName”, scale,…) • void showBoundingBoxes(bool) • void setShadowTechnique(ShadowTechnique) • Viewport* getCurrentViewport(void)

  9. sceneNode • Constructor • SceneNode(SceneManager, “name”) • Only called by creator SceneManager • Some Functions • void attachObject(MovableObject) • SceneNode* createChildSceneNode(Vector3, Quatrernion) • void setOrientation(w,x,y,z) • void setDirection(x,y,z, TransformSpace, Vector3) • void lookAt(Vector3, TransformSpace, Vector3) • void scale(Vector3) • void addChild(Node*) • void setListener(Listener*)

  10. Entity • Inherits from MovableObject • ShadowCaster • AnimableObject • Constructor Entity(“Name”, MeshPtr) • Some Functions • sceneManager _getManager(void) • void setCastShadows(bool) • sceneNode getParentSceneNode(void)

  11. Camera/viewPort • Camera(“Name”, SceneManager) • void setPosition(Vector3) • void lookAt(Vector3) • setFocalLength(Real) • Viewport(Camera, RenderTarget, Real…) • RenderTarget* getTarget(void) • Camera* getCamera(void) • void setDimensions(real, real, real, real) • void setBackGroundColour(ColourValue) • void setShadowsEnabled(bool) • void setSkiesEnabled(bool)

  12. Light • Inherits from MovableObject • Constructor • Light (“name”) • someMethods • void setType(LightTypes) • Spotlight, Point, Directional • void setDiffuseColour(real, real, real) • void setSpecularColour(real, real, real) • void setAttenuation(real, real, real, real)

  13. frameListener • Detailed Description Later • Has 2 public Methods • Bool frameStarted(FrameEvent) • Bool FrameEnded(FrameEvent)

  14. eventProcessor • void startProcessingEvents(bool) • bool frameStarted(FrameEvent) • void addEventTarget(EventTarget*) • void addMouseListener(MouseListener*) • void addKeyListener(KeyListener*) • void processKeyEvent(KeyEvent*)

  15. Ogre FrameListeners • Not just for kids anymore! • Featuring code examples from • OgreWiki • OgreAPI

  16. Root::startRendering • Calls the frameStarted method on all registered FrameListeners • Renders one frame • Calls the frameEnded method on all registered FrameListeners • This continues until one of these methods returns False

  17. FrameListener Class • struct FrameEvent • timeSinceLastEvent • timeSinceLastFrame • frameStarted • frameEnded

  18. Safety Notice • Ogre chooses the order in which it executes frameStarted and frameEnded • User cannot dictate this order • Nesting FrameListener’s is one way to get around this

  19. Example class TutorialFrameListener : public ExampleFrameListener { public: TutorialFrameListener( RenderWindow* win, Camera* cam, SceneManager *sceneMgr )  : ExampleFrameListener(win, cam, false, false) { } bool frameStarted(const FrameEvent &evt) //This function is where you place actions { return ExampleFrameListener::frameStarted( evt ); } bool frameEnded(const FrameEvent &evt) //This function is where you place actions { return ExampleFrameListener::frameEnded( evt ); } protected: bool mMouseDown; // Whether or not the left mouse button was down last frame Real mToggle; // The time left until next toggle Real mRotate; // The rotate constant Real mMove; // The movement constant SceneManager *mSceneMgr; // The current SceneManager SceneNode *mCamNode; // The SceneNode the camera is currently attached to };

  20. There Can be only One! • Code can be placed in either: • frameStarted • frameEnded • But, there is only ONE render-cycle per frame • Changes don’t render between frameEnded and frameStarted • So, if frameEnded has a movement that frameStarted negates, the movement will not show

  21. Creating a FrameListener • Example: : ExampleFrameListener(win, cam, false, false) //Window, Camera, buffered key input, buffered mouse input • Example: // Create the FrameListener mFrameListener = new TutorialFrameListener(mWindow, mCamera, mSceneMgr); mRoot->addFrameListener(mFrameListener);

  22. User Interaction • Arrow keys • Spacebar • F1, F2, F3 • Adding mouse support for camera rotation

  23. GlobalFlyer software design

  24. FrameStarted Sequence Diag

  25. Project Plan

  26. Tutorials Physics Lighting Sky Testing Presentation 3

  27. Tasks up to present

  28. Task estimation vs. actual time Minutes Task

  29. Upcoming Tasks

  30. Conclusion • Goals for next presentation • Make physics engine • Improve lighting • Fix sky

  31. Who has Questions? -Images from texasbestgrok.mu.nu/images/GF2.jpg

More Related