Open Inventor A short introduction Capabilities of Open
Open Inventor A short introduction
Capabilities of Open Inventor Easy construction of 3 D scenes User interaction Animation
Overview Open Inventor is a “scenegraph“ graphics API: All visible objects are stored in a scenegraph Built on top of Open. GL
Scenegraph Anatomy There are three kinds of nodes: n n n Group nodes: allow construction of trees Property nodes: change the color / location /. . . of the next object Shapes: visible objects
Common node types Group nodes n So. Group So. Separator, So. Switch, . . . Property nodes n n Transform: So. Transform, So. Rotation, . . . Appearance: So. Material, So. Draw. Style, . . . Shape nodes n So. Shape So. Cone, So. Cube, So. Text 2, . . .
Scene objects class name prefix: So (scene object) derived from So. Node can be inserted directly into the scenegraph Example: root->add. Child(new So. Sphere)
Fields class name prefix: So. SF/So. MF (Single Field/Multiple Field) public attributes of Scene objects specify the appearance of scene objects (like radius, height, color. . . )
. . . Fields Newly created scene Objects have fields with default values Fields can be “connected“ to other fields Fields can be changed using set. Value(s): Example: So. Sphere *sphere = new So. Sphere; . . . sphere->radius. set. Value(3);
Typical Open Inventor code. . . So. Separator *root = new So. Separator; So. Translation *t = new So. Translation; t->translation. set. Value(2, 0, 0); root->add. Child(t); root->add. Child(new So. Cube); . . .
Loading Scenes Loading scenes is very easy: So. Input scene; scene. open. File("chessboard. iv"); root = So. DB: : read. All(&scene);
Advanced Topics Manipulators allow the user to modify the scene Actions compute bounding boxes, picks objects. . . Sensors can detect changes in the scene and invoke callback functions Engines can animate the scene
A few tips. . . Follow the setup tutorial for Coin 3 D! You need a new So. . . class? You need a new #include statement! Don‘t forget to insert your nodes into the scene graph!
Resources Coin 3 D: A free implementation of Open Inventor www. coin 3 d. org Inventor Mentor: A good online reference book Another presentation: http: //vrlab. postech. ac. kr/vr/gallery/edu/vr/o peninventor. ppt dev-gallery: Some simple tutorials www. devgallery. com/programming/open. Inventor/main. html
- Slides: 13