So, You say that it can't be that simple. Well, you're right. When the simulations become more complex, it's by no means simple. When it comes to complex VR simulations, vrSpec does not make make it simple but it does simplify things significantly. The simple example only touches the surface of the complexity involved with VR simulations and how vrSpec can be used as an implementation tool. Any real simulation must deal with complex issues including object motion, input devices, home grown loaders, and tasks that can only be executed in the draw process. vrSpec provides the following features to adress these issues:

vrSpec Libraries

If additional code must to be created to add functionality (motion functions, userfunctions, callbacks or device drivers) then you will have to create the vrSpec executable using the vrSpec libraries.

Motion Functions (mofuncs)

Moving an object through a virtual world can be accomplished in one of many ways whether it be by user input devices or run-time calculations based on numeric equations or hard coded paths. These motions can also be very specific to a given simulation (e.g., following a hallway).

vrSpec simplifies the way in which motion is applied to objects and it provides a framework that structures motion definitions allowing modularization and reuse. vrSpec does this by abstracting the notion of motion allowing users to define object motion any way they see fit. This is accomplished through 'Motion Functions' or mofuncs. Mofuncs represent ANY motion (including the lack of motion as in the SitAndDoNothing mofunc) and can be assigned to any movable object.

Using the vrSpec path compiler, mofuncs can be converted to compiled paths that are used in the object specification. These 'compiled' paths allow complex (cpu intensive) motion without the run-time cost (a space for time trade-off).

Wavefront data can also be imported into vrSpec using a utility that converts the Wavefront animation data into a vrSpec compiled path.

The bottom line: mofuncs encapsulate ALL motion. As an example, if a movable object is to follow one of these compiled paths, it would be assigned the FollowHardPath motion function.

Users can use the Wavefront interface, existing motion functions or write their own. Motion Functions are linked into vrSpec via the motion function table.

User Functions (ufuncs)

User functions are used to extend the capabilities of the event actions. If there is an event based action that vrSpec does not provide, the user can create a user function. When writing a user function, a developer has access to all VR data including a handle to the event object that caused the current event handler to be invoked.

Virtual Devices

The notion of a virtual device allows developers to reference certain input devices without having to worry about what physical devices are actually driving them. It also allows physical devices to be swapped quickly and simply. vrSpec currently supports three virtual devices: a pointing device, a selecting device and a joystick device. Unless otherwise specified, a default virtual device driver is used that uses the mouse (X,Y) for the virtual pointer and the left mouse button as the virtual selector (for picking). The notion of virtual devices allowed quick swapping between the mouse interface used for development/testing and the actual devices used for the simulations.

vrSpec Call-back Routines

vrSpec currently provides three call back routines allowing developers to specify a home grown model loader, to specify post-draw activities and to specify a mapping for the virtual devices.

Back to the vrSpec Page.