| Body Builder | ![]() |
BodyBuilder consists of several MATLAB classes written in MATLAB's Object-Oriented Programming Language, which is part of the general release as of R2008a. Some classes contain Java objects to assist 3D object visualization or provide other GUI widgets.
The Class Structure
The CoordSystem class contains a Triad
object and a reference CoordSystem. The Triad contains the
graphic primitives that comprise the triad axes that are displayed as
well as a BranchGroup, which links the Triad (and hence the CoordSystem
it belongs to) to the CoordSystem's reference CoordSystem. A
special CoordSystem is a Shape's Origin. Shown graphically below, suffice to say
that every Shape is attached to a Complex Shape (i.e., its parent
shape). The Shape's Origin is attached to the Origin CoordSystem
of its parent shape. Specifically, the BranchGroup of the Shape's
Origin's Triad is attached to the TransformGroup of the parent Shape's
Origin's Triad. Therefore, for Shape Origin CoordSystem's, the
reference CoordSystem is the parent's Origin. For
other-than-Origin CoordSystems, the reference CoordSystem is user
selected and changable and provides a location and orientation about
which the CoordSystem is positioned.
Thereis a single, nonmodifiable World Origin CoordSystem that provides an absolute zero point in space along with global X-Y-Z directions. It does not have a reference CoordSystem.
The PrimitiveShape Class contains
primitive graphics according to the shape it serves to represent.
The ComplexShape Class can contain other ComplexShape objects and PrimitveShape objects.
Connecting Shapes involves setting
the reference CoordSystem of a Shape (PrimitiveShape or ComplexShape)
to the Origin CoordSystem of the parent ComplexShape. This is
done automatically when the user adds a Shape to the body.
|
User's Guide | Extending BodyBuilder | ![]() |