Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CommandCapture Class Reference

#include <command.h>

Inheritance diagram for CommandCapture:

Inheritance graph
Collaboration diagram for CommandCapture:

Collaboration graph
List of all members.

Public Member Functions

 CommandCapture (const std::string &, const std::string &)
void process (ExecutionEnvironment &)

Private Attributes

std::string filename
std::string type

Constructor & Destructor Documentation

CommandCapture::CommandCapture const std::string ,
const std::string
 

Definition at line 685 of file command.cpp.

00686                                 : type(_type), filename(_filename)
00687 {
00688 }


Member Function Documentation

void CommandCapture::process ExecutionEnvironment  )  [virtual]
 

Implements InstantaneousCommand.

Definition at line 690 of file command.cpp.

References CaptureGLBufferToJPEG(), CaptureGLBufferToPNG(), compareIgnoringCase(), filename, and type.

00691 {
00692     bool success = false;
00693 #ifndef MACOSX
00694 
00695     // Get the dimensions of the current viewport
00696     int viewport[4];
00697     glGetIntegerv(GL_VIEWPORT, viewport);
00698     
00699     if (compareIgnoringCase(type, "jpeg") == 0)
00700     {
00701         success = CaptureGLBufferToJPEG(filename,
00702                                         viewport[0], viewport[1],
00703                                         viewport[2], viewport[3]);
00704     }
00705     if (compareIgnoringCase(type, "png") == 0)
00706     {
00707         success = CaptureGLBufferToPNG(filename,
00708                                        viewport[0], viewport[1],
00709                                        viewport[2], viewport[3]);
00710     }
00711 #endif
00712 }


Member Data Documentation

std::string CommandCapture::filename [private]
 

Definition at line 513 of file command.h.

Referenced by process().

std::string CommandCapture::type [private]
 

Definition at line 512 of file command.h.

Referenced by process().


The documentation for this class was generated from the following files:
Generated on Sat Jan 14 22:33:11 2006 for Celestia by  doxygen 1.4.1