User Guide
238 APPENDIX D
Surface Objects
A surface object is an element in the scene hierarchy which contains one or more surfaces. These are currently
authored by converting from Viewpoint objects. The advantage of surface objects is that they may be included in
static lighting computations in the Atmosphere application and can receive dynamic shadows in the Player.
The User Interface Hierarchy
The User Interface Hierarchy contains objects that are used to access high-level elements of the user interface such as
windows, keyboard events, and 2-D windows used to display 3-D renderings of the world.
The Application Object
The Application object, available as the global “application”, is the object that represents the user interface and input
peripherals. These include the state of keys in the keyboard and the mouse button. The application also has an array
of “view” objects, one for each window into the current 3-D world. (In this version of Atmosphere there is only
one such view.) The application also has some control over the chat window and can send JavaScript commands to
external objects on the web page of the plug-in allowing back-end processing.
View Objects
A view object represents the 2-D window within which the world may be seen. A view knows its size in pixels and
the X/Y position of the mouse when the cursor is over the rendered window. A view also has an array of cameras
representing different 3-D projections of the world. (In the current release there is one camera per view.)
Camera Objects
A camera object has a 3-D position and orientation along with variables to control the fi eld of view. A camera also has
some utility functions to enable 2-D pixel coordinates to be converted into 3-D ray directions and vice versa. This is
useful when implementing interactive scripts that need to fi re rays into a scene.
Physical Simulation
One of the powerful features of Atmosphere is the ability to create physically-realistic animation using the built-in
physics engine. A physics engine may be thought of as a process that updates the position and orientation of certain
objects every frame in accordance with the laws of physics. Without a physics engine, objects can pass through each
other without collisions and do not experience forces such as gravity.
In addition, physics engines allow the specifi cation of physical “constraints” which restrict the motion in a way that
is consistent with the presence of things like hinges, slide rails or pivot points. Using combinations of physically
animated objects and constraints, it is possible to construct elaborate mechanisms (such as vehicles) that interact with
the world and with each other in a realistic manner.










