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

osg::ViewportBase Class Reference

Viewport Base Class.

#include <OSGViewportBase.h>

Inheritance diagram for osg::ViewportBase:

osg::AttachmentContainer osg::FieldContainer osg::Viewport osg::ColorBufferViewportBase osg::PassiveViewportBase osg::StereoBufferViewportBase osg::ColorBufferViewport osg::PassiveViewport osg::StereoBufferViewport List of all members.

Public Types

typedef ViewportPtr Ptr
enum  {
  LeftFieldId = Inherited::NextFieldId, RightFieldId = LeftFieldId + 1, BottomFieldId = RightFieldId + 1, TopFieldId = BottomFieldId + 1,
  ParentFieldId = TopFieldId + 1, CameraFieldId = ParentFieldId + 1, RootFieldId = CameraFieldId + 1, BackgroundFieldId = RootFieldId + 1,
  ForegroundsFieldId = BackgroundFieldId + 1, TravMaskFieldId = ForegroundsFieldId + 1, DrawTimeFieldId = TravMaskFieldId + 1, NextFieldId = DrawTimeFieldId + 1
}

Public Member Functions

FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) 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.
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
Handle Attachments
*void addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
void subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
AttachmentPtr findAttachment (UInt32 groupId, UInt16 binding=0)
AttachmentPtr findAttachment (const FieldContainerType &type, UInt16 binding=0)
Field Access *SFAttachmentMapgetSFAttachments (void)
Changed
*virtual void changed (BitVector whichField, UInt32 origin)
Dump
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const

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 ViewportPtr create (void)
 create a new instance of the class
static ViewportPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype

Static Public Attributes

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 osg::BitVector MTInfluenceMask
static const BitVector AttachmentsFieldMask
static const BitVector NextFieldMask

Protected Member Functions

Constructors
ViewportBase (void)
 ViewportBase (const ViewportBase &source)
Destructors
*virtual ~ViewportBase (void)
Sync
*void executeSyncImpl (ViewportBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)
Sync
void executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField)
Pointer
*AttachmentContainerPtr getPtr (void)
MT Destruction
*virtual void onDestroy (void)

Protected Attributes

Fields
*SFReal32 _sfLeft
SFReal32 _sfRight
SFReal32 _sfBottom
SFReal32 _sfTop
SFWindowPtr _sfParent
SFCameraPtr _sfCamera
SFNodePtr _sfRoot
SFBackgroundPtr _sfBackground
MFForegroundPtr _mfForegrounds
SFUInt32 _sfTravMask
SFReal32 _sfDrawTime
Fields
*SFAttachmentMap _attachmentMap

Private Types

typedef AttachmentContainer Inherited

Private Member Functions

void operator= (const ViewportBase &source)

Static Private Attributes

static FieldDescription_desc []
 Viewport description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 91 of file OSGViewportBase.h.


Member Typedef Documentation

typedef AttachmentContainer osg::ViewportBase::Inherited [private]
 

Reimplemented from osg::AttachmentContainer.

Reimplemented in osg::ColorBufferViewport, osg::ColorBufferViewportBase, osg::PassiveViewport, osg::PassiveViewportBase, osg::StereoBufferViewport, osg::StereoBufferViewportBase, and osg::Viewport.

Definition at line 95 of file OSGViewportBase.h.

typedef ViewportPtr osg::ViewportBase::Ptr
 

Reimplemented in osg::ColorBufferViewportBase, osg::PassiveViewportBase, and osg::StereoBufferViewportBase.

Definition at line 100 of file OSGViewportBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
LeftFieldId 
RightFieldId 
BottomFieldId 
TopFieldId 
ParentFieldId 
CameraFieldId 
RootFieldId 
BackgroundFieldId 
ForegroundsFieldId 
TravMaskFieldId 
DrawTimeFieldId 
NextFieldId 

Reimplemented from osg::AttachmentContainer.

Definition at line 102 of file OSGViewportBase.h.

00103     {
00104         LeftFieldId        = Inherited::NextFieldId,
00105         RightFieldId       = LeftFieldId        + 1,
00106         BottomFieldId      = RightFieldId       + 1,
00107         TopFieldId         = BottomFieldId      + 1,
00108         ParentFieldId      = TopFieldId         + 1,
00109         CameraFieldId      = ParentFieldId      + 1,
00110         RootFieldId        = CameraFieldId      + 1,
00111         BackgroundFieldId  = RootFieldId        + 1,
00112         ForegroundsFieldId = BackgroundFieldId  + 1,
00113         TravMaskFieldId    = ForegroundsFieldId + 1,
00114         DrawTimeFieldId    = TravMaskFieldId    + 1,
00115         NextFieldId        = DrawTimeFieldId    + 1
00116     };


Constructor & Destructor Documentation

ViewportBase::ViewportBase void   )  [protected]
 

Definition at line 275 of file OSGViewportBase.cpp.

00275                                :
00276     _sfLeft                   (), 
00277     _sfRight                  (), 
00278     _sfBottom                 (), 
00279     _sfTop                    (), 
00280     _sfParent                 (), 
00281     _sfCamera                 (), 
00282     _sfRoot                   (), 
00283     _sfBackground             (), 
00284     _mfForegrounds            (), 
00285     _sfTravMask               (UInt32(TypeTraits<UInt32>::getMax())), 
00286     _sfDrawTime               (Real32(0.0f)), 
00287     Inherited() 
00288 {
00289 }

ViewportBase::ViewportBase const ViewportBase source  )  [protected]
 

Definition at line 295 of file OSGViewportBase.cpp.

00295                                                      :
00296     _sfLeft                   (source._sfLeft                   ), 
00297     _sfRight                  (source._sfRight                  ), 
00298     _sfBottom                 (source._sfBottom                 ), 
00299     _sfTop                    (source._sfTop                    ), 
00300     _sfParent                 (source._sfParent                 ), 
00301     _sfCamera                 (source._sfCamera                 ), 
00302     _sfRoot                   (source._sfRoot                   ), 
00303     _sfBackground             (source._sfBackground             ), 
00304     _mfForegrounds            (source._mfForegrounds            ), 
00305     _sfTravMask               (source._sfTravMask               ), 
00306     _sfDrawTime               (source._sfDrawTime               ), 
00307     Inherited                 (source)
00308 {
00309 }

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

Definition at line 313 of file OSGViewportBase.cpp.

00314 {
00315 }


Member Function Documentation

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

Reimplemented from osg::AttachmentContainer.

Reimplemented in osg::ColorBufferViewportBase, osg::PassiveViewportBase, and osg::StereoBufferViewportBase.

Definition at line 58 of file OSGViewportBase.inl.

References _type.

Referenced by create().

00059 {
00060     return _type; 
00061 } 

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

Reimplemented from osg::AttachmentContainer.

Reimplemented in osg::ColorBufferViewportBase, osg::PassiveViewportBase, and osg::StereoBufferViewportBase.

Definition at line 65 of file OSGViewportBase.inl.

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

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

FieldContainerType & ViewportBase::getType void   )  [virtual]
 

Reimplemented from osg::AttachmentContainer.

Reimplemented in osg::ColorBufferViewportBase, osg::PassiveViewportBase, and osg::StereoBufferViewportBase.

Definition at line 216 of file OSGViewportBase.cpp.

References _type.

00217 {
00218     return _type; 
00219 } 

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

Reimplemented from osg::AttachmentContainer.

Reimplemented in osg::ColorBufferViewportBase, osg::PassiveViewportBase, and osg::StereoBufferViewportBase.

Definition at line 221 of file OSGViewportBase.cpp.

References _type.

00222 {
00223     return _type;
00224 } 

UInt32 ViewportBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::AttachmentContainer.

Reimplemented in osg::ColorBufferViewportBase, osg::PassiveViewportBase, and osg::StereoBufferViewportBase.

Definition at line 236 of file OSGViewportBase.cpp.

00237 { 
00238     return sizeof(Viewport); 
00239 }

SFReal32 * osg::ViewportBase::getSFLeft void   )  [inline]
 

Definition at line 101 of file OSGViewportBase.inl.

References _sfLeft.

00102 {
00103     return &_sfLeft;
00104 }

SFReal32 * osg::ViewportBase::getSFRight void   )  [inline]
 

Definition at line 108 of file OSGViewportBase.inl.

References _sfRight.

00109 {
00110     return &_sfRight;
00111 }

SFReal32 * osg::ViewportBase::getSFBottom void   )  [inline]
 

Definition at line 115 of file OSGViewportBase.inl.

References _sfBottom.

00116 {
00117     return &_sfBottom;
00118 }

SFReal32 * osg::ViewportBase::getSFTop void   )  [inline]
 

Definition at line 122 of file OSGViewportBase.inl.

References _sfTop.

00123 {
00124     return &_sfTop;
00125 }

SFWindowPtr * osg::ViewportBase::getSFParent void   )  [inline]
 

Definition at line 129 of file OSGViewportBase.inl.

References _sfParent.

00130 {
00131     return &_sfParent;
00132 }

SFCameraPtr * osg::ViewportBase::getSFCamera void   )  [inline]
 

Definition at line 136 of file OSGViewportBase.inl.

References _sfCamera.

00137 {
00138     return &_sfCamera;
00139 }

SFNodePtr * osg::ViewportBase::getSFRoot void   )  [inline]
 

Definition at line 143 of file OSGViewportBase.inl.

References _sfRoot.

00144 {
00145     return &_sfRoot;
00146 }

SFBackgroundPtr * osg::ViewportBase::getSFBackground void   )  [inline]
 

Definition at line 150 of file OSGViewportBase.inl.

References _sfBackground.

00151 {
00152     return &_sfBackground;
00153 }

MFForegroundPtr * osg::ViewportBase::getMFForegrounds void   )  [inline]
 

Definition at line 157 of file OSGViewportBase.inl.

References _mfForegrounds.

00158 {
00159     return &_mfForegrounds;
00160 }

SFUInt32 * osg::ViewportBase::getSFTravMask void   )  [inline]
 

Definition at line 164 of file OSGViewportBase.inl.

References _sfTravMask.

00165 {
00166     return &_sfTravMask;
00167 }

SFReal32 * osg::ViewportBase::getSFDrawTime void   )  [inline]
 

Definition at line 171 of file OSGViewportBase.inl.

References _sfDrawTime.

00172 {
00173     return &_sfDrawTime;
00174 }

Real32 & osg::ViewportBase::getLeft void   )  [inline]
 

Definition at line 179 of file OSGViewportBase.inl.

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

Referenced by osg::Viewport::getPixelLeft().

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

const Real32 & osg::ViewportBase::getLeft void   )  const [inline]
 

Definition at line 186 of file OSGViewportBase.inl.

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

00187 {
00188     return _sfLeft.getValue();
00189 }

Real32 & osg::ViewportBase::getRight void   )  [inline]
 

Definition at line 200 of file OSGViewportBase.inl.

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

Referenced by osg::Viewport::getPixelRight().

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

const Real32 & osg::ViewportBase::getRight void   )  const [inline]
 

Definition at line 207 of file OSGViewportBase.inl.

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

00208 {
00209     return _sfRight.getValue();
00210 }

Real32 & osg::ViewportBase::getBottom void   )  [inline]
 

Definition at line 221 of file OSGViewportBase.inl.

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

Referenced by osg::Viewport::getPixelBottom().

00222 {
00223     return _sfBottom.getValue();
00224 }

const Real32 & osg::ViewportBase::getBottom void   )  const [inline]
 

Definition at line 228 of file OSGViewportBase.inl.

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

00229 {
00230     return _sfBottom.getValue();
00231 }

Real32 & osg::ViewportBase::getTop void   )  [inline]
 

Definition at line 242 of file OSGViewportBase.inl.

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

Referenced by osg::Viewport::getPixelTop().

00243 {
00244     return _sfTop.getValue();
00245 }

const Real32 & osg::ViewportBase::getTop void   )  const [inline]
 

Definition at line 249 of file OSGViewportBase.inl.

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

00250 {
00251     return _sfTop.getValue();
00252 }

WindowPtr & osg::ViewportBase::getParent void   )  [inline]
 

Definition at line 263 of file OSGViewportBase.inl.

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

Referenced by osg::Camera::calcViewRay(), osg::Viewport::getPixelBottom(), osg::Viewport::getPixelLeft(), osg::Viewport::getPixelRight(), osg::Viewport::getPixelTop(), and osg::Viewport::isFullWindow().

00264 {
00265     return _sfParent.getValue();
00266 }

const WindowPtr & osg::ViewportBase::getParent void   )  const [inline]
 

Definition at line 270 of file OSGViewportBase.inl.

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

00271 {
00272     return _sfParent.getValue();
00273 }

CameraPtr & osg::ViewportBase::getCamera void   )  [inline]
 

Definition at line 284 of file OSGViewportBase.inl.

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

Referenced by osg::Viewport::draw(), osg::PassiveViewport::draw(), osg::Viewport::render(), and osg::PassiveViewport::render().

00285 {
00286     return _sfCamera.getValue();
00287 }

const CameraPtr & osg::ViewportBase::getCamera void   )  const [inline]
 

Definition at line 291 of file OSGViewportBase.inl.

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

00292 {
00293     return _sfCamera.getValue();
00294 }

NodePtr & osg::ViewportBase::getRoot void   )  [inline]
 

Definition at line 305 of file OSGViewportBase.inl.

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

Referenced by osg::Viewport::draw(), osg::PassiveViewport::draw(), osg::Viewport::render(), and osg::PassiveViewport::render().

00306 {
00307     return _sfRoot.getValue();
00308 }

const NodePtr & osg::ViewportBase::getRoot void   )  const [inline]
 

Definition at line 312 of file OSGViewportBase.inl.

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

00313 {
00314     return _sfRoot.getValue();
00315 }

BackgroundPtr & osg::ViewportBase::getBackground void   )  [inline]
 

Definition at line 326 of file OSGViewportBase.inl.

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

Referenced by osg::Viewport::draw(), osg::PassiveViewport::draw(), osg::Viewport::render(), and osg::PassiveViewport::render().

00327 {
00328     return _sfBackground.getValue();
00329 }

const BackgroundPtr & osg::ViewportBase::getBackground void   )  const [inline]
 

Definition at line 333 of file OSGViewportBase.inl.

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

00334 {
00335     return _sfBackground.getValue();
00336 }

UInt32 & osg::ViewportBase::getTravMask void   )  [inline]
 

Definition at line 347 of file OSGViewportBase.inl.

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

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

00348 {
00349     return _sfTravMask.getValue();
00350 }

const UInt32 & osg::ViewportBase::getTravMask void   )  const [inline]
 

Definition at line 354 of file OSGViewportBase.inl.

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

00355 {
00356     return _sfTravMask.getValue();
00357 }

Real32 & osg::ViewportBase::getDrawTime void   )  [inline]