These pages are auto-generated from self-documenting comments embedded in class files.
For more information on breve and steve, refer to the breve homepage.

Real : Stationary

This class is included as part of the file Stationary.tz.
To use this class in a simulation, include the line "@use Stationary."

Class description:

Stationary objects are objects such as floors and walls that may collide with other objects but will never move. Stationary objects require much less computation than Mobile objects, so it is always preferable to use a Stationary object when you know that an object will not need to move during a simulation.

To setup a stationary object, you'll need to associate it with a Shape object using the method register.

Class methods:

Setting Up the Stationary Object

Changing the Appearence of the Object


catch-shadows

Informs this object that it should display shadows (and/or reflections) of Mobile objects. The shadows and reflections will always be shown on the plane of the object pointing upwards on the Y axis--that is to say, the plane with normal (0, 1, 0). If the object does not have a plane with normal (0, 1, 0), the shadows and reflections will not be displayed correctly. This method must be used in conjunction with the method enable-shadows (Control).

Before using this method, you should also refer to an improved shadowing technique outlined in OBJECTMETHOD(Control.tz:enable-shadow-volumes).


get-color

Returns the color of the Stationary object.


get-location

Returns the location of the Stationary object.


register with-shape theShape (object) at-location theLocation = (0, 0, 0) (vector) with-rotation theRotation = [ ( 1, 0, 0 ), ( 0, 1, 0 ), ( 0, 0, 1 ) ] (matrix)

Registers a stationary object using shape theShape at the location specified by theLocation.


set-color to newColor (vector)

Sets the color of the Stationary object to newColor. Textures override color settings, so be sure to set the texture to -1 using the Real.tz method set-texture if you want a flat color to be displayed--the texture is on by default for stationary objects.

The vector elements of newColor are interpreted as red, green, and blue values, on a scale from 0.0 to 1.0.

The Stationary object must be registered in the world before calling this method. See register.


Documentation created Sat Jan 20 13:16:29 2007