SlideShare una empresa de Scribd logo
1 de 18
MEngine Advanced Concepts
List Objects ,[object Object],[object Object]
Oh God no. Why? ,[object Object],[object Object],[object Object],[object Object]
Examples of List Objects ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
HUD element example HUD Display List HUD Display List A = Shell_dragonWidget A B = Green Dragon Icon B A = Shell_dragonWidget A C C = Red Dragon Icon
HUD Display List HUD element example continued Camera Display List E F G H A A = Shell_dragonWidget C C = Red Dragon Icon
Camera Display List G Complex Menu Display List C E D B F J M Z A H Complex Subelement Mini-Display List
Functors ,[object Object],[object Object],[object Object],[object Object],[object Object]
CObject Functors are added to each individual CObject Functor List F1 F2
Functor Calling Conventions ,[object Object],CObj Automatic Argument List ,[object Object],CObj Functor List Fn ,[object Object],[object Object]
Getting a Functor CObj CObj Functor List F1 F2 CFunctor *pFunc = CObj->FindFunctor(“F2”); OR CFunctor *pFunc = CObj->FindFunctor(cobj_functor_type); F2
Execute the Functor ,[object Object],[object Object],[object Object]
Why does Functor execute have 2 different modes of operation? ,[object Object],[object Object],[object Object]
Warning: NO SAFETY CHECKS ,[object Object],[object Object],[object Object],[object Object]
Apply Functor: “Render” to the Camera Display List Camera Display List G Complex Menu Display List C E J M Z A H Complex Subelement Mini-Display List
Low Level Functor Operation ,[object Object],[object Object]
Apply Functors “Animate”, “Transform”, and “Render” Animated Frame List Transform Frame List Camera Display List A C D E F G H
I, Voltron, highly recommend Functors. You can attach or detach them from your classes to change your functionality dynamically as the situation demands. I can tell you from experience that it was a bitch getting all these different robot lion heads to interface properly in C++. But with functors, I didn’t have to care about the interface! I just say, “Left Arm fire!” or “Right Arm Detach!”

Más contenido relacionado

La actualidad más candente

computer notes - Data Structures - 8
computer notes - Data Structures - 8computer notes - Data Structures - 8
computer notes - Data Structures - 8
ecomputernotes
 

La actualidad más candente (19)

Infix to postfix conversion
Infix to postfix conversionInfix to postfix conversion
Infix to postfix conversion
 
Triggers in Topic Maps
Triggers in Topic MapsTriggers in Topic Maps
Triggers in Topic Maps
 
StackArray stack3
StackArray stack3StackArray stack3
StackArray stack3
 
computer notes - Data Structures - 8
computer notes - Data Structures - 8computer notes - Data Structures - 8
computer notes - Data Structures - 8
 
Stack and queue -polish notations
Stack and queue -polish notationsStack and queue -polish notations
Stack and queue -polish notations
 
Lect 15-16 Zaheer Abbas
Lect 15-16 Zaheer  AbbasLect 15-16 Zaheer  Abbas
Lect 15-16 Zaheer Abbas
 
Removal Of Recursion
Removal Of RecursionRemoval Of Recursion
Removal Of Recursion
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Tail Recursion in data structure
Tail Recursion in data structureTail Recursion in data structure
Tail Recursion in data structure
 
Programming in c function
Programming in c functionProgramming in c function
Programming in c function
 
Java Week6(B) Notepad
Java Week6(B)   NotepadJava Week6(B)   Notepad
Java Week6(B) Notepad
 
MS Sql Server: Doing Calculations With Functions
MS Sql Server: Doing Calculations With FunctionsMS Sql Server: Doing Calculations With Functions
MS Sql Server: Doing Calculations With Functions
 
Mpi cheat sheet
Mpi cheat sheetMpi cheat sheet
Mpi cheat sheet
 
Macros for Shape and formula
Macros for Shape and formulaMacros for Shape and formula
Macros for Shape and formula
 
Function & Recursion in C
Function & Recursion in CFunction & Recursion in C
Function & Recursion in C
 
Mca 2nd sem u-4 operator overloading
Mca 2nd  sem u-4 operator overloadingMca 2nd  sem u-4 operator overloading
Mca 2nd sem u-4 operator overloading
 
C programming function
C  programming functionC  programming function
C programming function
 
Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s5-2Bcsl 033 data and file structures lab s5-2
Bcsl 033 data and file structures lab s5-2
 

Destacado (8)

Introduction Presentation Jul09
Introduction Presentation Jul09Introduction Presentation Jul09
Introduction Presentation Jul09
 
New to Crew Health and Fitness
New to Crew Health and FitnessNew to Crew Health and Fitness
New to Crew Health and Fitness
 
Introducing Cairngorm
Introducing CairngormIntroducing Cairngorm
Introducing Cairngorm
 
What
WhatWhat
What
 
MEngine Overview
MEngine OverviewMEngine Overview
MEngine Overview
 
Less
LessLess
Less
 
Online Scientific Method Forensics 2009
Online Scientific Method Forensics 2009Online Scientific Method Forensics 2009
Online Scientific Method Forensics 2009
 
El sustantivo y sus clases
El sustantivo y sus clasesEl sustantivo y sus clases
El sustantivo y sus clases
 

Similar a MEngine Advanced

How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1
Taisuke Oe
 
Core .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsCore .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 Enhancements
Robert MacLean
 

Similar a MEngine Advanced (20)

Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
 
C++ Interview Question And Answer
C++ Interview Question And AnswerC++ Interview Question And Answer
C++ Interview Question And Answer
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
 
How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1
 
Tagless Final Encoding - Algebras and Interpreters and also Programs
Tagless Final Encoding - Algebras and Interpreters and also ProgramsTagless Final Encoding - Algebras and Interpreters and also Programs
Tagless Final Encoding - Algebras and Interpreters and also Programs
 
Assignment 1
Assignment 1 Assignment 1
Assignment 1
 
1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers
 
Unit-III.pptx
Unit-III.pptxUnit-III.pptx
Unit-III.pptx
 
Intro to RX
Intro to RXIntro to RX
Intro to RX
 
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
 
Core .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsCore .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 Enhancements
 
Introduction to F#
Introduction to F#Introduction to F#
Introduction to F#
 
Boo Manifesto
Boo ManifestoBoo Manifesto
Boo Manifesto
 
cbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptxcbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptx
 
cbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptxcbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptx
 
Practical QML - Key Navigation, Dynamic Language and Theme Change
Practical QML - Key Navigation, Dynamic Language and Theme ChangePractical QML - Key Navigation, Dynamic Language and Theme Change
Practical QML - Key Navigation, Dynamic Language and Theme Change
 
functions
functionsfunctions
functions
 
Csharp
CsharpCsharp
Csharp
 

MEngine Advanced

  • 2.
  • 3.
  • 4.
  • 5. HUD element example HUD Display List HUD Display List A = Shell_dragonWidget A B = Green Dragon Icon B A = Shell_dragonWidget A C C = Red Dragon Icon
  • 6. HUD Display List HUD element example continued Camera Display List E F G H A A = Shell_dragonWidget C C = Red Dragon Icon
  • 7. Camera Display List G Complex Menu Display List C E D B F J M Z A H Complex Subelement Mini-Display List
  • 8.
  • 9. CObject Functors are added to each individual CObject Functor List F1 F2
  • 10.
  • 11. Getting a Functor CObj CObj Functor List F1 F2 CFunctor *pFunc = CObj->FindFunctor(“F2”); OR CFunctor *pFunc = CObj->FindFunctor(cobj_functor_type); F2
  • 12.
  • 13.
  • 14.
  • 15. Apply Functor: “Render” to the Camera Display List Camera Display List G Complex Menu Display List C E J M Z A H Complex Subelement Mini-Display List
  • 16.
  • 17. Apply Functors “Animate”, “Transform”, and “Render” Animated Frame List Transform Frame List Camera Display List A C D E F G H
  • 18. I, Voltron, highly recommend Functors. You can attach or detach them from your classes to change your functionality dynamically as the situation demands. I can tell you from experience that it was a bitch getting all these different robot lion heads to interface properly in C++. But with functors, I didn’t have to care about the interface! I just say, “Left Arm fire!” or “Right Arm Detach!”

Notas del editor

  1. You don’t have to touch the camera’s display list when you are messing with individual elements of the HUD object.
  2. Functors allow
  3. The parameter list typically contains a single CObject, the ‘this’ object. If it contained more objects, the functor would operate on those objects, too.
  4. High level functor operation
  5. High level functor operation