diff --git a/idl/gepetto/viewer/graphical-interface.idl b/idl/gepetto/viewer/graphical-interface.idl index cfa55f53ed7253009e38606dc08c171ea66bbb64..cb71f53583ee13115c201917e6502b816f7c25a6 100644 --- a/idl/gepetto/viewer/graphical-interface.idl +++ b/idl/gepetto/viewer/graphical-interface.idl @@ -518,6 +518,9 @@ typedef sequence<Transform> TransformSeq; /// \param configuration : the desired configuration of the camera boolean setCameraTransform(in WindowID wid, in Transform configuration) raises (Error); + /// Set the camera to best fit. + boolean setCameraToBestFit(in WindowID wid) raises (Error); + // register a Node callback boolean registerNodeCallback (in NodeCallback cb) raises (Error); diff --git a/src/graphical-interface.impl.cpp b/src/graphical-interface.impl.cpp index c7dd883b1e3ea5b7b986edc87ce9578d869beb16..b0fce17d2491edc009ea810a4ea67fc113e7a6d0 100644 --- a/src/graphical-interface.impl.cpp +++ b/src/graphical-interface.impl.cpp @@ -280,6 +280,8 @@ namespace gepetto { BIND_TO_WINDOWS_MANAGER_2(BOOL,setCameraTransform,WINDOW_ID,TRANSFORM) + BIND_TO_WINDOWS_MANAGER_1(BOOL,setCameraToBestFit,WINDOW_ID) + // ------------- Properties -------------------- // BIND_TO_WINDOWS_MANAGER_1(STRING_LIST,getPropertyNames,STRING) diff --git a/src/graphical-interface.impl.hh b/src/graphical-interface.impl.hh index a3134dbe2782762aef3fc81f315b95cc12d8417f..81305c23ec9fbec03ccb1268fe8a5e7e0e13ebc4 100644 --- a/src/graphical-interface.impl.hh +++ b/src/graphical-interface.impl.hh @@ -158,6 +158,7 @@ public: virtual bool setBackgroundColor2(const char* windowId,const Color colorCorba); virtual Transform_slice* getCameraTransform(const char* windowId); virtual bool setCameraTransform(const char* windowId, const value_type *configurationCorba); + virtual bool setCameraToBestFit(const char* windowId); // ------------- Properties -------------------- // virtual Names_t* getPropertyNames(const char* nodeName);