1 OGRE Programming Intermediate Tutorial. 2Contents 2 1.Select any object on the screen using the mouse 2.Restrict what is selectable.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Introduction to Rails.
Advertisements

EBSCO Discovery Service
The Ribbon Standard to all Office 2007 applications Organized by feature and functionality Navigation Pane Access to all objects in the current database.
Physical representation of a game character. Basics 05_02_Bullet_CharacterControl_Base.zip Extract.
Scripting Node. This node is used to execute a user-defined python script. Assigning the script to the node is done in a way similar to the “Switch Pattern”
Managing Your Organisation’s Portal Team Account Tutorial 7.
1 Top-k Spatial Joins
2.3. B OUNDING V OLUMES Bounding volumes of use for collision detection.
Physically Based Real-time Ray Tracing Ryan Overbeck.
Korea Univ. Graphics Lab. 3D Game Engine Design Chapter 12. Spatial Sorting Chung Ji Hye
Structured Light Lecture 1 Matt Waibel COMP
Useful Tools for Making Video Games Part I An overview of Ogre.
Java 3D Pablo Figueroa University of Alberta April 2000.
Ray Tracing CS Nov. 19, Turner Whitted.
EmpowHR EmpowHR Security Overview. 2 Application Security Administration Permission List Roles User Profiles Row level security Distributed Security Administration.
Selection Sort
Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!
The switch StatementtMyn1 The switch Statement Sometimes there can be a multiple-choice situation, in which you need to execute a particular set of statements.
CSC461 Lecture 11: Interactive Programs Contents and Objectives Picking Writing modes – XOR/Copy Rubberbanding Display list.
SE Team 9 3D Flyer Cole Hoosier Ryan Hannebaum Leanne Gray Alex Stampbach Matt Cook.
C Tokens Identifiers Keywords Constants Operators Special symbols.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
@CRMUG Technical Academy Fetch Xml Were can Fetch Xml be used Basic Fetch Xml and using advanced find to build your own Fetch Query Creating Fetch Xml.
The switch StatementtMyn1 The switch Statement Sometimes there can be a multiple-choice situation, in which you need to execute a particular set of statements.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Adobe Flash CS3 Revealed Chapter 3 - WORKING WITH SYMBOLS AND INTERACTIVITY.
1 VR assignment#2 WTK SDK Introduction By Jin-Bey Yu 2001/11/12.
11 Lecture 3 Particle Effects References: [1] Gregory Junker, Pro OGRE 3D Programming, Apress, 2006 [2] Ogre Tutorials – Ogre Wiki
Useful Tools for Making Video Games Part II An overview of.
Exploded Views for Volume Data Stefan Bruckner and M. Eduard Gröller IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 12, NO. 5, 2006.
Game Design and Dev Ogre3D Overview
Geometry Review 4 th Grade Math 4.14, 4.15, 4.16 W.A. Taylor
Fundamentals of Level Editor Design and Implementation.
Selection Sort
Macromedia Flash 8 Revealed WORKING WITH SYMBOLS AND INTERACTIVITY.
1 OGRE Programming Intermediate Tutorial: Volume Selection.
Constructive Solid Geometry Ray Tracing CSG Models
Web Programming MySql JDBC Web Programming.
What is an Entity Relationship Diagram?. An Entity Relationship Diagram is a graphic that is speacialized to illustrate or give examples of the inter.
Project 3 Help Session: Ray Tracing. Getting Started Download the starter pack. 1.sample_ray.exe 2.ray-skel directory 3.scenes directory Look at the Road.
Home Page Searching the SHARE-Catalog From the Home Page, you can search the SHARE catalog, find information in online databases, search other library.
By JerryDean Smith Chad Adams Karl Mullner.  The rectangle needs to be a ogre.ManualObject -this is done to create the rectangle and gives it special.
Pairs of Angles Geometry Farris O I can identify adjacent, vertical, complementary, and supplementary angles. I can find measures of pairs of angles.
Unbuffered Input Games generally use unbuffered Input Ogre provides FrameListeners – Ogre's main infinite loop → startRendering – Also called the render.
Decom North Sea Late Life Planning Portal (L2P2) Design Workshop – Follow-up 13 January
Programming with Microsoft Visual Basic 2012 Chapter 14: Access Databases and SQL.
1 Chapter 6: Creating Oracle Data Block Forms. 2 Forms  Application with a graphical user interface that looks like a paper form  Used to insert, update,
Design a page like that seen on the left. The images and descriptions are provided in the zipped file.
Operator Overloading.
Programming Right from the Start with Visual Basic .NET 1/e
Task 2f – part a Prove that you can receive an WITH an attachment, open it AND save the attachment to your user area. Open the with the attachment.
Current outstanding balance
Chapter 3: Using Methods, Classes, and Objects
Arrays (Operations on Arrays)
SUBFARM CONTROL SYSTEM DATAFLOW
11/10/2018.
Presented by 鄭游駿(Yu-Chun Cheng) 2009/11/27
Chapter 15 Introduction to Rails.
User Interface Tutorial
EXPERTIndex™ “Contains” REACH Registrations Advanced
Appendix D: Network Model
Spring 2014 Updates.
EXPERTIndex™ “Contains”
Game User Input Mouse Input.
Wings 2.0 Business Flow Reference
Views Base Relation View
Intermediate Tutorial
Practice Geometry Practice
Positioning Boxes Using CSS
Presentation transcript:

1 OGRE Programming Intermediate Tutorial

2Contents 2 1.Select any object on the screen using the mouse 2.Restrict what is selectable

3  Show the bounding box of a scene node: mCurrentObject->showBoundingBox(true); //mCurrentObject is a SceneNode. Showing the selected object

4 1.Setup the ray for the ray scene query 2.Set the sorting type for the results 3.Execute the ray scene query 4.Retrieve intersection results 5.Based on the results, perform the specific task Process of Ray Scene Query

55 CEGUI::Point mousePos = CEGUI::MouseCursor::getSingleton().getPosition(); Ray mouseRay = mCamera->getCameraToViewportRay( mousePos.d_x /float( arg.state.width ), mousePos.d_y /float( arg.state.height )); mRaySceneQuery->setRay(mouseRay); mRaySceneQuery->setSortByDistance(true); // Perform the scene query RaySceneQueryResult &result = mRaySceneQuery->execute(); RaySceneQueryResult::iterator itr = result.begin(); for (itr = result.begin(); itr != result.end(); itr++) { if (itr->movable && itr->movable->getName().substr(0, 5) != " tile[ ") { mCurrentObject = itr->movable->getParentSceneNode(); break; } // if else if (itr->worldFragment) { …… } Process of Ray Scene Query

66 Query Masks  Mask: bitwise value.  The mask can be used to restrict the objects which are selectable.  Set the mask for an entity: ent->setQueryFlags(ROBOT_MASK);  Set the ray scene query for the entity whose query flag is QMASK mRaySceneQuery->setQueryMask(QMASK); //now, if ROBOT_MASK & QMASK is non-zero, then the corresponding entities are returned in the query results.

7 Query Type Masks  The query never returns the billboardset normally. Why?  The SceneQuery has another mask: QueryTypeMask.  It limits the selection type specified as the flag.  By default, it returns only objects of entity type. To return BillboardSets or ParticleSystems: mRaySceneQuery->setQueryTypeMask( SceneManager::FX_TYPE_MASK);

8 QueryTypeMask Six types of QueryTypeMask defined in the SceneManager class as static members: WORLD_GEOMETRY_TYPE_MASK //Returns world geometry. ENTITY_TYPE_MASK //Returns entities. FX_TYPE_MASK //Returns billboardsets / particle systems. STATICGEOMETRY_TYPE_MASK //Returns static geometry. LIGHT_TYPE_MASK //Returns lights. USER_TYPE_MASK_LIMIT //User type mask limit. The default QueryTypeMask : ENTITY_TYPE_MASK

9 References: