From 9c69c096c76d36c0f481b24503eef8fb4ff5a818 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Mon, 16 Sep 2019 14:15:09 +0200
Subject: [PATCH] Bind WindowsManager::removeLightSources.

---
 idl/gepetto/viewer/graphical-interface.idl | 4 ++++
 src/graphical-interface.impl.cpp           | 2 ++
 src/graphical-interface.impl.hh            | 2 ++
 3 files changed, 8 insertions(+)

diff --git a/idl/gepetto/viewer/graphical-interface.idl b/idl/gepetto/viewer/graphical-interface.idl
index b4b9ccf..6b99851 100644
--- a/idl/gepetto/viewer/graphical-interface.idl
+++ b/idl/gepetto/viewer/graphical-interface.idl
@@ -123,6 +123,10 @@ typedef sequence<Transform> TransformSeq;
     /// \param input meshPath : full path to the mesh file.
     boolean addMesh(in string meshName, in string meshPath) raises (Error);
 
+    /// Remove light sources from mesh
+    /// \param input meshName : name of the new meshNode.
+    void removeLightSources(in string meshName) raises (Error);
+
     /// create a node to display a mesh (works for .dae, .obj and some other formats)
     /// \param input meshName : name of the new meshNode.
     /// \param input meshPath : full path to the mesh file.
diff --git a/src/graphical-interface.impl.cpp b/src/graphical-interface.impl.cpp
index 2268249..295cc0d 100644
--- a/src/graphical-interface.impl.cpp
+++ b/src/graphical-interface.impl.cpp
@@ -168,6 +168,8 @@ namespace gepetto {
 
       BIND_TO_WINDOWS_MANAGER_2(BOOL, addMesh, STRING, STRING)
 
+      BIND_TO_WINDOWS_MANAGER_1(VOID, removeLightSources, STRING)
+
       BIND_TO_WINDOWS_MANAGER_4(BOOL, addCone, STRING, FLOAT, FLOAT, COLOR)
 
       BIND_TO_WINDOWS_MANAGER_2(BOOL, setTexture, STRING, STRING)
diff --git a/src/graphical-interface.impl.hh b/src/graphical-interface.impl.hh
index 89f8bfd..1b16649 100644
--- a/src/graphical-interface.impl.hh
+++ b/src/graphical-interface.impl.hh
@@ -78,6 +78,8 @@ public:
 
   virtual bool addMesh(const char* meshNameCorba, const char* meshPathCorba)  throw (Error);
 
+  virtual void removeLightSources (const char* meshNameCorba)  throw (Error);
+
   virtual bool addCone(const char* coneName, float radius, float height, const Color color) throw (Error);
 
   virtual bool addCylinder(const char* cylinderName, float radius, float height, const Color color) throw (Error);
-- 
GitLab