OSG::Background Class Reference

Background clearing base class. See PageSystemWindowBackground for a description. More...

#include <OSGBackground.h>

Inheritance diagram for OSG::Background:

OSG::BackgroundBase OSG::AttachmentContainer OSG::FieldContainer OSG::ReflexiveContainer OSG::DepthClearBackgroundBase OSG::GradientBackgroundBase OSG::PassiveBackgroundBase OSG::PolygonBackgroundBase OSG::SkyBackgroundBase OSG::SolidBackgroundBase OSG::TextureBackgroundBase OSG::DepthClearBackground OSG::GradientBackground OSG::PassiveBackground OSG::PolygonBackground OSG::SkyBackground OSG::SolidBackground OSG::TextureBackground OSG::TextureGrabBackgroundBase OSG::TextureGrabBackground List of all members.

dcast



 OSG_GEN_INTERNALPTR (AttachmentContainer)
typedef AttachmentContainer Self
typedef FieldContainerAttachment AttachmentObj
typedef FieldContainerAttachmentPtr AttachmentObjPtr
typedef SFFieldContainerAttachmentPtrMap SFAttachmentObjPtrMap
typedef SFAttachmentObjPtrMap::StoredType AttachmentObjPtrMap
typedef AttachmentObjPtrMap::iterator AttachmentObjPtrMapIt

Type definitions



 OSG_GEN_INTERNALPTR (FieldContainer)
 OSG_RC_FIRST_FIELD_DECL (ChangedCallbacks)
 OSG_RC_LAST_FIELD_DECL (ChangedCallbacks)
static const bool isNodeCore = false

Public Types

enum  { ClearStencilBitFieldId = Inherited::NextFieldId, DepthFieldId = ClearStencilBitFieldId + 1, NextFieldId = DepthFieldId + 1 }
typedef AttachmentContainer ParentContainer
typedef Inherited::TypeObject TypeObject
typedef TypeObject::InitPhase InitPhase
Type definitions


typedef Field *(ReflexiveContainer::*) FieldEditMethod (void)
typedef const Field *(ReflexiveContainer::*) FieldGetMethod (void) const

Public Member Functions

 OSG_GEN_INTERNALPTR (Background)
access fields


virtual void clear (DrawEnv *pEnv, Viewport *pPort)=0
transformation


virtual void changed (ConstFieldMaskArg whichField, UInt32 origin, BitVector detail)
dump


virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
FieldContainer Get


virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get


SFInt32 * editSFClearStencilBit (void)
const SFInt32 * getSFClearStencilBit (void) const
SFReal32 * editSFDepth (void)
const SFReal32 * getSFDepth (void) const
Int32 & editClearStencilBit (void)
 Get the value of the Background::_sfClearStencilBit field.
const Int32 & getClearStencilBit (void) const
 Get the value of the Background::_sfClearStencilBit field.
Real32 & editDepth (void)
 Get the value of the Background::_sfDepth field.
const Real32 & getDepth (void) const
 Get the value of the Background::_sfDepth field.
Field Set


void setClearStencilBit (const Int32 &value)
 Set the value of the Background::_sfClearStencilBit field.
void setDepth (const Real32 &value)
 Set the value of the Background::_sfDepth field.
Binary Access


virtual UInt32 getBinSize (ConstFieldMaskArg whichField)
virtual void copyToBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField)
virtual void copyFromBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField)
Constructors


 OSG_RC_FIRST_FIELD_DECL (Attachments)
 OSG_RC_LAST_FIELD_DECL (Attachments)
Set


void addAttachment (const AttachmentObjPtr attachmentP, UInt16 binding=0)
void subAttachment (const AttachmentObjPtr attachmentP, UInt16 binding=0)
AttachmentObjPtr findAttachment (UInt32 groupId, UInt16 binding=0)
AttachmentObjPtr findAttachment (const FieldContainerType &type, UInt16 binding=0)
your_category


const SFAttachmentObjPtrMapgetSFAttachments (void) const
Get


virtual ObjPtr shallowCopy (void) const=0
Set


void callChangedFunctors (ConstFieldMaskArg whichField)
Container Access


UInt32 addChangedFunctor (ChangedFunctor func, std::string createSymbol)
template<class FunctorT>
void subChangedFunctor (FunctorT func)
void subChangedFunctor (UInt32 uiId)
void clearChangedFunctors (void)
Field Flags


const FieldFlagsgetFieldFlags (void)
Helper


OSG_SYSTEM_DLLMAPPING void addReference (void)
OSG_SYSTEM_DLLMAPPING void subReference (void)
OSG_SYSTEM_DLLMAPPING void subReferenceLocalVar (void)
OSG_SYSTEM_DLLMAPPING Int32 getRefCount (void) const
Comparison


virtual OSG_SYSTEM_DLLMAPPING
void 
invalidateVolume (void)
dcast


OSG_SYSTEM_DLLMAPPING UInt32 getTypeId (void) const
OSG_SYSTEM_DLLMAPPING UInt16 getGroupId (void) const
OSG_SYSTEM_DLLMAPPING const
Char8 * 
getTypeName (void) const
Get Field


OSG_SYSTEM_DLLMAPPING UInt32 getNumFields (void) const
OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr editField (UInt32 fieldId)
OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr editField (const Char8 *fieldName)
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr getField (UInt32 fieldId) const
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr getField (const Char8 *fieldName) const
Get Field Description


OSG_SYSTEM_DLLMAPPING FieldDescriptionBasegetFieldDescription (UInt32 fieldId)
OSG_SYSTEM_DLLMAPPING FieldDescriptionBasegetFieldDescription (const Char8 *fieldName)
Comparison


OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr invalidEditField (void)
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr invalidGetField (void) 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
static UInt16 getClassGroupId (void)
 access the type of the class

Public Attributes

General Fieldcontainer Declaration


 OSG_ABSTR_FIELD_CONTAINER_DECL

Static Public Attributes

static const OSG::BitVector ClearStencilBitFieldMask
static const OSG::BitVector DepthFieldMask
static const OSG::BitVector NextFieldMask

Protected Member Functions

Constructors


 Background (void)
 Background (const Background &source)
Destructors


virtual ~Background (void)
Generic Field Access


GetFieldHandlePtr getHandleClearStencilBit (void) const
EditFieldHandlePtr editHandleClearStencilBit (void)
GetFieldHandlePtr getHandleDepth (void) const
EditFieldHandlePtr editHandleDepth (void)
Sync


virtual void resolveLinks (void)
Sync


EditFieldHandlePtr editHandleAttachments (void)
GetFieldHandlePtr getHandleAttachments (void) const
Edit


OSG_SYSTEM_DLLMAPPING void subReferenceUnresolved (void)
MT Construction


OSG_SYSTEM_DLLMAPPING void onCreateAspect (const FieldContainer *createAspect, const FieldContainer *source=NULL)
OSG_SYSTEM_DLLMAPPING void onCreate (const FieldContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroy (UInt32 uiContainerId)
Changed


OSG_SYSTEM_DLLMAPPING void onCreate (const ReflexiveContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroyAspect (UInt32 uiContainerId, UInt32 uiAspect)
MT Construction


virtual OSG_SYSTEM_DLLMAPPING
bool 
deregister (UInt32 uiContainerId)
MT Construction


OSG_SYSTEM_DLLMAPPING void registerChangedContainer (void)
virtual OSG_SYSTEM_DLLMAPPING
void 
registerChangedContainerV (void)
Local Edit


void editSField (ConstFieldMaskArg whichField)
template<class FieldT>
void editMField (ConstFieldMaskArg whichField, FieldT &oField)
MT Destruction


void execEndEdit (ConstFieldMaskArg whichField)
void clearChangeEntry (ContainerChangeEntry *pRef)
Edit


OSG_SYSTEM_DLLMAPPING void setId (UInt32 uiContainerId)
OSG_SYSTEM_DLLMAPPING UInt32 getId (void) const

Static Protected Member Functions

static void classDescInserter (TypeObject &oType)
static Char8 * getClassname (void)
Init


static void initMethod (InitPhase ePhase)
Fields


static void classDescInserter (TypeObject &oType)
MT Construction


template<class ObjectT>
static void newPtr (typename ObjectT::ObjPtr &result, const ObjectT *prototypeP)
template<class ObjectT>
static void newPtr (typename ObjectT::ObjPtr &result)

Protected Attributes

Fields


SFInt32 _sfClearStencilBit
SFReal32 _sfDepth
Fields


SFAttachmentObjPtrMap _sfAttachments
Type information


FieldFlags_pFieldFlags
MFChangedFunctorCallback _mfChangedFunctors
Int32 _iRefCount
Member


BitVector _bvChanged
ContainerChangeEntry_pContainerChanges
UInt32 _uiContainerId

Static Protected Attributes

static TypeObject _type

Private Types

typedef BackgroundBase Inherited

Private Member Functions

void operator= (const Background &source)

Friends

class FieldContainer
class BackgroundBase

Detailed Description

Background is the base class for all background/buffer clearing. See PageSystemWindowBackground for a description.

Ext:

To create a new Background the method that has be overridden is clear(DrawActionBase * action, Viewport * port);. It can directly call OpenGL commands, but should restore the state after it's done.

Definition at line 56 of file OSGBackground.h.


Member Typedef Documentation

Definition at line 70 of file OSGAttachmentContainer.h.

typedef FieldContainerAttachmentPtr OSG::AttachmentContainer::AttachmentObjPtr [inherited]

Definition at line 71 of file OSGAttachmentContainer.h.

typedef SFFieldContainerAttachmentPtrMap OSG::AttachmentContainer::SFAttachmentObjPtrMap [inherited]

Definition at line 72 of file OSGAttachmentContainer.h.

typedef SFAttachmentObjPtrMap::StoredType OSG::AttachmentContainer::AttachmentObjPtrMap [inherited]

Definition at line 74 of file OSGAttachmentContainer.h.

typedef AttachmentObjPtrMap::iterator OSG::AttachmentContainer::AttachmentObjPtrMapIt [inherited]

Definition at line 75 of file OSGAttachmentContainer.h.

typedef Field*(ReflexiveContainer::*) OSG::ReflexiveContainer::FieldEditMethod(void) [inherited]

Definition at line 79 of file OSGReflexiveContainer.h.

typedef const Field*(ReflexiveContainer::*) OSG::ReflexiveContainer::FieldGetMethod(void) const [inherited]

Definition at line 81 of file OSGReflexiveContainer.h.


Member Enumeration Documentation

anonymous enum [inherited]

Enumerator:
ClearStencilBitFieldId 
DepthFieldId 
NextFieldId 

Definition at line 95 of file OSGBackgroundBase.h.

00096     {
00097         ClearStencilBitFieldId = Inherited::NextFieldId,
00098         DepthFieldId = ClearStencilBitFieldId + 1,
00099         NextFieldId = DepthFieldId + 1
00100     };


Constructor & Destructor Documentation

Background::Background ( void   )  [protected]

Definition at line 80 of file OSGBackground.cpp.

00080                            :
00081     Inherited()
00082 {
00083 }

Background::Background ( const Background source  )  [protected]

Definition at line 85 of file OSGBackground.cpp.

00085                                                :
00086     Inherited(source)
00087 {
00088 }

Background::~Background ( void   )  [protected, virtual]

Definition at line 90 of file OSGBackground.cpp.

00091 {
00092 }


Member Function Documentation

virtual void OSG::Background::clear ( DrawEnv pEnv,
Viewport pPort 
) [pure virtual]

void Background::changed ( ConstFieldMaskArg  whichField,
UInt32  origin,
BitVector  detail 
) [virtual]

virtual void OSG::Background::dump ( UInt32  uiIndent = 0,
const BitVector  bvFlags = 0 
) const [virtual]

void Background::initMethod ( InitPhase  ePhase  )  [static, protected]

void OSG::Background::operator= ( const Background source  )  [private]

OSG::BackgroundBase::OSG_GEN_INTERNALPTR ( Background   )  [inherited]

OSG::AttachmentContainer::OSG_GEN_INTERNALPTR ( AttachmentContainer   )  [inherited]

OSG::FieldContainer::OSG_GEN_INTERNALPTR ( FieldContainer   )  [inherited]

OSG::FieldContainerType & OSG::BackgroundBase::getClassType ( void   )  [inline, static, inherited]

OSG::UInt32 OSG::BackgroundBase::getClassTypeId ( void   )  [inline, static, inherited]

OSG::UInt16 OSG::BackgroundBase::getClassGroupId ( void   )  [inline, static, inherited]

FieldContainerType & OSG::BackgroundBase::getType ( void   )  [virtual, inherited]

const FieldContainerType & OSG::BackgroundBase::getType ( void   )  const [virtual, inherited]

UInt32 OSG::BackgroundBase::getContainerSize ( void   )  const [virtual, inherited]

SFInt32 * OSG::BackgroundBase::editSFClearStencilBit ( void   )  [inherited]

const SFInt32 * OSG::BackgroundBase::getSFClearStencilBit ( void   )  const [inherited]

Definition at line 233 of file OSGBackgroundBase.cpp.

References OSG::BackgroundBase::_sfClearStencilBit.

00234 {
00235     return &_sfClearStencilBit;
00236 }

SFReal32 * OSG::BackgroundBase::editSFDepth ( void   )  [inherited]

const SFReal32 * OSG::BackgroundBase::getSFDepth ( void   )  const [inherited]

Definition at line 252 of file OSGBackgroundBase.cpp.

References OSG::BackgroundBase::_sfDepth.

00253 {
00254     return &_sfDepth;
00255 }

Int32 & OSG::BackgroundBase::editClearStencilBit ( void   )  [inline, inherited]

const Int32 & OSG::BackgroundBase::getClearStencilBit ( void   )  const [inline, inherited]

Real32 & OSG::BackgroundBase::editDepth ( void   )  [inline, inherited]

Definition at line 112 of file OSGBackgroundBase.inl.

References OSG::BackgroundBase::_sfDepth, OSG::BackgroundBase::DepthFieldMask, and OSG::FieldContainer::editSField().

00113 {
00114     editSField(DepthFieldMask);
00115 
00116     return _sfDepth.getValue();
00117 }

const Real32 & OSG::BackgroundBase::getDepth ( void   )  const [inline, inherited]

Definition at line 121 of file OSGBackgroundBase.inl.

References OSG::BackgroundBase::_sfDepth.

Referenced by OSG::SolidBackground::clear(), and OSG::DepthClearBackground::clear().

00122 {
00123     return _sfDepth.getValue();
00124 }

void OSG::BackgroundBase::setClearStencilBit ( const Int32 &  value  )  [inline, inherited]

void OSG::BackgroundBase::setDepth ( const Real32 &  value  )  [inline, inherited]

UInt32 OSG::BackgroundBase::getBinSize ( ConstFieldMaskArg  whichField  )  [virtual, inherited]

void OSG::BackgroundBase::copyToBin ( BinaryDataHandler pMem,
ConstFieldMaskArg  whichField 
) [virtual, inherited]