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.

Mobile : MultiBody

Class Description:

The MultiBody class is used to create a physically simulated articulated body--an object which is made up of many different Link objects, which are connected together with different types of Joint objects.

To create a MultiBody, the individual links must first be created using the Link class. These Link objects must then be connected to each other. Methods to connect Link objects are available in the Link class (for convenience) or the Joint class (which offers more control)

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. Only after one of the Link objects is registered with a MultiBody will it appear in the simulated world.

Class methods:


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.


set-root to root (object)

Associates a MultiBody with a link root and adds the object to the world. rootLink may have children links, but may not have a parent link. See Link documentation for more information.


unregister

Dissociates this object from the Link object it was previously attached to using register. This has the effect of removing all of this MultiBody's links from the world, but it does not destroy the links or the MultiBody. Both the links and this multibody itself may then be reused in a different context.

A very common use of this method is to join two MultiBody objects into one during a simulation. Imagine a simulation with two complex Multibodies, "A" and "B". To unite A and B as a single body, we would 1) dissociate B from its Link objects, and then 2) attach one of those links to one of the "A" objects using a Joint object.

After dissociating a MultiBody, care must be taken not to attempt to move, rotate, color or otherwise manipulate the object as you might do with a MultiBody after it has been registered--after calling this method, the object is no longer "registered".

This method returns the now dissociated root-link (the same Link object that was passed to register.


Documentation created Tue May 11 10:28:37 2004