Presentation is loading. Please wait.

Presentation is loading. Please wait.

Easy Studierstube Applications with a little help from OpenInventor Gerhard Reitmayr Gerhard Reitmayr Vienna University of Technology Vienna University.

Similar presentations


Presentation on theme: "Easy Studierstube Applications with a little help from OpenInventor Gerhard Reitmayr Gerhard Reitmayr Vienna University of Technology Vienna University."— Presentation transcript:

1 Easy Studierstube Applications with a little help from OpenInventor Gerhard Reitmayr Gerhard Reitmayr Vienna University of Technology Vienna University of Technology

2 Gerhard Reitmayr StbDay 2 – 22.05.2003 Stb application requirements User interface design needs iterative development. User interface design needs iterative development. Need to be adapted to different user interface modalities. Need to be adapted to different user interface modalities. Demos need to be kept alive ! Demos need to be kept alive ! Reuse of application features is very desirable. Reuse of application features is very desirable.

3 Gerhard Reitmayr StbDay 2 – 22.05.2003 User interface components 3D window PIP pen icon widgets content

4 Gerhard Reitmayr StbDay 2 – 22.05.2003 Structure of an application SoMyContextKit Widgets Scene graph Application Different modalities Different presentation styles Reuse this ?

5 Gerhard Reitmayr StbDay 2 – 22.05.2003 Skeleton of an application SoApplicationKit { contextKit SomeApplication { templatePipSheet Separator { # your PIP sheet widgets } windowGroup Group { # content and windows ! } # all kinds of application # specific fields }

6 Gerhard Reitmayr StbDay 2 – 22.05.2003 Use the file format ! Let your application become an understandable part of an OIV file. Let your application become an understandable part of an OIV file. Use fields as inputs and outputs of applications. Use fields as inputs and outputs of applications. Build scene graphs in the OIV file instead of in code. Build scene graphs in the OIV file instead of in code. Try to write all applications as pure OIV nodekits ! Try to write all applications as pure OIV nodekits !

7 Gerhard Reitmayr StbDay 2 – 22.05.2003 Fields as inputs/outputs Connecting to widgets Connecting to widgets Callbacks tie you to the type of widget Callbacks tie you to the type of widget Lower abstraction used then necessary e.g. observe 3 buttons instead of a 3 valued state variable. Lower abstraction used then necessary e.g. observe 3 buttons instead of a 3 valued state variable. Use fields that represent exactly the state the application needs. Use fields that represent exactly the state the application needs. Output states as fields allows simple change of presentation. Output states as fields allows simple change of presentation.

8 Gerhard Reitmayr StbDay 2 – 22.05.2003 OIV: Observing changes Sensors are the callbacks of OIV ! Sensors are the callbacks of OIV ! SoFieldSensor SoFieldSensor Only one field per sensor Only one field per sensor Not ref counted > take care yourself Not ref counted > take care yourself SoNodeSensor SoNodeSensor Reports changes on node / sub scene graph Reports changes on node / sub scene graph Beware of node fields Beware of node fields

9 Gerhard Reitmayr StbDay 2 – 22.05.2003 Scene graphs as parameters Use node fields Use node fields As templates for complex scene graphs As templates for complex scene graphs Use parts Use parts For scene graphs that need traversal For scene graphs that need traversal Use conventions Use conventions Node type, e.g. set a texture to be picked up by geometry in the graph Node type, e.g. set a texture to be picked up by geometry in the graph Search for a given name, type and change its fields Search for a given name, type and change its fields

10 Gerhard Reitmayr StbDay 2 – 22.05.2003 Parameterized scene graphs Using context sensitive traversal Using context sensitive traversal New element SoContextElement New element SoContextElement Maps int -> int Maps int -> int Context[3] = 2 Context[3] = 2 Context[-5] = NIL Context[-5] = NIL SoContext to modify context during traversal SoContext to modify context during traversal SoContextSwitch (…) SoContextSwitch (…) Modify traversal depending on context Modify traversal depending on context

11 Gerhard Reitmayr StbDay 2 – 22.05.2003 Context 2->0 Context Example Context 2->1 ContextSwitc h index[2] Geometr y Group Color green Color red

12 Gerhard Reitmayr StbDay 2 – 22.05.2003 OIV : NodeKits - concept A nodekit represents a tightly integrated template scene graph with meaning to the developer. A nodekit represents a tightly integrated template scene graph with meaning to the developer. We get We get Fixed scene graph Fixed scene graph Represented by a node Represented by a node Internal connections Internal connections OIV interface of fields and children OIV interface of fields and children

13 Gerhard Reitmayr StbDay 2 – 22.05.2003 Nodekit structure Root node Private parts Public parts SoTrackedArtifaktKit

14 Gerhard Reitmayr StbDay 2 – 22.05.2003 OIV : setUpConnections Central method to establish connections within a nodekit. Central method to establish connections within a nodekit. Signals nodekit when the structure changes. Signals nodekit when the structure changes. Important for Important for Correct loading of applications Correct loading of applications Distributed OpenInventor Distributed OpenInventor

15 Gerhard Reitmayr StbDay 2 – 22.05.2003 OIV : setupConnections

16 Gerhard Reitmayr StbDay 2 – 22.05.2003 Navigation app – 1

17 Gerhard Reitmayr StbDay 2 – 22.05.2003 Navigation app - 2 DEF NavKit NavigationContext { DEF NavKit NavigationContext { waypoint ["Karlskirche",… ] waypoint ["Karlskirche",… ] waypointPosition [0 1 0,… ] waypointPosition [0 1 0,… ] edge [1,… ] edge [1,… ] numEdge [3,… ] numEdge [3,… ] userPosition = SoTrakEngine{}.translation userPosition = SoTrakEngine{}.translation destination = USE waypointList.selected destination = USE waypointList.selected path [“Karlskirche”,… ] path [“Karlskirche”,… ] edgeIndex [1,2,3] nodeIndex [2,3,5,10] edgeIndex [1,2,3] nodeIndex [2,3,5,10] templatePipSheet SoPipSheetKit {…} templatePipSheet SoPipSheetKit {…} windowGroup So3DSeparator {…} windowGroup So3DSeparator {…} }

18 Gerhard Reitmayr StbDay 2 – 22.05.2003 Thank you ?

19 Gerhard Reitmayr StbDay 2 – 22.05.2003SoClassLoader classLoader SoClassLoader { className "MyOIVNode" fileName "../somewhere/mynodes" } MyOIVNode { … } Load OIV classes from within a file ! Load OIV classes from within a file !

20 Gerhard Reitmayr StbDay 2 – 22.05.2003 Timing issues Delayed execution Delayed execution SoOneShotSensor SoOneShotSensor SoAlarmSensor SoAlarmSensor Repeated actions Repeated actions SoTimeSensor SoTimeSensor SoIdleSensor SoIdleSensor

21 Gerhard Reitmayr StbDay 2 – 22.05.2003 Stb Applications Applications are OpenInventor nodekits Applications are OpenInventor nodekits Subclasses of SoContextKit Subclasses of SoContextKit Implementation as shared library (dll,so) Implementation as shared library (dll,so) Additional callback API for Additional callback API for User specific data User specific data Distribution Distribution

22 Gerhard Reitmayr StbDay 2 – 22.05.2003 Writing STB applications SoApplicationKit SoApplicationKit SoClassLoader SoClassLoader SoContextKit SoContextKit templatePipSheet templatePipSheet windowGroup windowGroup

23 Gerhard Reitmayr StbDay 2 – 22.05.2003 Interfacing SoContextKit Use fields as interface Use fields as interface Avoid connections based on names, pointers, etc Avoid connections based on names, pointers, etc Special patterns for multi user applications Special patterns for multi user applications Use localized search Use localized search

24 Gerhard Reitmayr StbDay 2 – 22.05.2003 PIP - personal interaction panel PIP App 1 App 2 PipSheet PipSheet 1 PipSheet 2 System Sheet User

25 Gerhard Reitmayr StbDay 2 – 22.05.2003 PIP Komponenten system tab window tab sheet tab

26 Gerhard Reitmayr StbDay 2 – 22.05.2003 Remedy – OpenInventor A set of guidelines to A set of guidelines to Structure application API Structure application API Structure data flow in application Structure data flow in application Modularize applications Modularize applications OpenInventor can support us here ! OpenInventor can support us here !

27 Gerhard Reitmayr StbDay 2 – 22.05.2003 Beispiel : hello world SoApplicationKit { contextKit SoContextKit { windowGroup DEF Hello Group { Material {diffuseColor 0.9 0.95 0.3} Scale {scaleFactor 0.1 0.1 0.1} Font { size 1 } Text3 { string ["Hello", "World !"] justification CENTER parts ALL } templatePipSheet USE Hello }

28 Gerhard Reitmayr StbDay 2 – 22.05.2003Guidelines Data driven implementation Data driven implementation Store all data in fields or children Store all data in fields or children React to changes and update internal and dependent state React to changes and update internal and dependent state  > Very flexible  > Highly reusable components

29 Gerhard Reitmayr StbDay 2 – 22.05.2003 Lifetime of an application Loading Initialisation SoMyAppKit per user Interaction checkPipGeometry() checkWindowGeometry() checkPipConnections() checkPipMasterMode() focusChange() windowEventCB()


Download ppt "Easy Studierstube Applications with a little help from OpenInventor Gerhard Reitmayr Gerhard Reitmayr Vienna University of Technology Vienna University."

Similar presentations


Ads by Google