Update of /cvsroot/playerstage/code/gazebo/server/sensors/Camera
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23327/server/sensors/Camera
Modified Files:
Tag: ogre
Camera.cc
Log Message:
Updates
Index: Camera.cc
===================================================================
RCS file: /cvsroot/playerstage/code/gazebo/server/sensors/Camera/Camera.cc,v
retrieving revision 1.72.2.4
retrieving revision 1.72.2.5
diff -C2 -d -r1.72.2.4 -r1.72.2.5
*** Camera.cc 7 Aug 2006 20:52:26 -0000 1.72.2.4
--- Camera.cc 10 Aug 2006 03:53:11 -0000 1.72.2.5
***************
*** 104,107 ****
--- 104,108 ----
this->renderTarget->setAutoUpdated(true);
+
// Create the camera
this->camera = this->world->ogreAdaptor->sceneMgr->createCamera("Camera1");
***************
*** 109,113 ****
this->camera->setFarClipDistance(maxDepth);
! this->camera->setPosition(Ogre::Vector3(2,2,10));
this->camera->lookAt(Ogre::Vector3(0,0,0));
--- 110,114 ----
this->camera->setFarClipDistance(maxDepth);
! this->camera->setPosition(Ogre::Vector3(2,20,10));
this->camera->lookAt(Ogre::Vector3(0,0,0));
***************
*** 117,122 ****
this->viewport->setClearEveryFrame(true);
this->viewport->setBackgroundColour( Ogre::ColourValue::Black );
! //this->viewport->setDimensions(0, 0, this->imageWidth, this->imageHeight);
// Initialize display options
this->renderOpt.displayBBox = false;
--- 118,125 ----
this->viewport->setClearEveryFrame(true);
this->viewport->setBackgroundColour( Ogre::ColourValue::Black );
! //this->camera->setAspectRatio(
Ogre::Real(this->viewport->getActualWidth()) /
Ogre::Real(this->viewport->getActualHeight()));
+ //this->viewport->setDimensions(0, 0, this->imageWidth, this->imageHeight);
+
// Initialize display options
this->renderOpt.displayBBox = false;
***************
*** 151,155 ****
this->renderTarget->update();
! this->renderTarget->writeContentsToFile("testFile.jpeg");
//Ogre::TexturePtr mRndrTexPtr =
Ogre::TextureManager::getSingleton().getByName(this->renderTexture.getName());
--- 154,159 ----
this->renderTarget->update();
! // TESTING:
! // this->renderTarget->writeContentsToFile("testFile.jpeg");
//Ogre::TexturePtr mRndrTexPtr =
Ogre::TextureManager::getSingleton().getByName(this->renderTexture.getName());
***************
*** 170,175 ****
uchar* pBuffer = new uchar[size];
// Read pixels
! mBuffer->blitToMemory( Ogre::Box(0, 0, this->imageWidth,
this->imageHeight), Ogre::PixelBox(this->imageWidth, this->imageHeight, 1,
imgData->format, pBuffer));
// Wrap buffer in a chunk
--- 174,182 ----
uchar* pBuffer = new uchar[size];
+ // DELETE ME:
+ //mBuffer->blitToMemory( Ogre::Box(0, 0, this->imageWidth,
this->imageHeight), Ogre::PixelBox(this->imageWidth, this->imageHeight, 1,
imgData->format, pBuffer));
+
// Read pixels
! mBuffer->blitToMemory( Ogre::Box((int)(this->imageWidth/2.0),
(int)(this->imageHeight/2.0), this->imageWidth, this->imageHeight),
Ogre::PixelBox(this->imageWidth, this->imageHeight, 1, imgData->format,
pBuffer));
// Wrap buffer in a chunk
***************
*** 181,187 ****
Ogre::String extension;
- //if( pos == Ogre::String::npos)
- // Ogre::OGRE_EXCEPT( Exception::ERR_INVALIDPARAMS, "Unable to determine
image type for '" + filename + "' - invalid extension.",
"GLRenderTexture::writeContentsToFile");
-
while( pos != filename.length() - 1 )
extension += filename[++pos];
--- 188,191 ----
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit