






Alyce's Changes to Allow Non Fish
>
>On my web site (http://www.cs.kzoo.edu/AP/MBS/) you can find altmbsgui.jar,
>an alternative for mbsgui.jar that can display objects other than a
>fish. This could be useful to put things other than fish into the
>MBS Simulation, or for writing other applications that use an
>Environment.
>
>Note that to put things other than Fish in the MBS Simulation you
>will also need to change the Simulation code, which currently casts
>all the Locatable objects to Fish objects before calling the act
>method. One possibility is to create an Active interface (containing
>only an act method), modify Fish to implement Active, and create your
>boats or islands or whatever and have them implement Active also
>(possibly with act methods that do nothing).
>
>The new altmbsgui.jar graphical user interface can handle both
>display classes and images for Locatable objects other than Fish (by
>extending AbstractLocatableDisplay or using LocatableImageDisplay).
>If you add your new classes, such as Boat or Island, to the array of
>classes passed to MBSFactory.addEnvObjClassNames in MBSGUI.java, then
>you can also add/edit boats and islands in the Create Environment
>part of the graphical user interface. You can find examples of the
>Active interface, modified MBSGUI, Fish, and Simulation classes, and
>new Island, Rock, and RockDisplay classes on my web page.
>
>Alyce
>
Link to this Page