- README -

RollerCoaster Sample Code Version 1.0
9/18/98

by Scott Kuechle
Apple Developer Technical Support

====================================================================

1. ABOUT ROLLERCOASTER

RollerCoster demonstrates how to create a simple roller-coaster simulation using QuickDraw3D. It is based heavily on the orginial Gerbils code by Brian Greenstone. The program builds a simple track using the mesh geometry and then moves the camera location along the track to simulate a "ride".

2. REQUIREMENTS

QuickDraw3D Mac/Windows 1.5.4 or better.
QuickTime 3.0 or better for Mac/Windows

To run QuickDraw 3D on a Mac the user's machine must include: 
*	A PowerPC processor 
*	Macintosh System 7.12 with DragLib or later (7.5.1 recommended) 
*	A hard drive 
*	16MB RAM 

To run QuickDraw 3D on a PC the user's machine must include: 
*	A Pentium processor 
*	Windows 95 or Windows NT 
*	A hard drive 
*	16MB RAM

3. BUILD ENVIRONMENTS

This sample was built on the Mac using Metrowerks CodeWarrior IDE version 2.1 with Universal Interfaces 3.2.

This sample was built under Windows using the Microsoft Visual C++ 4.0 development environment and the QuickTime 3.0 SDK Interfaces & Libraries.

3. SPECIFICS

As mentioned previously, this code is based heavily on the Gerbils code by Brian Greenstone. The track in this sample is built using B-splines. For a good discussion of how to build a track using B-splines, refer to the document by Brian Greenstone titled "Making Cool QD3D Apps" on the Apple QuickTime web site (http://www.apple.com/quicktime/).

To construct the track we've first defined a number of track "sections", with each track section containing a simple list of control points (refer to the TrackSectionType data structure in the interface file Track.h). The Mac version of the sample has stored the track sections in a resource file - the Windows version has them stored in a file. The control points in each track section are used to build a spline curve for each section. Next, the track sections are rotated into place to form a closed loop representing the entire connected track. Finally, texturing is added (note: on the Mac the texturing files are loaded from resources - under Windows, each texture file is simply a separate data file which must be in the same folder as the application).

To simulate a "ride" on the track, the camera location is simply moved along the track from section-to-section. Many of the parameters used in building the track can be adjusted. See the interface file "Track.h" for the details.

4. USING ROLLERCOASTER

Simply launch the application and you're off - the program automatically takes the user for a ride on the track. To quit, either click in the window close box or select <command><q> on the Mac, <control><q> under Windows.
