Index: /trunk/lib/FlairSimulator/src/X4.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/X4.cpp	(revision 369)
+++ /trunk/lib/FlairSimulator/src/X4.cpp	(revision 370)
@@ -25,4 +25,5 @@
 #ifdef GL
 #include <ISceneManager.h>
+#include <IMeshManipulator.h>
 #include "Blade.h"
 #include "MeshSceneNode.h"
@@ -76,4 +77,9 @@
                             
   motorTimeout = new SpinBox(setup_tab->NewRow(), "motor timeout:","ms", 0, 1000, 100,100);
+  
+  Tab *visual_tab = new Tab(GetTabWidget(), "visual");
+  armColorR = new SpinBox(visual_tab->NewRow(), "arm color (R):", 0, 255, 1,255);
+  armColorG = new SpinBox(visual_tab->LastRowLastCol(), "arm color (G):", 0, 255, 1,0);
+  armColorB = new SpinBox(visual_tab->LastRowLastCol(), "arm color (B):", 0, 255, 1,0);
 
   motors = new SimuBldc(this, name, 4, modelId,0);
@@ -98,5 +104,5 @@
 
   // cylinders are aligned with y axis
-  IMesh *red_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 255, 0, 0));
+  colored_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, armColorR->Value(), armColorG->Value(), armColorB->Value()));
   IMesh *black_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 128, 128, 128));
   IMesh *motor = geo->createCylinderMesh(7.5, 15, 16); //,SColor(0, 128, 128, 128));
@@ -104,7 +110,7 @@
 
   ITexture *texture = getGui()->getTexture("carbone.jpg");
-  MeshSceneNode *fl_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
+  MeshSceneNode *fl_arm = new MeshSceneNode(this, colored_arm, vector3df(0, 0, 0),
                              vector3df(0, 0, -135));
-  MeshSceneNode *fr_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
+  MeshSceneNode *fr_arm = new MeshSceneNode(this, colored_arm, vector3df(0, 0, 0),
                              vector3df(0, 0, -45));
   MeshSceneNode *rl_arm = new MeshSceneNode(this, black_arm, vector3df(0, 0, 0),
@@ -141,4 +147,8 @@
   rr_blade->SetRotationSpeed(K_MOT *vector3df(0, 0, motor_speed[3]));
   motor_speed_mutex->ReleaseMutex();
+  
+  if (armColorR->ValueChanged() == true || armColorG->ValueChanged() == true || armColorB->ValueChanged() == true) {
+    getGui()->getSceneManager()->getMeshManipulator()->setVertexColors(colored_arm, SColor(0,armColorR->Value(), armColorG->Value(), armColorB->Value()));
+  }
 
   // adapt UAV size
Index: /trunk/lib/FlairSimulator/src/X4.h
===================================================================
--- /trunk/lib/FlairSimulator/src/X4.h	(revision 369)
+++ /trunk/lib/FlairSimulator/src/X4.h	(revision 370)
@@ -33,4 +33,12 @@
 }
 
+#ifdef GL
+namespace irr {
+namespace scene {
+class IMesh;
+}
+}
+#endif
+
 namespace flair {
 namespace simulator {
@@ -55,4 +63,5 @@
   Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade;
   core::Mutex *motor_speed_mutex;
+  irr::scene::IMesh *colored_arm;
 #endif
 
@@ -64,4 +73,5 @@
   gui::DoubleSpinBox *j_roll, *j_pitch, *j_yaw;
   gui::SpinBox *motorTimeout;
+  gui::SpinBox *armColorR,*armColorG,*armColorB;
 };
 } // end namespace simulator
Index: /trunk/lib/FlairSimulator/src/X8.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/X8.cpp	(revision 369)
+++ /trunk/lib/FlairSimulator/src/X8.cpp	(revision 370)
@@ -25,4 +25,5 @@
 #ifdef GL
 #include <ISceneManager.h>
+#include <IMeshManipulator.h>
 #include "Blade.h"
 #include "MeshSceneNode.h"
@@ -85,4 +86,9 @@
   motorTimeout = new SpinBox(setup_tab->NewRow(), "motor timeout:","ms", 0, 1000, 100,100);
 
+  Tab *visual_tab = new Tab(GetTabWidget(), "visual");
+  armColorR = new SpinBox(visual_tab->NewRow(), "arm color (R):", 0, 255, 1,255);
+  armColorG = new SpinBox(visual_tab->LastRowLastCol(), "arm color (G):", 0, 255, 1,0);
+  armColorB = new SpinBox(visual_tab->LastRowLastCol(), "arm color (B):", 0, 255, 1,0);
+  
   motors = new SimuBldc(this, name, 8, modelId,0);
   
@@ -102,5 +108,5 @@
 
   // cylinders are aligned with y axis
-  IMesh *red_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 255, 0, 0));
+  colored_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, armColorR->Value(), armColorG->Value(), armColorB->Value()));
   IMesh *black_arm = geo->createCylinderMesh(2.5, 100, 16, SColor(0, 128, 128, 128));
   IMesh *motor = geo->createCylinderMesh(7.5, 15, 16); //,SColor(0, 128, 128, 128));
@@ -108,7 +114,7 @@
 
   ITexture *texture = getGui()->getTexture("carbone.jpg");
-  MeshSceneNode *fl_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
+  MeshSceneNode *fl_arm = new MeshSceneNode(this, colored_arm, vector3df(0, 0, 0),
                              vector3df(0, 0, -135));
-  MeshSceneNode *fr_arm = new MeshSceneNode(this, red_arm, vector3df(0, 0, 0),
+  MeshSceneNode *fr_arm = new MeshSceneNode(this, colored_arm, vector3df(0, 0, 0),
                              vector3df(0, 0, -45));
   MeshSceneNode *rl_arm = new MeshSceneNode(this, black_arm, vector3df(0, 0, 0),
@@ -171,4 +177,9 @@
   brr_blade->SetRotationSpeed(-K_MOT * vector3df(0, 0,motor_speed[7]));
   motor_speed_mutex->ReleaseMutex();
+
+  if (armColorR->ValueChanged() == true || armColorG->ValueChanged() == true || armColorB->ValueChanged() == true) {
+    getGui()->getSceneManager()->getMeshManipulator()->setVertexColors(colored_arm, SColor(0,armColorR->Value(), armColorG->Value(), armColorB->Value()));
+  }
+
 
   // adapt UAV size
Index: /trunk/lib/FlairSimulator/src/X8.h
===================================================================
--- /trunk/lib/FlairSimulator/src/X8.h	(revision 369)
+++ /trunk/lib/FlairSimulator/src/X8.h	(revision 370)
@@ -33,4 +33,12 @@
 }
 
+#ifdef GL
+namespace irr {
+namespace scene {
+class IMesh;
+}
+}
+#endif
+
 namespace flair {
 namespace simulator {
@@ -56,4 +64,5 @@
   Blade *tfl_blade, *tfr_blade, *trl_blade, *trr_blade;
   Blade *bfl_blade, *bfr_blade, *brl_blade, *brr_blade;
+  irr::scene::IMesh *colored_arm;
 #endif
 
@@ -66,4 +75,5 @@
   gui::DoubleSpinBox *j_r, *sigma, *S;
   gui::SpinBox *motorTimeout;
+  gui::SpinBox *armColorR,*armColorG,*armColorB;
 };
 } // end namespace simulator
