Revision: 7705
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7705&view=rev
Author:   natepak
Date:     2009-05-20 23:51:46 +0000 (Wed, 20 May 2009)

Log Message:
-----------
Added <range> tags to lights

Modified Paths:
--------------
    code/gazebo/trunk/server/rendering/OgreCreator.cc
    code/gazebo/trunk/worlds/audio.world
    code/gazebo/trunk/worlds/bandit.world
    code/gazebo/trunk/worlds/bumper.world
    code/gazebo/trunk/worlds/factory.world
    code/gazebo/trunk/worlds/federation.world
    code/gazebo/trunk/worlds/laser.world
    code/gazebo/trunk/worlds/lights.world
    code/gazebo/trunk/worlds/map.world
    code/gazebo/trunk/worlds/openal.world
    code/gazebo/trunk/worlds/pioneer2at.world
    code/gazebo/trunk/worlds/pioneer2dx.world
    code/gazebo/trunk/worlds/pioneer2dx_camera.world
    code/gazebo/trunk/worlds/pioneer2dx_gripper.world
    code/gazebo/trunk/worlds/simplecar.world
    code/gazebo/trunk/worlds/simpleshapes.world
    code/gazebo/trunk/worlds/test.world
    code/gazebo/trunk/worlds/trimesh.world
    code/gazebo/trunk/worlds/wizbot.world

Modified: code/gazebo/trunk/server/rendering/OgreCreator.cc
===================================================================
--- code/gazebo/trunk/server/rendering/OgreCreator.cc   2009-05-20 21:06:16 UTC 
(rev 7704)
+++ code/gazebo/trunk/server/rendering/OgreCreator.cc   2009-05-20 23:51:46 UTC 
(rev 7705)
@@ -176,16 +176,24 @@
   light->setDirection(vec.x, vec.y, vec.z);
 
   // Absolute range of light in world coordinates
-  range = node->GetTupleDouble("attenuation",0,1000);
+  range = node->GetDouble("range",0,100);
 
   // Constant factor. 1.0 means never attenuate, 0.0 is complete attenuation
-  constant = node->GetTupleDouble("attenuation",1,1.0);
+  constant = node->GetTupleDouble("attenuation",0,1.0);
+  if (constant < 0)
+    constant = 0;
+  else if (constant > 1.0)
+    constant = 1.0;
 
   // Linear factor. 1 means attenuate evenly over the distance
-  linear = node->GetTupleDouble("attenuation",2,0);
+  linear = node->GetTupleDouble("attenuation",1,0);
+  if (linear < 0)
+    linear = 0;
+  else if (linear > 1.0)
+    linear = 1.0;
 
   // Quadartic factor.adds a curvature to the attenuation formula
-  quad = node->GetTupleDouble("attenuation",3,0);
+  quad = node->GetTupleDouble("attenuation",2,0);
 
   // Set attenuation
   light->setAttenuation(range, constant, linear, quad);
@@ -194,7 +202,7 @@
   //  options for spotlights
   if (lightType == "spot")
   {
-    vec = node->GetVector3("range", Vector3(5.0, 10.0, 1.0));
+    vec = node->GetVector3("spotCone", Vector3(5.0, 10.0, 1.0));
     light->setSpotlightRange(Ogre::Radian(Ogre::Degree(vec.x)), 
         Ogre::Radian(Ogre::Degree(vec.y)), vec.z);
   }

Modified: code/gazebo/trunk/worlds/audio.world
===================================================================
--- code/gazebo/trunk/worlds/audio.world        2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/audio.world        2009-05-20 23:51:46 UTC (rev 
7705)
@@ -145,7 +145,10 @@
       <type>point</type>
       <diffuseColor>0.8 0.8 0.8</diffuseColor>
       <specularColor>0.1 0.1 0.1</specularColor>
-      <attenuation>20 0.5 0.1 0</attenuation>
+      <range>20</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.5 0.1 0</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/bandit.world
===================================================================
--- code/gazebo/trunk/worlds/bandit.world       2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/bandit.world       2009-05-20 23:51:46 UTC (rev 
7705)
@@ -166,7 +166,10 @@
       <type>point</type>
       <diffuseColor>0.8 0.8 0.8</diffuseColor>
       <specularColor>0.1 0.1 0.1</specularColor>
-      <attenuation>10 0.8 0.1 0.0</attenuation>
+      <range>10</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.8 0.1 0.0</attenuation>
     </light>
   </model:renderable>
  

Modified: code/gazebo/trunk/worlds/bumper.world
===================================================================
--- code/gazebo/trunk/worlds/bumper.world       2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/bumper.world       2009-05-20 23:51:46 UTC (rev 
7705)
@@ -135,15 +135,17 @@
     </include>
   </model:physical>
 
-  <!-- White Directional light -->
+  <!-- White Point light -->
   <model:renderable name="directional_white">
     <enableGravity>false</enableGravity>
     <light>
-      <type>directional</type>
-      <direction>0 -0.6 -0.4</direction>
+      <type>point</type>
       <diffuseColor>1.0 1.0 1.0</diffuseColor>
       <specularColor>0.2 0.2 0.2</specularColor>
-      <attenuation>1000 1.0 0.0 0</attenuation>
+      <range>20</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>1.0 0.0 0</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/factory.world
===================================================================
--- code/gazebo/trunk/worlds/factory.world      2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/factory.world      2009-05-20 23:51:46 UTC (rev 
7705)
@@ -87,15 +87,18 @@
     </controller:factory>
   </model:empty>
 
-  <!-- White Directional light -->
+  <!-- White Point light -->
   <model:renderable name="directional_white">
     <enableGravity>false</enableGravity>
     <light>
-      <type>directional</type>
+      <type>point</type>
       <direction>0 -0.5 -0.5</direction>
       <diffuseColor>0.4 0.4 0.4</diffuseColor>
       <specularColor>0.0 0.0 0.0</specularColor>
-      <attenuation>100 0.0 1.0 0.4</attenuation>
+      <range>100</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.0 1.0 0.4</attenuation>
     </light>
   </model:renderable>
   

Modified: code/gazebo/trunk/worlds/federation.world
===================================================================
--- code/gazebo/trunk/worlds/federation.world   2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/federation.world   2009-05-20 23:51:46 UTC (rev 
7705)
@@ -135,7 +135,10 @@
       <type>point</type>
       <diffuseColor>0.8 0.8 0.8</diffuseColor>
       <specularColor>0.1 0.1 0.1</specularColor>
-      <attenuation>20 0.5 0.1 0</attenuation>
+      <range>20</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.5 0.1 0</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/laser.world
===================================================================
--- code/gazebo/trunk/worlds/laser.world        2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/laser.world        2009-05-20 23:51:46 UTC (rev 
7705)
@@ -95,15 +95,17 @@
     </body:plane>
   </model:physical>
 
-  <!-- White Directional light -->
+  <!-- White Point light -->
   <model:renderable name="directional_white">
     <enableGravity>false</enableGravity>
     <light>
-      <type>directional</type>
-      <direction>0 -0.5 -0.5</direction>
+      <type>point</type>
       <diffuseColor>0.4 0.4 0.4</diffuseColor>
       <specularColor>0.0 0.0 0.0</specularColor>
-      <attenuation>100 0.0 1.0 0.4</attenuation>
+      <range>100</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.0 1.0 0.4</attenuation>
     </light>
   </model:renderable>
   

Modified: code/gazebo/trunk/worlds/lights.world
===================================================================
--- code/gazebo/trunk/worlds/lights.world       2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/lights.world       2009-05-20 23:51:46 UTC (rev 
7705)
@@ -63,7 +63,9 @@
       <direction>0 -1 0</direction>
       <diffuseColor>0.1 0.0 0.0</diffuseColor>
       <specularColor>0.2 0.0 0.0</specularColor>
-      <attenuation>5 0.2 0.2 0.00</attenuation>
+      <range>5</range>
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.2 0.2 0.00</attenuation>
     </light>
   </model:renderable>
 
@@ -78,7 +80,9 @@
       <direction>0 -1 0</direction>
       <diffuseColor>0.0 0.1 0.0</diffuseColor>
       <specularColor>0.0 0.2 0.0</specularColor>
-      <attenuation>10 0.2 0.1 0.00</attenuation>
+      <range>10</range>
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.2 0.1 0.00</attenuation>
     </light>
   </model:renderable>
 
@@ -108,7 +112,9 @@
         <diffuseColor>0.0 0.0 0.1</diffuseColor>
         <specularColor>0.0 0.0 0.2</specularColor>
         <attenuation>100 0.2 0.1 0.00</attenuation>
-        <range>8.0, 10.0, 2.0</range> 
+
+        <!-- InnerAngle OutterAngle Falloff -->
+        <spotCone>8.0 10.0 2.0</spotCone> 
       </light>
     </model:renderable>
 
@@ -124,7 +130,10 @@
       <type>point</type>
       <diffuseColor>0.1 0.1 0.0</diffuseColor>
       <specularColor>0.3 0.3 0.3</specularColor>
-      <attenuation>10 0.4 0.1 0.0</attenuation>
+      <range>10</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.4 0.1 0.0</attenuation>
     </light>
   </model:renderable>
 
@@ -136,7 +145,10 @@
       <direction>0 -1 0</direction>
       <diffuseColor>0.4 0.4 0.4</diffuseColor>
       <specularColor>0.0 0.0 0.0</specularColor>
-      <attenuation>100 0.0 1.0 0.4</attenuation>
+      <range>100</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.0 1.0 0.4</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/map.world
===================================================================
--- code/gazebo/trunk/worlds/map.world  2009-05-20 21:06:16 UTC (rev 7704)
+++ code/gazebo/trunk/worlds/map.world  2009-05-20 23:51:46 UTC (rev 7705)
@@ -83,7 +83,10 @@
       <direction>0 -0.6 -0.4</direction>
       <diffuseColor>1.0 1.0 1.0</diffuseColor>
       <specularColor>0.2 0.2 0.2</specularColor>
-      <attenuation>100 1.0 0.0 0</attenuation>
+      <range>100</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>1.0 0.0 0</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/openal.world
===================================================================
--- code/gazebo/trunk/worlds/openal.world       2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/openal.world       2009-05-20 23:51:46 UTC (rev 
7705)
@@ -136,7 +136,10 @@
       <type>point</type>
       <diffuseColor>0.8 0.8 0.8</diffuseColor>
       <specularColor>0.1 0.1 0.1</specularColor>
-      <attenuation>10 0.8 0.1 0.0</attenuation>
+      <range>10</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.8 0.1 0.0</attenuation>
     </light>
   </model:renderable>
  

Modified: code/gazebo/trunk/worlds/pioneer2at.world
===================================================================
--- code/gazebo/trunk/worlds/pioneer2at.world   2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/pioneer2at.world   2009-05-20 23:51:46 UTC (rev 
7705)
@@ -117,7 +117,10 @@
       <direction>0 -0.8 -0.3</direction>
       <diffuseColor>0.9 0.9 0.9</diffuseColor>
       <specularColor>0.0 0.0 0.0</specularColor>
-      <attenuation>100 0.0 1.0 0.4</attenuation>
+      <range>100</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.0 1.0 0.4</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/pioneer2dx.world
===================================================================
--- code/gazebo/trunk/worlds/pioneer2dx.world   2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/pioneer2dx.world   2009-05-20 23:51:46 UTC (rev 
7705)
@@ -153,7 +153,10 @@
       <type>point</type>
       <diffuseColor>0.8 0.8 0.8</diffuseColor>
       <specularColor>0.1 0.1 0.1</specularColor>
-      <attenuation>20 0.5 0.1 0</attenuation>
+      <range>20</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.5 0.1 0</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/pioneer2dx_camera.world
===================================================================
--- code/gazebo/trunk/worlds/pioneer2dx_camera.world    2009-05-20 21:06:16 UTC 
(rev 7704)
+++ code/gazebo/trunk/worlds/pioneer2dx_camera.world    2009-05-20 23:51:46 UTC 
(rev 7705)
@@ -124,11 +124,14 @@
 
     <light>
       <type>spot</type>
-      <range>1000 1000 100</range>
+      <spotCone>1000 1000 100</spotCone>
       <direction>-0.1 0 -0.9</direction>
       <diffuseColor>0.8 0.8 0.8</diffuseColor>
       <specularColor>0.1 0.1 0.1</specularColor>
-      <attenuation>10 1.0 0.0 0</attenuation>
+      <range>10</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>1.0 0.0 0</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/pioneer2dx_gripper.world
===================================================================
--- code/gazebo/trunk/worlds/pioneer2dx_gripper.world   2009-05-20 21:06:16 UTC 
(rev 7704)
+++ code/gazebo/trunk/worlds/pioneer2dx_gripper.world   2009-05-20 23:51:46 UTC 
(rev 7705)
@@ -110,7 +110,10 @@
       <direction>0 -0.6 -0.4</direction>
       <diffuseColor>1.0 1.0 1.0</diffuseColor>
       <specularColor>0.2 0.2 0.2</specularColor>
-      <attenuation>1000 1.0 0.0 0</attenuation>
+      <range>100</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>1.0 0.0 0</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/simplecar.world
===================================================================
--- code/gazebo/trunk/worlds/simplecar.world    2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/simplecar.world    2009-05-20 23:51:46 UTC (rev 
7705)
@@ -120,7 +120,10 @@
       <direction>0 -0.8 -0.3</direction>
       <diffuseColor>0.9 0.9 0.9</diffuseColor>
       <specularColor>0.0 0.0 0.0</specularColor>
-      <attenuation>100 0.0 1.0 0.4</attenuation>
+      <range>100</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.0 1.0 0.4</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/simpleshapes.world
===================================================================
--- code/gazebo/trunk/worlds/simpleshapes.world 2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/simpleshapes.world 2009-05-20 23:51:46 UTC (rev 
7705)
@@ -122,7 +122,10 @@
       <type>point</type>
       <diffuseColor>0.9 0.9 0.9</diffuseColor>
       <specularColor>0.1 0.1 0.1</specularColor>
-      <attenuation>10 0.8 0.1 0.0</attenuation>
+      <range>10</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.8 0.1 0.0</attenuation>
     </light>
   </model:renderable>
  

Modified: code/gazebo/trunk/worlds/test.world
===================================================================
--- code/gazebo/trunk/worlds/test.world 2009-05-20 21:06:16 UTC (rev 7704)
+++ code/gazebo/trunk/worlds/test.world 2009-05-20 23:51:46 UTC (rev 7705)
@@ -148,7 +148,10 @@
       <direction>0 -0.6 -0.4</direction>
       <diffuseColor>1.0 1.0 1.0</diffuseColor>
       <specularColor>0.2 0.2 0.2</specularColor>
-      <attenuation>1000 1.0 0.0 0</attenuation>
+      <range>100</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>1.0 0.0 0</attenuation>
     </light>
   </model:renderable>
 

Modified: code/gazebo/trunk/worlds/trimesh.world
===================================================================
--- code/gazebo/trunk/worlds/trimesh.world      2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/trimesh.world      2009-05-20 23:51:46 UTC (rev 
7705)
@@ -80,7 +80,10 @@
       <direction>0 -0.5 -0.5</direction>
       <diffuseColor>0.4 0.4 0.4</diffuseColor>
       <specularColor>0.0 0.0 0.0</specularColor>
-      <attenuation>100 0.0 1.0 0.4</attenuation>
+      <range>100</range>
+      
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>0.0 1.0 0.4</attenuation>
     </light>
   </model:renderable>
  

Modified: code/gazebo/trunk/worlds/wizbot.world
===================================================================
--- code/gazebo/trunk/worlds/wizbot.world       2009-05-20 21:06:16 UTC (rev 
7704)
+++ code/gazebo/trunk/worlds/wizbot.world       2009-05-20 23:51:46 UTC (rev 
7705)
@@ -169,7 +169,10 @@
       <direction>0 -0.6 -0.4</direction>
       <diffuseColor>1.0 1.0 1.0</diffuseColor>
       <specularColor>0.2 0.2 0.2</specularColor>
-      <attenuation>1000 1.0 0.0 0</attenuation>
+      <range>100</range>
+
+      <!-- Constant(0-1) Linear(0-1) Quadratic -->
+      <attenuation>1.0 0.0 0</attenuation>
     </light>
   </model:renderable>
   


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to