Revision: 7487
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7487&view=rev
Author:   natepak
Date:     2009-03-16 16:22:47 +0000 (Mon, 16 Mar 2009)

Log Message:
-----------
Update to the laser sensor

Modified Paths:
--------------
    code/branches/federation/gazebo/server/sensors/ray/RaySensor.cc

Modified: code/branches/federation/gazebo/server/sensors/ray/RaySensor.cc
===================================================================
--- code/branches/federation/gazebo/server/sensors/ray/RaySensor.cc     
2009-03-15 05:49:00 UTC (rev 7486)
+++ code/branches/federation/gazebo/server/sensors/ray/RaySensor.cc     
2009-03-16 16:22:47 UTC (rev 7487)
@@ -167,22 +167,27 @@
     start = (axis * this->minRangeP->GetValue()) + this->originP->GetValue();
     end = (axis * this->maxRangeP->GetValue()) + this->originP->GetValue();
 
+    ray = new RayGeom(this->body, false);
+
     this->rayFan->AddPoint(end);
     this->rayFanOutline->AddPoint(end);
-    ray = new RayGeom(this->body, displayRaysP->GetValue());
 
     ray->SetPoints(start, end);
 
     this->rays.push_back(ray);
   }
+
   this->rayFan->AddPoint(Vector3(0,0,0));
   this->rayFan->setMaterial("Gazebo/BlueLaser");
 
   this->rayFanOutline->AddPoint(Vector3(0,0,0));
   this->rayFanOutline->setMaterial("Gazebo/BlueEmissive");
 
-  this->visualNode->AttachObject(this->rayFan);
-  this->visualNode->AttachObject(this->rayFanOutline);
+  if (**displayRaysP)
+  {
+    this->visualNode->AttachObject(this->rayFan);
+    this->visualNode->AttachObject(this->rayFanOutline);
+  }
 }
 
 //////////////////////////////////////////////////////////////////////////////


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

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to