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.

Object : Real

Class Description:

A class which is never instantiated--just used as a logical distinction from the Abstract classes. See the child classes Mobile, MultiBody and Stationary for more information. The methods documented here may be used with any of the child classes.

Class methods:

Using Menus

Using Neighbor Detection

Controlling Agent Appearence

Handling Collisions


add-line to otherObject (object) with-color theColor (vector)

Adds a line to be drawn from this object to otherObject. The line will have the color theColor. The line can be removed later using remove-line.

If a line to otherObject already exists, its color will be updated.


add-menu named menuName (string) for-method theMethod (string)

Adds a menu named menuName to the application which will result in a call to theMethod for the calling instance.

If the calling instance is the Controller object, then the menu will become the "main" simulation menu. Otherwise, the menu will become a contextual menu associated with the specific object in the simulation.

Note that unlike the handle-collision which sets the collision handler for the whole type (class, that is), this method affects only the instance for which it is called, meaning that each instance of a certain class may have a different menu.


add-menu-separator

Adds a separator menu item--really just an empty menu item.


get-neighbors

Returns a list of all real objects in the simulation that are within the "neighborhood" range of this object in the world.


handle-collisions with-type theType (string) with-method theMethod (string)

Adds a collision handler for the calling object--when a collision occurs between an instance of the calling type and theType, the breve engine will automatically call theMethod of the colliding instance.


hide-axis

Hides the X and Y axes for the object. The axes are hidden by default, so you'll only need this method if you've previously enabled them using show-axis.


hide-bounding-box

Hides the bounding box for the object. The bounding box is hidden by default, so you'll only need this method if you've previously enabled them using show-axis.


hide-neighbor-lines

Hides lines to this objects neighbors.


make-invisible

Makes the object invisible. Can be made visible again later using the method make-visible.


make-visible

Makes the object visible again (if it has previously been hidden using make-invisible.


remove-all-lines

Removes all lines connecting this object to other objects.


remove-line to otherObject (object)

Removes the line connecting this object to otherObject.


set-bitmap to textureNumber (int)

Sets the object to be displayed as a bitmap, using the image stored as texture number textureNumber. If textureNumber is -1 (or an invalid texture), the object is displayed normally.

set-bitmap only has an effect on sphere shapes. Other shapes can be textured, but only spheres can be made into bitmaps.

Note that the custom bitmap affects only the display of the object--it does not affect the collision detection of the object. In other words, the object will continue to behave as a sphere as far as collision detection and other physical simulation issues are concerned.


set-bitmap-heading to radianAngle (float)

If this object is in 2d bitmap mode, the rotation of the bitmap will be set to radianAngle.


set-bitmap-heading-point towards-vector rotationVector (vector)

If this object is in 2d bitmap mode, the rotation of the bitmap will be set to degreeAngle degrees.


set-lightmap to textureNumber (int)

Sets the object to be displayed using a "lightmap". A lightmap uses the texture specified and treats it like a light source. It's hard to explain. Give it a try for yourself.

set-lightmap only has an effect on sphere shapes. Other shapes can be textured, but only spheres can be made into lightmaps.


set-neighborhood-size to size (float)

Used in conjunction with get-neighbors, this function will set the neighborhood size for the current object.


set-texture to textureNumber (int)

Changes the texture of this object to textureNumber. If textureNumber is -1 (or an invalid texture), texturing is turned off for the object.


set-texture-scale to scaleSize (int)

Changes the "scale" of the texture. When a texture is applied over a shape, this value is used to decide how large the texture will be in terms of breve-world units. The default value is 16, meaning that a 16x16 face will have one copy of the textured image. For smaller objects, this number will have to be decreased, or else the texture will be too big and will not be visible.


set-transparency to alphaValue (float)

Sets the transparency of this object to alphaValue, a number between 0.0 (totally transparent) and 1.0 (fully opaque).


show-axis

Shows the X and Y axes for the object.


show-bounding-box

Shows the bounding box for the object.


show-neighbor-lines

Draws lines to this objects neighbors (when neighbor checking is enabled).


Documentation created Tue May 11 10:28:37 2004