Merge branch 'refactor-controllers' into 'master'
Refactor controllers This MR aims to refactor the VirtualCouplingObject class into a SceneObjectController, as well as correct some style and architecture issues. ### STYLE: correct identation 97fc549f Convert tabs to 4 spaces ### ENH: simplify TrackingController constructor fbc48bae - Get rid of scaling in constructor (too many parameters, why choose scaling and not others? Use `setTranslationScaling` instead) - No more default `nullptr` value for `DeviceClient` in controller constructor ### ENH: Implement getMasterGeometry 85470771 Returns the master geometry. A geometry is qualified master by the direction of the geometry maps of the object. For example with a dynamic object, physic geometry will drive the changes to the colliding geometry, which will drive the changes to the visual geometry... ### ENH: Divide SceneObject & CollidingObject d8fee1f4 (fixes #84) Colliding geometry is only in `CollidingObject, not `SceneObject`. To do this, we also had to : - Have `PbdObject` inherit `CollidingObject` *(in the future there should not be a distinct object class just for Pbd : there should just be dynamical objects that can use different models, like Pbd or FEM)* - Remove useless checks when creating interactions: even two colliding objects (not dynamic, aka static) could be interacting if they are both controlled by devices ### STYLE: correct some includes and forward declarations 0340bde7 ### ENH: remove interface for transforming geometry in RigidObject 7c272963 We are still wondering how to store/apply our geometries. Having yet another interface to only wrap the API to transform the geometry is not needed: we can directly call them on the geometry themselves for more transparency on what geometry is being updated. *This should be investigated later on when we will work with rigid body dynamics.* ### ENH: Refactor VirtualCouplingObject in a controller (fixes #99) - `SceneObjectController`: similar to cameraController, it subclasses trackingController to update the transformation of an object master geometry, instead of updating itself. - `SceneObject`: similar to camera, has an interface to easily setup a controller using a device client. - `CollidingObject`: stores the force vector that needs to be applied to the device. - `SceneManager`: make the API calls from controller instead of object ### STYLE: Rename cameraController attribute to controller 9e199a30 See merge request !102
Showing with 2602 additions and 2569 deletions