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 : MultiBody

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

Class description:

The MultiBody class is used to manipulate a group of connected Link objects as a single logical body. This means that the entire group of links can be moved or otherwise manipulated using by referring to the MultiBody.

After the creating and connecting of the links is complete, one of the Link objects must be declared the root of the MultiBody using the set-root method.

Class methods:

Adding Menus

Getting and Setting the Position of a MultiBody

Managing the Appearence of MultiBodies

Handling and Detecting Collisions

Getting and Setting Information About Connected Objects


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.


check-self-penetration

Checks to see if this MultiBody is colliding with itself. This method is useful when a MultiBody is first built to determine whether the "native" configuration of the body is valid or not. If the body is in a conflicting configuration when it's first built, it may lead to unexpected behaviors as the body attempts to correct itself.


disable-self-collisions

Disables collisions between links within this MultiBody. See enable-self-collisions for more information.


enable-self-collisions

Enables collisions between objects contained in the same MultiBody. This option is disabled by default--it can lead to unexpected behaviors if Links are inadvertantly forced together by the configuration of the joints.


free-all-connected-objects

Frees all of the Link and Joint objects which comprise this MultiBody.


get-all-connected-links

Returns all of the Link objects which comprise the MultiBody.


get-all-connected-objects

Returns all of the Link and Joint objects which comprise this MultiBody.


get-location

Returns the location of the root link of the multibody.


get-root

Returns the root link.


hide-axis

Disables the axis for all connected links.


hide-bounding-box

Disables the bounding box for all connected links.


move to newLocation (vector)

Moves the entire MultiBody to newLocation.


rotate around-axis thisAxis (vector) by amount (float)

Sets the rotation of this multibody 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.

This method implicitly changes the rotation and location of all attached link objects.


set-color to newColor (vector)

Sets the color for all links.


set-root to root (object)

Associates a MultiBody with a link root. All links attached to root, both directly and indirectly, will implicitly be part of this MultiBody as well. When joints are created and destroyed, the MultiBody automatically updates.


set-self-collision-parameters erp erpValue (float) cfm cfmValue (float)

Sets two contact parameters which effect the hardness of intra-body contacts.

  • Currently experimental and for advanced users only. See the ODE user's manual for a description of these values and how they should be used.


  • set-texture-image to texture (object)

    Sets the texture for all links.


    set-texture-scale to textureScale (float)

    Sets the texture scale for all links.


    show-axis

    Enables the axis for all connected links.


    show-bounding-box

    Enables the bounding box for all connected links.


    Documentation created Sun Oct 7 19:13:03 2007