University of California, Berkeley
EECS Dept, CS Division
SLIDE: Scene Language for
Interactive Dynamic Environments
|Prof. Carlo H. Séquin|
In this assignment, you are building slideview2d, a 2D dynamic SLIDE viewer program which only needs to work for wire frames. You will need to implement 2D matrix transformations, instancing hierarchies, hierarchical axis aligned bounding boxes, tagging of dynamic subtrees of the scene graph, and a shape preserving viewport mapping of the toplevel bounding box. Take note that CSLIDEInstances do not have their own bounding box. It is overkill to put bounding boxes here because there is exactly one child node, so having a bounding box in an instance would actually make the processing less efficient.
You will also need to deal with the SLIDE surface statement for the color of faces. Other surface properties can be ignored for now, since they don't make sense in a 2D world.
Using slidedraw and slideedit create some useful shapes for a road scene containing trucks and cars. For instance you may place a couple of trucks on a road or a bridge, each with one or two cars on its flat bed (use different orientations), and with a plane flying overhead. Of course,you may grab some of the shapes from your previous assignments. Have fun, but don't go overboard.
Start by building some simple dynamic test .slf files, which you then test by viewing them with the solution slideview2d; verify that you understand how to make things move in SLIDE! Make the cars go back and forth or bounce up and down.
The new SLIDE statements that you will be implementing for this assignment are surface, object, group, instance, rotate, scale, translate, render, and viewport. You can ignore the solid flags, the shading flags, and LOD flags. In the render statement, a camera and a list of lights can be referenced, but we will be ignoring them in our simple implementation.
For this assignment everything is restricted to 2D. You need to implement a robust transformation package (easily extensible to 3D, in fact you may want to write 3D transformation but then only use 2D instantiations of them) that permits composition of hierarchical transforms. Do not use OpenGL's transformation routines to do this.
Bounding boxes are useful for approximating the geometry of complicated objects and groups. In this assignment, you will learn how to construct bounds which will then be used to speed up rendering in later assignments.
After the provided parser builds up the SLIDE data structure, you must calculate rectangular axis aligned bounding boxes to mark the extents of groups and objects in a recursive manner. The transformed corners of the bounding box of an instanced group or object can be used to efficiently calculate a bounding box for the enclosing group. This may not give the tightest bounds possible, but it is a fast and easy approach.
You should be able to render the bounding box around an object or a group as a white rectangle in its own defining coordinate system, suitably transformed into the WORLD coordinate system by all the instance transformations above it. You should also be able to color in red the bounding boxes of nodes with dynamic geometry in them.
You should use the color field of the surface statement to determine the color with which faces are drawn. You should always use the surface which is specified closest to a CSLIDEPoint in the scene hierarchy, but nodes can forfeit there control of the color by not specifying a surface (in which case they will get the default surface CSLIDESurface::GetSLF_INHERIT()).
In this assignment, you will be exploring 2D transformations, vector spaces, and affine spaces. To learn more about the mathematical theory behind the assignment read the 2D Linear Algebra Notes.
You will be making a hierarchical model in this assignment. To learn about modeling with SLIDE read the SLIDE Modeling Hierarchy Notes. There is also a description of bounding boxes.
Follow the listed instructions for as3.
The SLIDE Implementation Specification gives information about the C++ class structure which implements the SLIDE viewer. It also gives an outline of the operation of the viewer.
The SLIDE Tcl Basics Tutorial gives enough
information amount the Tcl language to create a basic SLIDE dynamic
This page was originally built by Jordan Smith.
Last modified: Tuesday, 21-Sep-2004 16:51:03 PDT