COS 426
Assignment 3: Scene Maker
Assigned 10/16/98
Due 10/29/98 11:59pm
15 points

In this assignment you will write a scene modeler using Inventor. After the last assignment, you are probably really tired of typing in vertex coordinates by hand. With this program you will be able to create, write, read and modify complex scenes using a graphical user interface. Inventor gives you (among many other facilities) easy ways to create, modify, save and restore, and render a hierarchical scene graph. Using your program, you will be able to instantiate primitive objects (cubes, cones, cylinders, and spheres) group these objects, move them around, apply material properties, and interactively explore the scene that you create.

Readings:

To learn all about Inventor, read The Inventor Mentor, which can be accessed online through Insight, or can be purchased at the bookstore. We suggest reading the material for the required features, implement them, and then, for each optional feature that you choose to implement, read the related chapter. In general, you can skip the sections marked Advanced.

For the required features you will need:

For the optional features: While you're reading the book, you may wish to try out some of the examples, make a few changes and see how they work. All of the examples from the book are available in the directory: You may also wish to have a look at some of the example models in the directory:
/usr/share/data/models
These models can be viewed with several programs, each of which has different features (gview is most like the program you will create):
/usr/sbin/ivview, /usr/sbin/SceneViewer, and /u/cs426/bin/gview.
Now that you have some understanding of how Inventor scene graphs work, sit down and design a reasonable organization of your scene graph. You may want to make simplifying assumptions. Some possibilities: It is very important that you do this design step BEFORE you start coding. Think about all the behavior of your program (what happens when you paste objects? what happens when you ungroup? how many nodes can affect a certain object (transformation, material, texture, rotationXYZ for animation, etc) Can nodes be shared? Sharing is nice, but it is very easy to introduce bugs if you use it. ) It will be very hard (and very error-prone) to change the underlying assuptions about your scene graph after implementing a good part of the code.
 

Required Features (10 points):

  1. Rapidapp UI: a viewer, menus for load/save, new object, etc.
  2. Be able to create objects (cubes, spheres, cylinders, cones) and position, scale, and rotate them in 3-space.
  3. Select single objects / multiple objects. When one object is selected you should show some object properties (name, world coordinates of bounding box center, bounding box dimensions). Selected objects should be highlighted.
  4. Names: all your objects should have names. Newly created objects should get default names (eg. cube1, cube2, sphere1 , group1, ...) and the user should have the option to change current names.
  5. Group several objects to create a new one. Ungrouping should do something sensible with the properties (eg. if the whole group was green and the individual parts did not have materials, after ungrouping each part should be green)
  6. Transform (move, rotate, scale) the selected object.
  7. Edit the material for the selected objects (you should be able to change the material for several selected objects at the same time).
  8. Write/read the scene graph to/from a file. It is ok to be able to read only the files that you produced, but you should reject other files gracefully.
  9. Cut, copy, paste.
  10. Implement a traversal function that visits your scene graph and writes an indented tree of the object names. This is useful for debugging your scene graph.
  11. Turn in an inventor file that represents a scene similar to the one you created for the previous assignment.

Optional features:

Warnings:

Tips: