#include <OSGFileGrabForeground.h>
Inheritance diagram for osg::FileGrabForeground:

Public Types | |
| typedef FileGrabForegroundPtr | Ptr |
| enum | { NameFieldId = Inherited::NextFieldId, FrameFieldId = NameFieldId + 1, IncrementFieldId = FrameFieldId + 1, NextFieldId = IncrementFieldId + 1 } |
Public Member Functions | |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFString * | getSFName (void) |
| Get the FileGrabForeground::_sfName field. | |
| SFUInt32 * | getSFFrame (void) |
| Get the FileGrabForeground::_sfFrame field. | |
| SFBool * | getSFIncrement (void) |
| Get the FileGrabForeground::_sfIncrement field. | |
| std::string & | getName (void) |
| Get the value of the FileGrabForeground::_sfName field. | |
| const std::string & | getName (void) const |
| Get the value of the FileGrabForeground::_sfName field. | |
| UInt32 & | getFrame (void) |
| Get the value of the FileGrabForeground::_sfFrame field. | |
| const UInt32 & | getFrame (void) const |
| Get the value of the FileGrabForeground::_sfFrame field. | |
| bool & | getIncrement (void) |
| Get the value of the FileGrabForeground::_sfIncrement field. | |
| const bool & | getIncrement (void) const |
| Get the value of the FileGrabForeground::_sfIncrement field. | |
Field Set | |
| *void | setName (const std::string &value) |
| Set the value of the FileGrabForeground::_sfName field. | |
| void | setFrame (const UInt32 &value) |
| Set the value of the FileGrabForeground::_sfFrame field. | |
| void | setIncrement (const bool &value) |
| Set the value of the FileGrabForeground::_sfIncrement field. | |
Binary Access | |
| *virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
Copy | |
| *virtual FieldContainerPtr | shallowCopy (void) const |
Field Get | |
| *SFImagePtr * | getSFImage (void) |
| Get the GrabForeground::_sfImage field. | |
| SFBool * | getSFAutoResize (void) |
| Get the GrabForeground::_sfAutoResize field. | |
| ImagePtr & | getImage (void) |
| Get the value of the GrabForeground::_sfImage field. | |
| const ImagePtr & | getImage (void) const |
| Get the value of the GrabForeground::_sfImage field. | |
| bool & | getAutoResize (void) |
| Get the value of the GrabForeground::_sfAutoResize field. | |
| const bool & | getAutoResize (void) const |
| Get the value of the GrabForeground::_sfAutoResize field. | |
Field Set | |
| *void | setImage (const ImagePtr &value) |
| Set the value of the GrabForeground::_sfImage field. | |
| void | setAutoResize (const bool &value) |
| Set the value of the GrabForeground::_sfAutoResize field. | |
Field Get | |
| *SFImagePtr * | getSFImage (void) |
| Get the GrabForeground::_sfImage field. | |
| SFBool * | getSFAutoResize (void) |
| Get the GrabForeground::_sfAutoResize field. | |
| ImagePtr & | getImage (void) |
| Get the value of the GrabForeground::_sfImage field. | |
| const ImagePtr & | getImage (void) const |
| Get the value of the GrabForeground::_sfImage field. | |
| bool & | getAutoResize (void) |
| Get the value of the GrabForeground::_sfAutoResize field. | |
| const bool & | getAutoResize (void) const |
| Get the value of the GrabForeground::_sfAutoResize field. | |
Field Set | |
| *void | setImage (const ImagePtr &value) |
| Set the value of the GrabForeground::_sfImage field. | |
| void | setAutoResize (const bool &value) |
| Set the value of the GrabForeground::_sfAutoResize field. | |
Static Public Member Functions | |
Class Get | |
| *static FieldContainerType & | getClassType (void) |
| access the type of the class | |
| static UInt32 | getClassTypeId (void) |
| access the numerical type of the class | |
Construction | |
| *static FileGrabForegroundPtr | create (void) |
| create a new instance of the class | |
| static FileGrabForegroundPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Static Public Attributes | |
| static const osg::BitVector | NameFieldMask |
| static const osg::BitVector | FrameFieldMask |
| static const osg::BitVector | IncrementFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const osg::BitVector | ImageFieldMask |
| static const osg::BitVector | AutoResizeFieldMask |
| static const osg::BitVector | ActiveFieldMask |
| static const BitVector | AttachmentsFieldMask |
| static const BitVector | NextFieldMask |
Protected Member Functions | |
Constructors | |
| * | FileGrabForeground (void) |
| FileGrabForeground (const FileGrabForeground &source) | |
Destructors | |
| *virtual | ~FileGrabForeground (void) |
draw | |
| *virtual void | draw (DrawActionBase *action, Viewport *port) |
Sync | |
| *void | executeSyncImpl (FileGrabForegroundBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (GrabForegroundBase *pOther, const BitVector &whichField) |
Protected Attributes | |
Fields | |
| *SFString | _sfName |
| SFUInt32 | _sfFrame |
| SFBool | _sfIncrement |
Fields | |
| *SFImagePtr | _sfImage |
| SFBool | _sfAutoResize |
Fields | |
| *SFImagePtr | _sfImage |
| SFBool | _sfAutoResize |
Private Types | |
| typedef FileGrabForegroundBase | Inherited |
Private Member Functions | |
| void | operator= (const FileGrabForeground &source) |
Static Private Member Functions | |
| static void | initMethod (void) |
Friends | |
| class | FieldContainer |
| class | FileGrabForegroundBase |
The name of the file(s) grabbed to are defined by the _sfName Field, the current frame number by _sfFrame. _sfIncrement can be used to automatically increment the frame number after each image is written. The whole grabber can be activated/deactivated using _sfActive.
Definition at line 55 of file OSGFileGrabForeground.h.
|
|
Reimplemented from osg::FileGrabForegroundBase. Definition at line 59 of file OSGFileGrabForeground.h. |
|
|
Reimplemented from osg::GrabForegroundBase. Definition at line 92 of file OSGFileGrabForegroundBase.h. |
|
|
Reimplemented from osg::GrabForegroundBase. Definition at line 94 of file OSGFileGrabForegroundBase.h. 00095 { 00096 NameFieldId = Inherited::NextFieldId, 00097 FrameFieldId = NameFieldId + 1, 00098 IncrementFieldId = FrameFieldId + 1, 00099 NextFieldId = IncrementFieldId + 1 00100 };
|
|
|
Definition at line 69 of file OSGFileGrabForeground.cpp. 00069 : 00070 Inherited() 00071 { 00072 }
|
|
|
Definition at line 74 of file OSGFileGrabForeground.cpp. 00074 : 00075 Inherited(source) 00076 { 00077 }
|
|
|
Definition at line 79 of file OSGFileGrabForeground.cpp.
|
|
||||||||||||
|
Reimplemented from osg::GrabForeground. Definition at line 89 of file OSGFileGrabForeground.cpp. References osg::GrabForeground::changed(). 00090 { 00091 Inherited::changed(whichField, origin); 00092 }
|
|
||||||||||||
|
Reimplemented from osg::GrabForeground. Definition at line 94 of file OSGFileGrabForeground.cpp. References SLOG. 00096 { 00097 SLOG << "Dump FileGrabForeground NI" << std::endl; 00098 }
|
|
||||||||||||
|
Grab the image and write it to the file. The name needs to be set. Reimplemented from osg::GrabForeground. Definition at line 104 of file OSGFileGrabForeground.cpp. References osg::beginEditCP(), osg::ImageBase::create(), osg::GrabForeground::draw(), osg::endEditCP(), osg::FileGrabForegroundBase::FrameFieldMask, FWARNING, osg::ForegroundBase::getActive(), osg::FileGrabForegroundBase::getFrame(), osg::GrabForegroundBase::getImage(), osg::FileGrabForegroundBase::getIncrement(), osg::FileGrabForegroundBase::getName(), osg::GrabForegroundBase::ImageFieldMask, osg::NullFC, osg::Image::OSG_RGB_PF, osg::FileGrabForegroundBase::setFrame(), and osg::GrabForegroundBase::setImage(). 00105 { 00106 if(getActive() == false) 00107 return; 00108 00109 if(getName().empty()) 00110 { 00111 FWARNING(("FileGrabForeground::draw: no name ?!?\n")); 00112 return; 00113 } 00114 00115 // do we have an image yet? If not, create one. 00116 if(getImage() == NullFC) 00117 { 00118 beginEditCP(this->getPtr(), FileGrabForeground::ImageFieldMask); 00119 { 00120 ImagePtr iPtr=Image::create(); 00121 iPtr->set(Image::OSG_RGB_PF, 1); 00122 setImage(iPtr); 00123 } 00124 endEditCP (this->getPtr(), FileGrabForeground::ImageFieldMask); 00125 } 00126 00127 Inherited::draw(action,port); 00128 00129 Char8 *name = new Char8 [ getName().size() + 32 ]; // this is really 00130 // arbitrary... :( 00131 00132 sprintf(name, getName().c_str(), getFrame()); 00133 00134 ImagePtr i = getImage(); 00135 00136 i->write(name); 00137 00138 delete [] name; 00139 00140 if(getIncrement() != false) 00141 { 00142 beginEditCP(this->getPtr(), FileGrabForeground::FrameFieldMask); 00143 { 00144 setFrame(getFrame() + 1); 00145 } 00146 endEditCP (this->getPtr(), FileGrabForeground::FrameFieldMask); 00147 } 00148 }
|
|
|
Reimplemented from osg::GrabForeground. Definition at line 85 of file OSGFileGrabForeground.cpp.
|
|
|
|
|
|
Reimplemented from osg::GrabForegroundBase. Definition at line 58 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_type. Referenced by osg::FileGrabForegroundBase::create(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::GrabForegroundBase. Definition at line 65 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::GrabForegroundBase. Definition at line 128 of file OSGFileGrabForegroundBase.cpp. References osg::FileGrabForegroundBase::_type. 00129 { 00130 return _type; 00131 }
|
|
|
Reimplemented from osg::GrabForegroundBase. Definition at line 133 of file OSGFileGrabForegroundBase.cpp. References osg::FileGrabForegroundBase::_type. 00134 { 00135 return _type; 00136 }
|
|
|
Reimplemented from osg::GrabForegroundBase. Definition at line 148 of file OSGFileGrabForegroundBase.cpp. 00149 { 00150 return sizeof(FileGrabForeground); 00151 }
|
|
|
Definition at line 101 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfName. 00102 { 00103 return &_sfName; 00104 }
|
|
|
Definition at line 108 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfFrame. 00109 { 00110 return &_sfFrame; 00111 }
|
|
|
Definition at line 115 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfIncrement. 00116 { 00117 return &_sfIncrement; 00118 }
|
|
|
Definition at line 123 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfName, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by draw(). 00124 { 00125 return _sfName.getValue(); 00126 }
|
|
|
Definition at line 130 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfName, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00131 { 00132 return _sfName.getValue(); 00133 }
|
|
|
Definition at line 144 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfFrame, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by draw(). 00145 { 00146 return _sfFrame.getValue(); 00147 }
|
|
|
Definition at line 151 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfFrame, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00152 { 00153 return _sfFrame.getValue(); 00154 }
|
|
|
Definition at line 165 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfIncrement, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by draw(). 00166 { 00167 return _sfIncrement.getValue(); 00168 }
|
|
|
Definition at line 172 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfIncrement, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00173 { 00174 return _sfIncrement.getValue(); 00175 }
|
|
|
Definition at line 137 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfName, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Definition at line 158 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfFrame, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). Referenced by draw().
|
|
|
Definition at line 179 of file OSGFileGrabForegroundBase.inl. References osg::FileGrabForegroundBase::_sfIncrement, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00180 { 00181 _sfIncrement.setValue(value); 00182 }
|
|
|
||||||||||||
|
Reimplemented from osg::GrabForegroundBase. Definition at line 237 of file OSGFileGrabForegroundBase.cpp. References osg::FileGrabForegroundBase::_sfFrame, osg::FileGrabForegroundBase::_sfIncrement, osg::FileGrabForegroundBase::_sfName, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::GrabForegroundBase::copyToBin(), osg::FileGrabForegroundBase::FrameFieldMask, osg::FileGrabForegroundBase::IncrementFieldMask, osg::FileGrabForegroundBase::NameFieldMask, and osg::FieldBits::NoField. 00239 { 00240 Inherited::copyToBin(pMem, whichField); 00241 00242 if(FieldBits::NoField != (NameFieldMask & whichField)) 00243 { 00244 _sfName.copyToBin(pMem); 00245 } 00246 00247 if(FieldBits::NoField != (FrameFieldMask & whichField)) 00248 { 00249 _sfFrame.copyToBin(pMem); 00250 } 00251 00252 if(FieldBits::NoField != (IncrementFieldMask & whichField)) 00253 { 00254 _sfIncrement.copyToBin(pMem); 00255 } 00256 00257 00258 }
|
|
||||||||||||
|
Reimplemented from osg::GrabForegroundBase. Definition at line 260 of file OSGFileGrabForegroundBase.cpp. References osg::FileGrabForegroundBase::_sfFrame, osg::FileGrabForegroundBase::_sfIncrement, osg::FileGrabForegroundBase::_sfName, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::GrabForegroundBase::copyFromBin(), osg::FileGrabForegroundBase::FrameFieldMask, osg::FileGrabForegroundBase::IncrementFieldMask, osg::FileGrabForegroundBase::NameFieldMask, and osg::FieldBits::NoField. 00262 { 00263 Inherited::copyFromBin(pMem, whichField); 00264 00265 if(FieldBits::NoField != (NameFieldMask & whichField)) 00266 { 00267 _sfName.copyFromBin(pMem); 00268 } 00269 00270 if(FieldBits::NoField != (FrameFieldMask & whichField)) 00271 { 00272 _sfFrame.copyFromBin(pMem); 00273 } 00274 00275 if(FieldBits::NoField != (IncrementFieldMask & whichField)) 00276 { 00277 _sfIncrement.copyFromBin(pMem); 00278 } 00279 00280 00281 }
|
|
|
Reimplemented from osg::GrabForegroundBase. Definition at line 72 of file OSGFileGrabForegroundBase.inl. References osg::AttachmentContainerPtr::dcast(), osg::FileGrabForegroundBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::FileGrabForegroundBase::shallowCopy(). 00073 { 00074 FileGrabForegroundPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = FileGrabForegroundPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented from osg::GrabForegroundBase. Definition at line 87 of file OSGFileGrabForegroundBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 FileGrabForegroundPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Reimplemented from osg::GrabForegroundBase. Definition at line 139 of file OSGFileGrabForegroundBase.cpp. References osg::FieldContainer::newPtr(). Referenced by osg::FileGrabForegroundBase::create(). 00140 { 00141 FileGrabForegroundPtr returnValue; 00142 00143 newPtr(returnValue, dynamic_cast<const FileGrabForeground *>(this)); 00144 00145 return returnValue; 00146 }
|
|
||||||||||||
|
Definition at line 284 of file OSGFileGrabForegroundBase.cpp. References osg::FileGrabForegroundBase::_sfFrame, osg::FileGrabForegroundBase::_sfIncrement, osg::FileGrabForegroundBase::_sfName, osg::GrabForegroundBase::executeSyncImpl(), osg::FileGrabForegroundBase::FrameFieldMask, osg::FileGrabForegroundBase::IncrementFieldMask, osg::FileGrabForegroundBase::NameFieldMask, osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::FileGrabForegroundBase::executeSync(). 00286 { 00287 00288 Inherited::executeSyncImpl(pOther, whichField); 00289 00290 if(FieldBits::NoField != (NameFieldMask & whichField)) 00291 _sfName.syncWith(pOther->_sfName); 00292 00293 if(FieldBits::NoField != (FrameFieldMask & whichField)) 00294 _sfFrame.syncWith(pOther->_sfFrame); 00295 00296 if(FieldBits::NoField != (IncrementFieldMask & whichField)) 00297 _sfIncrement.syncWith(pOther->_sfIncrement); 00298 00299 00300 }
|
|
||||||||||||
|
Definition at line 256 of file OSGGrabForegroundBase.cpp. References osg::GrabForegroundBase::_sfAutoResize, osg::GrabForegroundBase::_sfImage, osg::GrabForegroundBase::AutoResizeFieldMask, osg::ForegroundBase::executeSyncImpl(), osg::GrabForegroundBase::ImageFieldMask, osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::GrabForegroundBase::executeSync(), and osg::FileGrabForegroundBase::executeSyncImpl(). 00258 { 00259 00260 Inherited::executeSyncImpl(pOther, whichField); 00261 00262 if(FieldBits::NoField != (ImageFieldMask & whichField)) 00263 _sfImage.syncWith(pOther->_sfImage); 00264 00265 if(FieldBits::NoField != (AutoResizeFieldMask & whichField)) 00266 _sfAutoResize.syncWith(pOther->_sfAutoResize); 00267 00268 00269 }
|
|
||||||||||||
|
Definition at line 219 of file OSGForegroundBase.cpp. References osg::ForegroundBase::_sfActive, osg::ForegroundBase::ActiveFieldMask, osg::AttachmentContainer::executeSyncImpl(), osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::ForegroundBase::executeSync(), osg::TextureGrabForegroundBase::executeSyncImpl(), osg::StatisticsForegroundBase::executeSyncImpl(), osg::PolygonForegroundBase::executeSyncImpl(), osg::ImageForegroundBase::executeSyncImpl(), and osg::GrabForegroundBase::executeSyncImpl(). 00221 { 00222 00223 Inherited::executeSyncImpl(pOther, whichField); 00224 00225 if(FieldBits::NoField != (ActiveFieldMask & whichField)) 00226 _sfActive.syncWith(pOther->_sfActive); 00227 00228 00229 }
|
|