30 <<
"Usage: " << argv[0]
31 <<
" <FILE.3Dscene> <WIDTH> <HEIGHT> <OUTPUT_IMAGE>\n" 32 " Output image can be in many formats: .png, .jpg, .tif, etc.\n";
36 const string sFil = argv[1];
37 const int width = atoi(argv[2]);
38 const int height = atoi(argv[3]);
39 const string sOut = argv[4];
53 CCamera& camera = render.getCamera(scene);
61 render.getFrame2(scene, frame);
62 frame.saveToFile(sOut);
70 int main(
int argc,
char* argv[])
76 catch (std::exception& e)
78 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
83 printf(
"Untyped exception!!");
void setOrthogonal(bool v=true)
Enable/Disable orthogonal mode (vs.
void setZoomDistance(float z)
CArchiveStreamBase< STREAM > archiveFrom(STREAM &s)
Helper function to create a templatized wrapper CArchive object for a: MRPT's CStream, std::istream, std::ostream, std::stringstream
void setAzimuthDegrees(float ang)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void setElevationDegrees(float ang)
#define ASSERT_ABOVE_(__A, __B)
The namespace for 3D scene representation and rendering.
This class allows the user to create, load, save, and render 3D scenes using OpenGL primitives...
int TestOffscreenRender(int argc, char *argv[])
A camera: if added to a scene, the viewpoint defined by this camera will be used instead of the camer...
GLenum GLsizei GLsizei height
A class for storing images as grayscale or RGB bitmaps.
A class for rendering 3D scenes off-screen directly into an image using OpenGL extensions (glext)...