-
Notifications
You must be signed in to change notification settings - Fork 1
UML Diagrams
An MARSObject is something in the MARS simulation. It can be an moving AUV or a static pipeline object. It split up in those two groups. SimObjects are non self movable objects e.g. a 3d mesh that serves only for collision purposes or to be visible for the camera. Where an AUV is a self moving object. An implementation of the AUV interface is BasicAUV. It handles all physical calculations, debugging and the 3-dimensional representation. It consist out of AUVObject (Sensors,Actuators). All Parameters, e.g. mass, are stored in the AUVParameters. Responsible for managing these two classes are there respective manager objects. AUV_Manager and SimObjectManager. These two manage the complete life-cycle. This includes force updates, registration(creation) and deregistration(delete).
An AUVObject is something that is attached to an AUV. There are 3 main AUVObjects. Actuators, sensors and accumulators. Actuators are for the movement of the AUV e.g. Thrusters. But they also contain anything that moves something e.g. servos. Sensors are for the sensing of the AUV e.g. video camera or pressure sensor. Lastly, accumulators represent an energy source. Every PhysicalExchanger can drain energy from it. They all share the common ground AUVObject. Sensors and actuators are combined in the PhysicalExchanger. Where accumulators are a special case and inherit only from AUVObject. The interface Moveable and Manipulating serve the purpose to move AUVObjects through other AUVObjects. These are typically used by servos (Manipulating) that want to move an other AUVObject e.g. a thruster(Moveable) or camera.
MARSTopComponent is the main entry point for MARS. Its basically a NetBeans Window that starts MARS_Main (a JME SimpleApplication) and setups the panels/views so something can be seen. The most simulation work is done in a separate State (see JME States) called SimState. Thats where most of the MARS magic is happening. There are several other States. MapState is for the mini-map, GuiState handles all the input (mouse, keyboard) and NiftyState is for PopUps. MARSAppState provides a RootNode getter since JME does not provide one in the AbstractAppState.
The SimState is the main part of MARS. It handles the update loop. The two managers (AUV and SimObject) handle their respective Objects. The Initializer is for setting up different things like graphics. PhysicalEnvironment is a simple storage class with all outer world parameters e.g. fluid density. MARS_Settings is also a simple storage class for all other settings of MARS e.g. graphics.
MARS uses events and listeners to provide information from AUVs and sensors. Every MARSObject (AUV) produces MARSObjectEvents and every MARSObjectListener that is registered gets updated. The same applies for AUVObjects (Sensors). So if you want information from sensors or AUVs just implement the respective listener and add it to your desired event source.
The event system is quite easy and uses the the standard Java events and listeners as basis.