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

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

### Class description:

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

### Class methods:

> Setting and Getting the Position and Rotation of Real Objects

> - get-location
> - get-rotation-matrix
> - move
> - point
> - set-rotation
> - set-rotation-euler-angles
> - set-rotation-matrix

> Setting the Shape of a Real Object

> - get-collision-shape
> - get-display-shape
> - set-collision-shape
> - set-display-shape
> - set-shape
> - watch

> Configuring Physical Properties of the Object

> - set-e
> - set-mu

> Using Menus

> - add-menu
> - add-menu-separator

> Using Neighbor Detection

> - get-neighborhood-size
> - get-neighbors
> - set-neighborhood-size

> Changing the Appearence of Agents

> - add-dotted-line
> - add-line
> - disable-shadows
> - draw-as-point
> - enable-shadows
> - get-color
> - hide-axis
> - hide-bounding-box
> - hide-neighbor-lines
> - make-invisible
> - make-visible
> - remove-all-lines
> - remove-line
> - set-bitmap-heading
> - set-bitmap-heading-point
> - set-bitmap-image
> - set-color
> - set-lightmap-image
> - set-texture-image
> - set-texture-scale
> - set-texture-scale-x
> - set-texture-scale-y
> - set-transparency
> - show-axis
> - show-bounding-box
> - show-neighbor-lines

> Getting the Light Exposure of this Mobile Object

> - get-light-exposure

> Handling Collisions

> - handle-collisions
> - ignore-collisions

> Useful Funtions for Sensors

> - raytrace

`add-dotted-line to otherObject (object) with-color theColor = (0, 0, 0) (vector)`

> Adds a dotted line to otherObject. See add-line for more information on object lines.

`add-line to otherObject (object) with-color theColor = (0, 0, 0) (vector) with-style theStyle = "----------------" (string)`

> Adds a line to be drawn from this object to otherObject. The line can be removed later using remove-line.

> The optional argument theColor specifies the color of the line. The default color is the vector (0, 0, 0), black.

> The optional argument theStyle specifies a pattern for the line. theStyle is a string of 16 spaces and/or dashes which specify the line pattern to be drawn. A dotted line, for example, would use the pattern "- - - - - - - - ". A thickly dashed line would use the pattern "-------- ". If no style is given, a solid line is drawn.

> If a line to otherObject already exists, its color and/or style 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.

`disable-shadows`

> If shadow volumes are enabled (see Control), disables shadow volumes for this object. This is the default when shadow volumes have been enabled.

`draw-as-point`

> Draws the object as a single point. This is by far the fastest way to display an agent. Points can be used to draw upwards of 20,000 agents with a reasonable frame rate, while drawing as many spheres or bitmaps would slow down the simulation significantly.

`enable-shadows`

> If shadow volumes are enabled (see Control), enables shadow volumes for this object. This is the default when shadow volumes have been enabled.

`get-collision-shape`

> Returns the Shape used for collisions associated with this Mobile object.

`get-color`

> Returns the color of the object.

`get-display-shape`

> Returns the Shape used for display associated with this Mobile object.

`get-light-exposure`

> When used in conjunction with light exposure detection (enable-light-exposure-detection (Control)), this method returns the level of light exposure on this object.

`get-location`

> Returns the vector location of this object.

`get-neighborhood-size`

> gets the neighborhood size for the current object.

`get-neighbors`

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

`get-rotation-matrix`

> Returns the matrix rotation of this object.

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

> Adds a collision handler for this object. When a collision occurs between an instance of the this 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.

`ignore-collisions with-type theType (string)`

> Instructs the engine to ignore physical collisions with theType objects. This does not affect collision callbacks specified with handle-collisions.

`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.

`move to newLocation (vector)`

> Moves this object to location newLocation.

`point vertex theVertex (vector) at theLocation (vector)`

> An easier way to rotate an object--this function rotates an object such that the local point theVertex, points towards the world direction theLocation. In other words, theLocation is where you want the object to face, and theVertex indicates which side of the object is to be considered the "front".

`raytrace from-location theLocation (vector) with-direction theDirection (vector)`

> Computes the vector from theLocation towards theDirection that hits the shape of this object.

> If the object was not hit vector (0, 0, 0) will be returned.

> The location and direction vector must be given relative to the world's coordinate frame.

`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-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-bitmap-image to bitmapImage (object)`

> Changes the bitmap of this object to bitmapImage, an instance of class image. If bitmapImage is NULL, bitmapping is turned off for the object.

`set-collision-shape to theShape (object)`

> Associates a Shape object with this object for collision purposes. This shape will not be displayed for this object unless set-display-shape is also called with this shape. Returns this object.

`set-color to newColor (vector)`

> Sets the color of this object to newColor.

`set-display-shape to theShape (object)`

> Associates a Shape object with this object for display purposes only. This shape will not be used for collision detection unless it is passed to set-collision-shape as well. Returns this object.

`set-e to newE (float)`

> Sets the "coefficient of restitution" a value which determines the elasticity of the object in a collision. Valid values range from 0.0 to 1.0, with 0.0 representing a totally inelastic collision (such as a lump of clay) while 1.0 represents a totally (and unrealistically) elastic collision (such as a rubber ball).

`set-lightmap-image to lightmapImage (object)`

> Sets the object to be displayed using a "lightmap". A lightmap uses the texture specified for an "additive blending" effect which yields a lighting effect.

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

`set-mu to newMu (float)`

> Sets the coefficient of friction to newMu. mu is a parameter controlling friction between two bodies and may be any value between 0 and infinity.

`set-neighborhood-size to size (float)`

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

`set-rotation around-axis thisAxis (vector) by amount (float)`

> Sets the rotation of this object around vector axis thisAxis by scalar amount (in radians). This is an "absolute" rotation--the current rotation of the object does not affect how the object will be rotated. For a rotation relative to the current orientation, set relative-rotate.

`set-rotation-euler-angles to angles (vector)`

> Sets the rotation of this object to the Euler angles specified by angles (in radians).

`set-rotation-matrix to theRotation (matrix)`

> Sets the rotation of this object to the rotation matrix theRotation. Working with matrices can be complicated, so a more simple approach is to use rotate.

`set-shape to theShape (object)`

> Sets the shape of this object, for both display and collision detection purposes. To set the shape for one purpose, but not the other, use the methods set-display-shape or set-collision-shape.

`set-texture-image to textureImage (object)`

> Changes the texture of this object to textureImage, an instance of class Image. If textureImage is NULL texturing is turned off for the object.

`set-texture-scale to scaleSize (float)`

> 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-texture-scale-x to scaleSize (float)`

> Sets the texture scale in the X dimension. The Y texture scale value is unchanged. See set-texture-scale for more information.

`set-texture-scale-y to scaleSize (float)`

> Sets the texture scale in the Y dimension. The X texture scale value is unchanged. See set-texture-scale for more information.

`set-transparency to alphaValue (float)`

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

`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).

`watch`

> Makes the camera follow this object.

Documentation created Thu Jul 3 18:18:12 2008