Difference between revisions of "Homework3W13"
(→Application) |
(→Grading) |
||
Line 29: | Line 29: | ||
==Grading== | ==Grading== | ||
− | On the due date, you will need to demonstrate your application with a Razer Hydra in the lab on a lab computer or your own laptop. You are going to have to build a simple version of [http://0.tqn.com/d/collegeapps/1/0/L/2/-/-/ucsd_geisel_kafka4prez_flickr.jpg Geisel Library. | + | On the due date, you will need to demonstrate your application with a Razer Hydra in the lab on a lab computer or your own laptop. You are going to have to build a simple version of [http://0.tqn.com/d/collegeapps/1/0/L/2/-/-/ucsd_geisel_kafka4prez_flickr.jpg Geisel Library.] |
==Extra Credit ('''10 Points''')== | ==Extra Credit ('''10 Points''')== |
Revision as of 01:59, 11 February 2013
Contents |
Homework Assignment 3: Building Blocks
For this assignment you can obtain 100 points, plus up to 10 points for optional work.
The goal of this project is to create an application which uses the Razer Hydra to allow the user to build Geisel Library out of building blocks.
Razer Hydra
This homework assignment requires the use of a Razer Hydra input device. Every team/individual is going to get to borrow one from the instructor for the remaining weeks of the quarter. If you work as a team, please take only one.
The Hydras can be picked up from the instructor's office, Atkinson Hall room 2125. The office door should be open all day. If the instructor is not in the office, please sign one of the borrow agreements and leave it on my desk, then take a Hydra from one of the boxes on the floor.
To use the Hydra, you will need to first download the driver. If you use the lab computers the driver is already installed.
Application
Your application needs to have the following features:
- There needs to be a ground plane (for instance, created with osg::InfinitePlane), or some other surface which doesn't have to be flat, to build on.
- The mouse should rotate the world with the ground plane and the bricks on it, but not any of your menu items.
- Allow the user to create at least 5 different shapes of blocks, for instance with the osg::Shape Class, which supports Cone, Box, Cylinder, Sphere. There should be models for all possible shapes on the screen to choose from, for instance in a column along the right edge of the screen. Make sure you choose blocks appropriate for the task of creating Geisel Library.
- The Hydra wands need to each have a cursor in different colors. Cone-shaped cursors would work well, but any shape will be fine.
- Allow at least five different colors to be used for the blocks, all of which should be clearly distinguishable from one another, the background and the ground plane. Display color widgets on the screen, for instance along the top edge of the screen. The color widgets could be displayed as colored spheres, but any other shape would be fine as well.
- To place a block, the user should click a button on the Hydra's wand when the cursor is on a shape to select it and create a copy of it, which will attach to the cursor (and possibly replace it). Then, while the button is held down, the user moves the shape to the color widgets, and when the wand cursor gets close to one (distance origin-to-origin below a threshold) the block will assume that color. Finally, the block is placed on or above the ground plane by releasing the button. Wherever the block is put it will stay, even in mid-air. There is extra credit for physics simulations, see below.
- Blocks are allowed to intersect each other, there needs to be no collision detection.
- The application should support both Hydra input devices, equally privileged. You will need to ascertain that the user can create blocks with both hands at the same time.
- Only one button on each Hydra wand should be used for this application.
Grading
On the due date, you will need to demonstrate your application with a Razer Hydra in the lab on a lab computer or your own laptop. You are going to have to build a simple version of Geisel Library.
Extra Credit (10 Points)
You can achieve 10 points of extra credit in one of two ways:
- Add physics simulation to the behavior of the building blocks: when you drop one, it should not just fall until it hits another block or the ground plane, but it should bounce off other blocks and the ground plane until it comes to a stop, like a real building block would.
- Turn the blocks into Lego bricks. Render little cylinders on their top surfaces in regular grids like real Lego bricks, and make pieces snap to one another when they get close enough to fit together like real Legos.