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.
Configuring Physical Properties of the Object
Using Menus
Using Neighbor Detection
Changing the Appearence of Agents
- add-dotted-line
- add-line
- draw-as-point
- 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
Handling Collisions
Useful Funtions for Sensors
Adds a dotted line to otherObject. See add-line for more information on object lines.
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.
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.
Adds a separator menu item--really just an empty menu item.
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.
Returns the color of the object.
When used in conjunction with light exposure detection (enable-light-exposure-detection (Control)), this method returns the level of light exposure on this object.
gets the neighborhood size for the current object.
Returns a list of all real objects in the simulation that are within the "neighborhood" range of this object in the world.
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.
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.
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.
Hides lines to this objects neighbors.
Instructs the engine to ignore physical collisions with theType objects. This does not affect collision callbacks specified with handle-collisions.
Makes the object invisible. Can be made visible again later using the method make-visible.
Makes the object visible again (if it has previously been hidden using make-invisible.
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.
Removes all lines connecting this object to other objects.
Removes the line connecting this object to otherObject.
If this object is in 2d bitmap mode, the rotation of the bitmap will be set to radianAngle.
If this object is in 2d bitmap mode, the rotation of the bitmap will be set to degreeAngle degrees.
Changes the bitmap of this object to bitmapImage, an instance of class image. If bitmapImage is NULL, bitmapping is turned off for the object.
Sets the color of this object to newColor.
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).
Sets the "tangential coefficient of restitution", a frictional version of the "coefficient of restitution" described in the documentation for set-e. The value ranges from -1.0 to 1.0. Negative values mean that friction pushes against the sliding object.
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.
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.
Used in conjunction with get-neighbors, this function will set the neighborhood size for the current 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.
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.
Sets the texture scale in the X dimension. The Y texture scale value is unchanged. See set-texture-scale for more information.
Sets the texture scale in the Y dimension. The X texture scale value is unchanged. See set-texture-scale for more information.
Sets the transparency of this object to alphaValue, a number between 1.0 (totally opaque) and 0.0 (fully transparent).
Shows the X and Y axes for the object.
Shows the bounding box for the object.
Draws lines to this objects neighbors (when neighbor checking is enabled).
Makes the camera follow this object.