Presentation is loading. Please wait.

Presentation is loading. Please wait.

SE Team 9 3D Flyer Cole Hoosier Ryan Hannebaum Leanne Gray Alex Stampbach Matt Cook.

Similar presentations


Presentation on theme: "SE Team 9 3D Flyer Cole Hoosier Ryan Hannebaum Leanne Gray Alex Stampbach Matt Cook."— Presentation transcript:

1 SE Team 9 3D Flyer Cole Hoosier Ryan Hannebaum Leanne Gray Alex Stampbach Matt 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 I.Introduction II.Review of web page (including goals) III.Overview of OGRE IV.GlobalFlyer software design V.Project plan evaluation VI.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

26

27

28

29

30

31

32 Project Plan

33 Physics Lighting Sky Testing Presentation 3 Tutorials

34

35 Tasks up to present

36 Task estimation vs. actual time Task Minutes

37 Upcoming Tasks

38 Conclusion Goals for next presentation –Make physics engine –Improve lighting –Fix sky

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


Download ppt "SE Team 9 3D Flyer Cole Hoosier Ryan Hannebaum Leanne Gray Alex Stampbach Matt Cook."

Similar presentations


Ads by Google