Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::TextureGrabBackgroundBase Class Reference

TextureGrabBackground Base Class.

#include <OSGTextureGrabBackgroundBase.h>

Inheritance diagram for osg::TextureGrabBackgroundBase:

osg::SolidBackground osg::SolidBackgroundBase osg::Background osg::BackgroundBase osg::AttachmentContainer osg::FieldContainer osg::TextureGrabBackground List of all members.

Public Types

typedef TextureGrabBackgroundPtr Ptr
enum  {
  TextureFieldId = Inherited::NextFieldId, AutoResizeFieldId = TextureFieldId + 1, BindTargetFieldId = AutoResizeFieldId + 1, CopyTargetFieldId = BindTargetFieldId + 1,
  NextFieldId = CopyTargetFieldId + 1
}

Public Member Functions

FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFTextureChunkPtrgetSFTexture (void)
 Get the TextureGrabBackground::_sfTexture field.
SFBoolgetSFAutoResize (void)
 Get the TextureGrabBackground::_sfAutoResize field.
SFGLenumgetSFBindTarget (void)
 Get the TextureGrabBackground::_sfBindTarget field.
SFGLenumgetSFCopyTarget (void)
 Get the TextureGrabBackground::_sfCopyTarget field.
TextureChunkPtrgetTexture (void)
 Get the value of the TextureGrabBackground::_sfTexture field.
const TextureChunkPtrgetTexture (void) const
 Get the value of the TextureGrabBackground::_sfTexture field.
bool & getAutoResize (void)
 Get the value of the TextureGrabBackground::_sfAutoResize field.
const bool & getAutoResize (void) const
 Get the value of the TextureGrabBackground::_sfAutoResize field.
GLenumgetBindTarget (void)
 Get the value of the TextureGrabBackground::_sfBindTarget field.
const GLenumgetBindTarget (void) const
 Get the value of the TextureGrabBackground::_sfBindTarget field.
GLenumgetCopyTarget (void)
 Get the value of the TextureGrabBackground::_sfCopyTarget field.
const GLenumgetCopyTarget (void) const
 Get the value of the TextureGrabBackground::_sfCopyTarget field.
Field Set
*void setTexture (const TextureChunkPtr &value)
 Set the value of the TextureGrabBackground::_sfTexture field.
void setAutoResize (const bool &value)
 Set the value of the TextureGrabBackground::_sfAutoResize field.
void setBindTarget (const GLenum &value)
 Set the value of the TextureGrabBackground::_sfBindTarget field.
void setCopyTarget (const GLenum &value)
 Set the value of the TextureGrabBackground::_sfCopyTarget 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
your_category
*void clear (DrawActionBase *, Viewport *)
transformation
*virtual void changed (BitVector whichField, UInt32 origin)
dump
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
Field Get
*SFColor3fgetSFColor (void)
 Get the SolidBackground::_sfColor field.
Color3fgetColor (void)
 Get the value of the SolidBackground::_sfColor field.
const Color3fgetColor (void) const
 Get the value of the SolidBackground::_sfColor field.
Field Set
*void setColor (const Color3f &value)
 Set the value of the SolidBackground::_sfColor field.

Static Public Member Functions

Class Get
*static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
Construction
*static TextureGrabBackgroundPtr create (void)
 create a new instance of the class
static TextureGrabBackgroundPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype
Class Get
*static const char * getClassname (void)

Static Public Attributes

static const osg::BitVector TextureFieldMask
static const osg::BitVector AutoResizeFieldMask
static const osg::BitVector BindTargetFieldMask
static const osg::BitVector CopyTargetFieldMask
static const osg::BitVector MTInfluenceMask
static const osg::BitVector ColorFieldMask
static const BitVector AttachmentsFieldMask
static const BitVector NextFieldMask

Protected Member Functions

Constructors
TextureGrabBackgroundBase (void)
 TextureGrabBackgroundBase (const TextureGrabBackgroundBase &source)
Destructors
*virtual ~TextureGrabBackgroundBase (void)
Sync
*void executeSyncImpl (TextureGrabBackgroundBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)
Sync
*void executeSyncImpl (SolidBackgroundBase *pOther, const BitVector &whichField)
Sync
*void executeSyncImpl (BackgroundBase *pOther, const BitVector &whichField)

Protected Attributes

Fields
*SFTextureChunkPtr _sfTexture
SFBool _sfAutoResize
SFGLenum _sfBindTarget
SFGLenum _sfCopyTarget
Fields
*SFColor3f _sfColor

Private Types

typedef SolidBackground Inherited

Private Member Functions

void operator= (const TextureGrabBackgroundBase &source)

Static Private Attributes

static FieldDescription_desc []
 TextureGrabBackground description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 84 of file OSGTextureGrabBackgroundBase.h.


Member Typedef Documentation

typedef SolidBackground osg::TextureGrabBackgroundBase::Inherited [private]
 

Reimplemented from osg::SolidBackground.

Reimplemented in osg::TextureGrabBackground.

Definition at line 88 of file OSGTextureGrabBackgroundBase.h.

typedef TextureGrabBackgroundPtr osg::TextureGrabBackgroundBase::Ptr
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 93 of file OSGTextureGrabBackgroundBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
TextureFieldId 
AutoResizeFieldId 
BindTargetFieldId 
CopyTargetFieldId 
NextFieldId 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 95 of file OSGTextureGrabBackgroundBase.h.

00096     {
00097         TextureFieldId    = Inherited::NextFieldId,
00098         AutoResizeFieldId = TextureFieldId    + 1,
00099         BindTargetFieldId = AutoResizeFieldId + 1,
00100         CopyTargetFieldId = BindTargetFieldId + 1,
00101         NextFieldId       = CopyTargetFieldId + 1
00102     };


Constructor & Destructor Documentation

TextureGrabBackgroundBase::TextureGrabBackgroundBase void   )  [protected]
 

Definition at line 199 of file OSGTextureGrabBackgroundBase.cpp.

00199                                                          :
00200     _sfTexture                (), 
00201     _sfAutoResize             (bool(true)), 
00202     _sfBindTarget             (GLenum(GL_NONE)), 
00203     _sfCopyTarget             (GLenum(GL_NONE)), 
00204     Inherited() 
00205 {
00206 }

TextureGrabBackgroundBase::TextureGrabBackgroundBase const TextureGrabBackgroundBase source  )  [protected]
 

Definition at line 212 of file OSGTextureGrabBackgroundBase.cpp.

00212                                                                                             :
00213     _sfTexture                (source._sfTexture                ), 
00214     _sfAutoResize             (source._sfAutoResize             ), 
00215     _sfBindTarget             (source._sfBindTarget             ), 
00216     _sfCopyTarget             (source._sfCopyTarget             ), 
00217     Inherited                 (source)
00218 {
00219 }

TextureGrabBackgroundBase::~TextureGrabBackgroundBase void   )  [protected, virtual]
 

Definition at line 223 of file OSGTextureGrabBackgroundBase.cpp.

00224 {
00225 }


Member Function Documentation

osg::FieldContainerType & osg::TextureGrabBackgroundBase::getClassType void   )  [inline, static]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 58 of file OSGTextureGrabBackgroundBase.inl.

References _type.

Referenced by create().

00059 {
00060     return _type; 
00061 } 

osg::UInt32 osg::TextureGrabBackgroundBase::getClassTypeId void   )  [inline, static]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 65 of file OSGTextureGrabBackgroundBase.inl.

References _type, and osg::TypeBase::getId().

00066 {
00067     return _type.getId(); 
00068 } 

FieldContainerType & TextureGrabBackgroundBase::getType void   )  [virtual]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 141 of file OSGTextureGrabBackgroundBase.cpp.

References _type.

00142 {
00143     return _type; 
00144 } 

const FieldContainerType & TextureGrabBackgroundBase::getType void   )  const [virtual]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 146 of file OSGTextureGrabBackgroundBase.cpp.

References _type.

00147 {
00148     return _type;
00149 } 

UInt32 TextureGrabBackgroundBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 161 of file OSGTextureGrabBackgroundBase.cpp.

00162 { 
00163     return sizeof(TextureGrabBackground); 
00164 }

SFTextureChunkPtr * osg::TextureGrabBackgroundBase::getSFTexture void   )  [inline]
 

Definition at line 101 of file OSGTextureGrabBackgroundBase.inl.

References _sfTexture.

00102 {
00103     return &_sfTexture;
00104 }

SFBool * osg::TextureGrabBackgroundBase::getSFAutoResize void   )  [inline]
 

Definition at line 108 of file OSGTextureGrabBackgroundBase.inl.

References _sfAutoResize.

00109 {
00110     return &_sfAutoResize;
00111 }

SFGLenum * osg::TextureGrabBackgroundBase::getSFBindTarget void   )  [inline]
 

Definition at line 115 of file OSGTextureGrabBackgroundBase.inl.

References _sfBindTarget.

00116 {
00117     return &_sfBindTarget;
00118 }

SFGLenum * osg::TextureGrabBackgroundBase::getSFCopyTarget void   )  [inline]
 

Definition at line 122 of file OSGTextureGrabBackgroundBase.inl.

References _sfCopyTarget.

00123 {
00124     return &_sfCopyTarget;
00125 }

TextureChunkPtr & osg::TextureGrabBackgroundBase::getTexture void   )  [inline]
 

Definition at line 130 of file OSGTextureGrabBackgroundBase.inl.

References _sfTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::TextureGrabBackground::clear().

00131 {
00132     return _sfTexture.getValue();
00133 }

const TextureChunkPtr & osg::TextureGrabBackgroundBase::getTexture void   )  const [inline]
 

Definition at line 137 of file OSGTextureGrabBackgroundBase.inl.

References _sfTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00138 {
00139     return _sfTexture.getValue();
00140 }

bool & osg::TextureGrabBackgroundBase::getAutoResize void   )  [inline]
 

Definition at line 151 of file OSGTextureGrabBackgroundBase.inl.

References _sfAutoResize, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::TextureGrabBackground::clear().

00152 {
00153     return _sfAutoResize.getValue();
00154 }

const bool & osg::TextureGrabBackgroundBase::getAutoResize void   )  const [inline]
 

Definition at line 158 of file OSGTextureGrabBackgroundBase.inl.

References _sfAutoResize, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00159 {
00160     return _sfAutoResize.getValue();
00161 }

GLenum & osg::TextureGrabBackgroundBase::getBindTarget void   )  [inline]
 

Definition at line 172 of file OSGTextureGrabBackgroundBase.inl.

References _sfBindTarget, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::TextureGrabBackground::clear().

00173 {
00174     return _sfBindTarget.getValue();
00175 }

const GLenum & osg::TextureGrabBackgroundBase::getBindTarget void   )  const [inline]
 

Definition at line 179 of file OSGTextureGrabBackgroundBase.inl.

References _sfBindTarget, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00180 {
00181     return _sfBindTarget.getValue();
00182 }

GLenum & osg::TextureGrabBackgroundBase::getCopyTarget void   )  [inline]
 

Definition at line 193 of file OSGTextureGrabBackgroundBase.inl.

References _sfCopyTarget, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::TextureGrabBackground::clear().

00194 {
00195     return _sfCopyTarget.getValue();
00196 }

const GLenum & osg::TextureGrabBackgroundBase::getCopyTarget void   )  const [inline]
 

Definition at line 200 of file OSGTextureGrabBackgroundBase.inl.

References _sfCopyTarget, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00201 {
00202     return _sfCopyTarget.getValue();
00203 }

void osg::TextureGrabBackgroundBase::setTexture const TextureChunkPtr value  )  [inline]
 

Definition at line 144 of file OSGTextureGrabBackgroundBase.inl.

References _sfTexture, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00145 {
00146     _sfTexture.setValue(value);
00147 }

void osg::TextureGrabBackgroundBase::setAutoResize const bool &  value  )  [inline]
 

Definition at line 165 of file OSGTextureGrabBackgroundBase.inl.

References _sfAutoResize, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00166 {
00167     _sfAutoResize.setValue(value);
00168 }

void osg::TextureGrabBackgroundBase::setBindTarget const GLenum value  )  [inline]
 

Definition at line 186 of file OSGTextureGrabBackgroundBase.inl.

References _sfBindTarget, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00187 {
00188     _sfBindTarget.setValue(value);
00189 }

void osg::TextureGrabBackgroundBase::setCopyTarget const GLenum value  )  [inline]
 

Definition at line 207 of file OSGTextureGrabBackgroundBase.inl.

References _sfCopyTarget, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00208 {
00209     _sfCopyTarget.setValue(value);
00210 }

UInt32 TextureGrabBackgroundBase::getBinSize const BitVector whichField  )  [virtual]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 229 of file OSGTextureGrabBackgroundBase.cpp.

References _sfAutoResize, _sfBindTarget, _sfCopyTarget, _sfTexture, AutoResizeFieldMask, BindTargetFieldMask, CopyTargetFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::SolidBackgroundBase::getBinSize(), osg::FieldBits::NoField, and TextureFieldMask.

00230 {
00231     UInt32 returnValue = Inherited::getBinSize(whichField);
00232 
00233     if(FieldBits::NoField != (TextureFieldMask & whichField))
00234     {
00235         returnValue += _sfTexture.getBinSize();
00236     }
00237 
00238     if(FieldBits::NoField != (AutoResizeFieldMask & whichField))
00239     {
00240         returnValue += _sfAutoResize.getBinSize();
00241     }
00242 
00243     if(FieldBits::NoField != (BindTargetFieldMask & whichField))
00244     {
00245         returnValue += _sfBindTarget.getBinSize();
00246     }
00247 
00248     if(FieldBits::NoField != (CopyTargetFieldMask & whichField))
00249     {
00250         returnValue += _sfCopyTarget.getBinSize();
00251     }
00252 
00253 
00254     return returnValue;
00255 }

void TextureGrabBackgroundBase::copyToBin BinaryDataHandler pMem,
const BitVector whichField
[virtual]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 257 of file OSGTextureGrabBackgroundBase.cpp.

References _sfAutoResize, _sfBindTarget, _sfCopyTarget, _sfTexture, AutoResizeFieldMask, BindTargetFieldMask, CopyTargetFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::SolidBackgroundBase::copyToBin(), osg::FieldBits::NoField, and TextureFieldMask.

00259 {
00260     Inherited::copyToBin(pMem, whichField);
00261 
00262     if(FieldBits::NoField != (TextureFieldMask & whichField))
00263     {
00264         _sfTexture.copyToBin(pMem);
00265     }
00266 
00267     if(FieldBits::NoField != (AutoResizeFieldMask & whichField))
00268     {
00269         _sfAutoResize.copyToBin(pMem);
00270     }
00271 
00272     if(FieldBits::NoField != (BindTargetFieldMask & whichField))
00273     {
00274         _sfBindTarget.copyToBin(pMem);
00275     }
00276 
00277     if(FieldBits::NoField != (CopyTargetFieldMask & whichField))
00278     {
00279         _sfCopyTarget.copyToBin(pMem);
00280     }
00281 
00282 
00283 }

void TextureGrabBackgroundBase::copyFromBin BinaryDataHandler pMem,
const BitVector whichField
[virtual]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 285 of file OSGTextureGrabBackgroundBase.cpp.

References _sfAutoResize, _sfBindTarget, _sfCopyTarget, _sfTexture, AutoResizeFieldMask, BindTargetFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::SolidBackgroundBase::copyFromBin(), CopyTargetFieldMask, osg::FieldBits::NoField, and TextureFieldMask.

00287 {
00288     Inherited::copyFromBin(pMem, whichField);
00289 
00290     if(FieldBits::NoField != (TextureFieldMask & whichField))
00291     {
00292         _sfTexture.copyFromBin(pMem);
00293     }
00294 
00295     if(FieldBits::NoField != (AutoResizeFieldMask & whichField))
00296     {
00297         _sfAutoResize.copyFromBin(pMem);
00298     }
00299 
00300     if(FieldBits::NoField != (BindTargetFieldMask & whichField))
00301     {
00302         _sfBindTarget.copyFromBin(pMem);
00303     }
00304 
00305     if(FieldBits::NoField != (CopyTargetFieldMask & whichField))
00306     {
00307         _sfCopyTarget.copyFromBin(pMem);
00308     }
00309 
00310 
00311 }

TextureGrabBackgroundPtr osg::TextureGrabBackgroundBase::create void   )  [inline, static]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 72 of file OSGTextureGrabBackgroundBase.inl.

References osg::AttachmentContainerPtr::dcast(), getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and shallowCopy().

Referenced by osg::DisplayCalibration::createCMViewports().

00073 {
00074     TextureGrabBackgroundPtr fc; 
00075 
00076     if(getClassType().getPrototype() != OSG::NullFC) 
00077     {
00078         fc = TextureGrabBackgroundPtr::dcast(
00079             getClassType().getPrototype()-> shallowCopy()); 
00080     }
00081     
00082     return fc; 
00083 }

TextureGrabBackgroundPtr osg::TextureGrabBackgroundBase::createEmpty void   )  [inline, static]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 87 of file OSGTextureGrabBackgroundBase.inl.

References osg::FieldContainer::newPtr().

00088 { 
00089     TextureGrabBackgroundPtr returnValue; 
00090     
00091     newPtr(returnValue); 
00092 
00093     return returnValue; 
00094 }

FieldContainerPtr TextureGrabBackgroundBase::shallowCopy void   )  const [virtual]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 152 of file OSGTextureGrabBackgroundBase.cpp.

References osg::FieldContainer::newPtr().

Referenced by create().

00153 { 
00154     TextureGrabBackgroundPtr returnValue; 
00155 
00156     newPtr(returnValue, dynamic_cast<const TextureGrabBackground *>(this)); 
00157 
00158     return returnValue; 
00159 }

void TextureGrabBackgroundBase::executeSyncImpl TextureGrabBackgroundBase pOther,
const BitVector whichField
[protected]
 

Definition at line 314 of file OSGTextureGrabBackgroundBase.cpp.

References _sfAutoResize, _sfBindTarget, _sfCopyTarget, _sfTexture, AutoResizeFieldMask, BindTargetFieldMask, CopyTargetFieldMask, osg::SolidBackgroundBase::executeSyncImpl(), osg::FieldBits::NoField, osg::SField< FieldTypeT, fieldNameSpace >::syncWith(), and TextureFieldMask.

Referenced by executeSync().

00316 {
00317 
00318     Inherited::executeSyncImpl(pOther, whichField);
00319 
00320     if(FieldBits::NoField != (TextureFieldMask & whichField))
00321         _sfTexture.syncWith(pOther->_sfTexture);
00322 
00323     if(FieldBits::NoField != (AutoResizeFieldMask & whichField))
00324         _sfAutoResize.syncWith(pOther->_sfAutoResize);
00325 
00326     if(FieldBits::NoField != (BindTargetFieldMask & whichField))
00327         _sfBindTarget.syncWith(pOther->_sfBindTarget);
00328 
00329     if(FieldBits::NoField != (CopyTargetFieldMask & whichField))
00330         _sfCopyTarget.syncWith(pOther->_sfCopyTarget);
00331 
00332 
00333 }

void TextureGrabBackgroundBase::executeSync FieldContainer other,
const BitVector whichField
[protected, virtual]
 

Reimplemented from osg::SolidBackgroundBase.

Definition at line 168 of file OSGTextureGrabBackgroundBase.cpp.

References executeSyncImpl().

00170 {
00171     this->executeSyncImpl((TextureGrabBackgroundBase *) &other, whichField);
00172 }

void osg::TextureGrabBackgroundBase::operator= const TextureGrabBackgroundBase source  )  [private]
 

* static const char* osg::SolidBackground::getClassname void   )  [inline, static, inherited]
 

Reimplemented from osg::Background.

Definition at line 68 of file OSGSolidBackground.h.

00068 { return "SolidBackground"; };

void SolidBackground::clear DrawActionBase ,
Viewport
[virtual, inherited]
 

Implements osg::Background.

Reimplemented in osg::TextureGrabBackground.

Definition at line 110 of file OSGSolidBackground.cpp.

References osg::SolidBackgroundBase::getColor().

Referenced by osg::TextureGrabBackground::clear().

00111 {
00112     Color3f &col = getColor();
00113     glClearColor(col[0], col[1], col[2], 1.0);
00114     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
00115 }

void SolidBackground::changed BitVector  whichField,
UInt32  origin
[virtual, inherited]
 

Reimplemented from osg::Background.

Reimplemented in osg::TextureGrabBackground.

Definition at line 103 of file OSGSolidBackground.cpp.

References osg::Background::changed().

Referenced by osg::TextureGrabBackground::changed().

00104 {
00105     Inherited::changed(whichField, origin);
00106 }

void SolidBackground::dump UInt32  uiIndent = 0,
const BitVector  bvFlags = 0
const [virtual, inherited]
 

Reimplemented from osg::Background.

Reimplemented in osg::TextureGrabBackground.

Definition at line 119 of file OSGSolidBackground.cpp.

References SLOG.

00121 {
00122     SLOG << "Dump SolidBackground NI" << std::endl;
00123 }

SFColor3f * osg::SolidBackgroundBase::getSFColor void   )  [inline, inherited]
 

Definition at line 101 of file OSGSolidBackgroundBase.inl.

References osg::SolidBackgroundBase::_sfColor.

00102 {
00103     return &