From: <na...@us...> - 2009-03-16 16:23:04
|
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. |