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

osg::ColorBufferViewportBase Class Reference

ColorBufferViewport Base Class.

#include <OSGColorBufferViewportBase.h>

Inheritance diagram for osg::ColorBufferViewportBase:

osg::Viewport osg::ViewportBase osg::AttachmentContainer osg::FieldContainer osg::ColorBufferViewport List of all members.

Public Types

typedef ColorBufferViewportPtr Ptr
enum  {
  RedFieldId = Inherited::NextFieldId, BlueFieldId = RedFieldId + 1, GreenFieldId = BlueFieldId + 1, AlphaFieldId = GreenFieldId + 1,
  NextFieldId = AlphaFieldId + 1
}

Public Member Functions

FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFBoolgetSFRed (void)
 Get the ColorBufferViewport::_sfRed field.
SFBoolgetSFBlue (void)
 Get the ColorBufferViewport::_sfBlue field.
SFBoolgetSFGreen (void)
 Get the ColorBufferViewport::_sfGreen field.
SFBoolgetSFAlpha (void)
 Get the ColorBufferViewport::_sfAlpha field.
bool & getRed (void)
 Get the value of the ColorBufferViewport::_sfRed field.
const bool & getRed (void) const
 Get the value of the ColorBufferViewport::_sfRed field.
bool & getBlue (void)
 Get the value of the ColorBufferViewport::_sfBlue field.
const bool & getBlue (void) const
 Get the value of the ColorBufferViewport::_sfBlue field.
bool & getGreen (void)
 Get the value of the ColorBufferViewport::_sfGreen field.
const bool & getGreen (void) const
 Get the value of the ColorBufferViewport::_sfGreen field.
bool & getAlpha (void)
 Get the value of the ColorBufferViewport::_sfAlpha field.
const bool & getAlpha (void) const
 Get the value of the ColorBufferViewport::_sfAlpha field.
Field Set
*void setRed (const bool &value)
 Set the value of the ColorBufferViewport::_sfRed field.
void setBlue (const bool &value)
 Set the value of the ColorBufferViewport::_sfBlue field.
void setGreen (const bool &value)
 Set the value of the ColorBufferViewport::_sfGreen field.
void setAlpha (const bool &value)
 Set the value of the ColorBufferViewport::_sfAlpha 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
access
*void setSize (Real32 left, Real32 bottom, Real32 right, Real32 top)
Int32 getPixelLeft (void) const
Int32 getPixelRight (void) const
Int32 getPixelBottom (void) const
Int32 getPixelTop (void) const
Int32 getPixelWidth (void) const
Int32 getPixelHeight (void) const
bool isFullWindow (void) const
your_category
*virtual void draw (DrawAction *action)
virtual void render (RenderActionBase *action)
change
*virtual void changed (BitVector whichField, UInt32 origin)
dump
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
Field Get
*SFReal32getSFLeft (void)
 Get the Viewport::_sfLeft field.
SFReal32getSFRight (void)
 Get the Viewport::_sfRight field.
SFReal32getSFBottom (void)
 Get the Viewport::_sfBottom field.
SFReal32getSFTop (void)
 Get the Viewport::_sfTop field.
SFWindowPtrgetSFParent (void)
 Get the Viewport::_sfParent field.
SFCameraPtrgetSFCamera (void)
 Get the Viewport::_sfCamera field.
SFNodePtrgetSFRoot (void)
 Get the Viewport::_sfRoot field.
SFBackgroundPtrgetSFBackground (void)
 Get the Viewport::_sfBackground field.
MFForegroundPtrgetMFForegrounds (void)
 Get the Viewport::_mfForegrounds field.
SFUInt32getSFTravMask (void)
 Get the Viewport::_sfTravMask field.
SFReal32getSFDrawTime (void)
 Get the Viewport::_sfDrawTime field.
Real32getLeft (void)
 Get the value of the Viewport::_sfLeft field.
const Real32getLeft (void) const
 Get the value of the Viewport::_sfLeft field.
Real32getRight (void)
 Get the value of the Viewport::_sfRight field.
const Real32getRight (void) const
 Get the value of the Viewport::_sfRight field.
Real32getBottom (void)
 Get the value of the Viewport::_sfBottom field.
const Real32getBottom (void) const
 Get the value of the Viewport::_sfBottom field.
Real32getTop (void)
 Get the value of the Viewport::_sfTop field.
const Real32getTop (void) const
 Get the value of the Viewport::_sfTop field.
WindowPtrgetParent (void)
 Get the value of the Viewport::_sfParent field.
const WindowPtrgetParent (void) const
 Get the value of the Viewport::_sfParent field.
CameraPtrgetCamera (void)
 Get the value of the Viewport::_sfCamera field.
const CameraPtrgetCamera (void) const
 Get the value of the Viewport::_sfCamera field.
NodePtrgetRoot (void)
 Get the value of the Viewport::_sfRoot field.
const NodePtrgetRoot (void) const
 Get the value of the Viewport::_sfRoot field.
BackgroundPtrgetBackground (void)
 Get the value of the Viewport::_sfBackground field.
const BackgroundPtrgetBackground (void) const
 Get the value of the Viewport::_sfBackground field.
UInt32getTravMask (void)
 Get the value of the Viewport::_sfTravMask field.
const UInt32getTravMask (void) const
 Get the value of the Viewport::_sfTravMask field.
Real32getDrawTime (void)
 Get the value of the Viewport::_sfDrawTime field.
const Real32getDrawTime (void) const
 Get the value of the Viewport::_sfDrawTime field.
ForegroundPtrgetForegrounds (const UInt32 index)
 Get the value of the index element the Viewport::_mfForegrounds field.
MFForegroundPtrgetForegrounds (void)
 Get the Viewport::_mfForegrounds field.
const MFForegroundPtrgetForegrounds (void) const
 Get the Viewport::_mfForegrounds field.
Field Set
*void setLeft (const Real32 &value)
 Set the value of the Viewport::_sfLeft field.
void setRight (const Real32 &value)
 Set the value of the Viewport::_sfRight field.
void setBottom (const Real32 &value)
 Set the value of the Viewport::_sfBottom field.
void setTop (const Real32 &value)
 Set the value of the Viewport::_sfTop field.
void setParent (const WindowPtr &value)
 Set the value of the Viewport::_sfParent field.
void setCamera (const CameraPtr &value)
 Set the value of the Viewport::_sfCamera field.
void setRoot (const NodePtr &value)
 Set the value of the Viewport::_sfRoot field.
void setBackground (const BackgroundPtr &value)
 Set the value of the Viewport::_sfBackground field.
void setTravMask (const UInt32 &value)
 Set the value of the Viewport::_sfTravMask field.
void setDrawTime (const Real32 &value)
 Set the value of the Viewport::_sfDrawTime 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 ColorBufferViewportPtr create (void)
 create a new instance of the class
static ColorBufferViewportPtr 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 RedFieldMask
static const osg::BitVector BlueFieldMask
static const osg::BitVector GreenFieldMask
static const osg::BitVector AlphaFieldMask
static const osg::BitVector MTInfluenceMask
static const osg::BitVector LeftFieldMask
static const osg::BitVector RightFieldMask
static const osg::BitVector BottomFieldMask
static const osg::BitVector TopFieldMask
static const osg::BitVector ParentFieldMask
static const osg::BitVector CameraFieldMask
static const osg::BitVector RootFieldMask
static const osg::BitVector BackgroundFieldMask
static const osg::BitVector ForegroundsFieldMask
static const osg::BitVector TravMaskFieldMask
static const osg::BitVector DrawTimeFieldMask
static const BitVector AttachmentsFieldMask
static const BitVector NextFieldMask

Protected Member Functions

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

Protected Attributes

Fields
*SFBool _sfRed
SFBool _sfBlue
SFBool _sfGreen
SFBool _sfAlpha
Fields
*SFReal32 _sfLeft
SFReal32 _sfRight
SFReal32 _sfBottom
SFReal32 _sfTop
SFWindowPtr _sfParent
SFCameraPtr _sfCamera
SFNodePtr _sfRoot
SFBackgroundPtr _sfBackground
MFForegroundPtr _mfForegrounds
SFUInt32 _sfTravMask
SFReal32 _sfDrawTime

Private Types

typedef Viewport Inherited

Private Member Functions

void operator= (const ColorBufferViewportBase &source)

Static Private Attributes

static FieldDescription_desc []
 ColorBufferViewport description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 84 of file OSGColorBufferViewportBase.h.


Member Typedef Documentation

typedef Viewport osg::ColorBufferViewportBase::Inherited [private]
 

Reimplemented from osg::Viewport.

Reimplemented in osg::ColorBufferViewport.

Definition at line 88 of file OSGColorBufferViewportBase.h.

typedef ColorBufferViewportPtr osg::ColorBufferViewportBase::Ptr
 

Reimplemented from osg::ViewportBase.

Definition at line 93 of file OSGColorBufferViewportBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
RedFieldId 
BlueFieldId 
GreenFieldId 
AlphaFieldId 
NextFieldId 

Reimplemented from osg::ViewportBase.

Definition at line 95 of file OSGColorBufferViewportBase.h.

00096     {
00097         RedFieldId   = Inherited::NextFieldId,
00098         BlueFieldId  = RedFieldId   + 1,
00099         GreenFieldId = BlueFieldId  + 1,
00100         AlphaFieldId = GreenFieldId + 1,
00101         NextFieldId  = AlphaFieldId + 1
00102     };


Constructor & Destructor Documentation

ColorBufferViewportBase::ColorBufferViewportBase void   )  [protected]
 

Definition at line 201 of file OSGColorBufferViewportBase.cpp.

00201                                                      :
00202     _sfRed                    (bool(GL_TRUE)), 
00203     _sfBlue                   (bool(GL_TRUE)), 
00204     _sfGreen                  (bool(GL_TRUE)), 
00205     _sfAlpha                  (bool(GL_TRUE)), 
00206     Inherited() 
00207 {
00208 }

ColorBufferViewportBase::ColorBufferViewportBase const ColorBufferViewportBase source  )  [protected]
 

Definition at line 214 of file OSGColorBufferViewportBase.cpp.

00214                                                                                       :
00215     _sfRed                    (source._sfRed                    ), 
00216     _sfBlue                   (source._sfBlue                   ), 
00217     _sfGreen                  (source._sfGreen                  ), 
00218     _sfAlpha                  (source._sfAlpha                  ), 
00219     Inherited                 (source)
00220 {
00221 }

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

Definition at line 225 of file OSGColorBufferViewportBase.cpp.

00226 {
00227 }


Member Function Documentation

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

Reimplemented from osg::ViewportBase.

Definition at line 58 of file OSGColorBufferViewportBase.inl.

References _type.

Referenced by create().

00059 {
00060     return _type; 
00061 } 

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

Reimplemented from osg::ViewportBase.

Definition at line 65 of file OSGColorBufferViewportBase.inl.

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

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

FieldContainerType & ColorBufferViewportBase::getType void   )  [virtual]
 

Reimplemented from osg::ViewportBase.

Definition at line 143 of file OSGColorBufferViewportBase.cpp.

References _type.

00144 {
00145     return _type; 
00146 } 

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

Reimplemented from osg::ViewportBase.

Definition at line 148 of file OSGColorBufferViewportBase.cpp.

References _type.

00149 {
00150     return _type;
00151 } 

UInt32 ColorBufferViewportBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::ViewportBase.

Definition at line 163 of file OSGColorBufferViewportBase.cpp.

00164 { 
00165     return sizeof(ColorBufferViewport); 
00166 }

SFBool * osg::ColorBufferViewportBase::getSFRed void   )  [inline]
 

Definition at line 101 of file OSGColorBufferViewportBase.inl.

References _sfRed.

00102 {
00103     return &_sfRed;
00104 }

SFBool * osg::ColorBufferViewportBase::getSFBlue void   )  [inline]
 

Definition at line 108 of file OSGColorBufferViewportBase.inl.

References _sfBlue.

00109 {
00110     return &_sfBlue;
00111 }

SFBool * osg::ColorBufferViewportBase::getSFGreen void   )  [inline]
 

Definition at line 115 of file OSGColorBufferViewportBase.inl.

References _sfGreen.

00116 {
00117     return &_sfGreen;
00118 }

SFBool * osg::ColorBufferViewportBase::getSFAlpha void   )  [inline]
 

Definition at line 122 of file OSGColorBufferViewportBase.inl.

References _sfAlpha.

00123 {
00124     return &_sfAlpha;
00125 }

bool & osg::ColorBufferViewportBase::getRed void   )  [inline]
 

Definition at line 130 of file OSGColorBufferViewportBase.inl.

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

Referenced by osg::ColorBufferViewport::draw(), and osg::ColorBufferViewport::render().

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

const bool & osg::ColorBufferViewportBase::getRed void   )  const [inline]
 

Definition at line 137 of file OSGColorBufferViewportBase.inl.

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

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

bool & osg::ColorBufferViewportBase::getBlue void   )  [inline]
 

Definition at line 151 of file OSGColorBufferViewportBase.inl.

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

Referenced by osg::ColorBufferViewport::draw(), and osg::ColorBufferViewport::render().

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

const bool & osg::ColorBufferViewportBase::getBlue void   )  const [inline]
 

Definition at line 158 of file OSGColorBufferViewportBase.inl.

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

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

bool & osg::ColorBufferViewportBase::getGreen void   )  [inline]
 

Definition at line 172 of file OSGColorBufferViewportBase.inl.

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

Referenced by osg::ColorBufferViewport::draw(), and osg::ColorBufferViewport::render().

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

const bool & osg::ColorBufferViewportBase::getGreen void   )  const [inline]
 

Definition at line 179 of file OSGColorBufferViewportBase.inl.

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

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

bool & osg::ColorBufferViewportBase::getAlpha void   )  [inline]
 

Definition at line 193 of file OSGColorBufferViewportBase.inl.

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

Referenced by osg::ColorBufferViewport::draw(), and osg::ColorBufferViewport::render().

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

const bool & osg::ColorBufferViewportBase::getAlpha void   )  const [inline]
 

Definition at line 200 of file OSGColorBufferViewportBase.inl.

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

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

void osg::ColorBufferViewportBase::setRed const bool &  value  )  [inline]
 

Definition at line 144 of file OSGColorBufferViewportBase.inl.

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

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

void osg::ColorBufferViewportBase::setBlue const bool &  value  )  [inline]
 

Definition at line 165 of file OSGColorBufferViewportBase.inl.

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

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

void osg::ColorBufferViewportBase::setGreen const bool &  value  )  [inline]
 

Definition at line 186 of file OSGColorBufferViewportBase.inl.

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

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

void osg::ColorBufferViewportBase::setAlpha const bool &  value  )  [inline]
 

Definition at line 207 of file OSGColorBufferViewportBase.inl.

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

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

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

Reimplemented from osg::ViewportBase.

Definition at line 231 of file OSGColorBufferViewportBase.cpp.

References _sfAlpha, _sfBlue, _sfGreen, _sfRed, AlphaFieldMask, BlueFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::ViewportBase::getBinSize(), GreenFieldMask, osg::FieldBits::NoField, and RedFieldMask.

00232 {
00233     UInt32 returnValue = Inherited::getBinSize(whichField);
00234 
00235     if(FieldBits::NoField != (RedFieldMask & whichField))
00236     {
00237         returnValue += _sfRed.getBinSize();
00238     }
00239 
00240     if(FieldBits::NoField != (BlueFieldMask & whichField))
00241     {
00242         returnValue += _sfBlue.getBinSize();
00243     }
00244 
00245     if(FieldBits::NoField != (GreenFieldMask & whichField))
00246     {
00247         returnValue += _sfGreen.getBinSize();
00248     }
00249 
00250     if(FieldBits::NoField != (AlphaFieldMask & whichField))
00251     {
00252         returnValue += _sfAlpha.getBinSize();
00253     }
00254 
00255 
00256     return returnValue;
00257 }

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

Reimplemented from osg::ViewportBase.

Definition at line 259 of file OSGColorBufferViewportBase.cpp.

References _sfAlpha, _sfBlue, _sfGreen, _sfRed, AlphaFieldMask, BlueFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::ViewportBase::copyToBin(), GreenFieldMask, osg::FieldBits::NoField, and RedFieldMask.

00261 {
00262     Inherited::copyToBin(pMem, whichField);
00263 
00264     if(FieldBits::NoField != (RedFieldMask & whichField))
00265     {
00266         _sfRed.copyToBin(pMem);
00267     }
00268 
00269     if(FieldBits::NoField != (BlueFieldMask & whichField))
00270     {
00271         _sfBlue.copyToBin(pMem);
00272     }
00273 
00274     if(FieldBits::NoField != (GreenFieldMask & whichField))
00275     {
00276         _sfGreen.copyToBin(pMem);
00277     }
00278 
00279     if(FieldBits::NoField != (AlphaFieldMask & whichField))
00280     {
00281         _sfAlpha.copyToBin(pMem);
00282     }
00283 
00284 
00285 }

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

Reimplemented from osg::ViewportBase.

Definition at line 287 of file OSGColorBufferViewportBase.cpp.

References _sfAlpha, _sfBlue, _sfGreen, _sfRed, AlphaFieldMask, BlueFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::ViewportBase::copyFromBin(), GreenFieldMask, osg::FieldBits::NoField, and RedFieldMask.

00289 {
00290     Inherited::copyFromBin(pMem, whichField);
00291 
00292     if(FieldBits::NoField != (RedFieldMask & whichField))
00293     {
00294         _sfRed.copyFromBin(pMem);
00295     }
00296 
00297     if(FieldBits::NoField != (BlueFieldMask & whichField))
00298     {
00299         _sfBlue.copyFromBin(pMem);
00300     }
00301 
00302     if(FieldBits::NoField != (GreenFieldMask & whichField))
00303     {
00304         _sfGreen.copyFromBin(pMem);
00305     }
00306 
00307     if(FieldBits::NoField != (AlphaFieldMask & whichField))
00308     {
00309         _sfAlpha.copyFromBin(pMem);
00310     }
00311 
00312 
00313 }

ColorBufferViewportPtr osg::ColorBufferViewportBase::create