1 / 29

Easy Studierstube Applications with a little help from OpenInventor

Easy Studierstube Applications with a little help from OpenInventor. Gerhard Reitmayr Vienna University of Technology. Stb application requirements. User interface design needs iterative development. Need to be adapted to different user interface modalities. Demos need to be kept alive !

elvis-morin
Download Presentation

Easy Studierstube Applications with a little help from OpenInventor

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. Easy Studierstube Applicationswith a little help from OpenInventor Gerhard Reitmayr Vienna University of Technology

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

  3. User interface components icon 3D window PIP widgets pen content

  4. Structure of an application Application Widgets Different modalities SoMyContextKit Reuse this ? Scene graph Different presentation styles

  5. 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. Use the file format ! • Let your application become an understandable part of an OIV file. • Use fields as inputs and outputs of applications. • Build scene graphs in the OIV file instead of in code. • Try to write all applications as pure OIV nodekits !

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

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

  9. Scene graphs as parameters • Use node fields • As templates for complex scene graphs • Use parts • For scene graphs that need traversal • Use conventions • 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

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

  11. Context Example Group Context2->1 Context2->0 ContextSwitchindex[2] Geometry Colorgreen Colorred

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

  13. Nodekit structure Root node Private parts Public parts SoTrackedArtifaktKit

  14. OIV : setUpConnections • Central method to establish connections within a nodekit. • Signals nodekit when the structure changes. • Important for • Correct loading of applications • Distributed OpenInventor

  15. OIV : setupConnections

  16. Navigation app – 1

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

  18. Thank you • ?

  19. SoClassLoader • Load OIV classes from within a file ! classLoader SoClassLoader { className "MyOIVNode" fileName "../somewhere/mynodes" } MyOIVNode { … }

  20. Timing issues • Delayed execution • SoOneShotSensor • SoAlarmSensor • Repeated actions • SoTimeSensor • SoIdleSensor

  21. Stb Applications • Applications are OpenInventor nodekits • Subclasses of SoContextKit • Implementation as shared library (dll,so) • Additional callback API for • User specific data • Distribution

  22. Writing STB applications • SoApplicationKit • SoClassLoader • SoContextKit • templatePipSheet • windowGroup

  23. Interfacing SoContextKit • Use fields as interface • Avoid connections based on names, pointers, etc • Special patterns for multi user applications • Use localized search

  24. PIP - personal interaction panel System Sheet App 1 PipSheet PIP PipSheet 1 App 2 User PipSheet 2

  25. PIP Komponenten window tab system tab sheet tab

  26. Remedy – OpenInventor • A set of guidelines to • Structure application API • Structure data flow in application • Modularize applications • OpenInventor can support us here !

  27. 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. Guidelines • Data driven implementation • Store all data in fields or children • React to changes and update internal and dependent state • > Very flexible • > Highly reusable components

  29. Lifetime of an application Loading SoMyAppKit checkPipGeometry()checkWindowGeometry() checkPipConnections()checkPipMasterMode() focusChange() windowEventCB() Initialisation per user Interaction

More Related