OSG::CameraDecoratorBase Class Reference

CameraDecorator Base Class.

#include <OSGCameraDecoratorBase.h>

Inheritance diagram for OSG::CameraDecoratorBase:

OSG::Camera OSG::CameraBase OSG::AttachmentContainer OSG::FieldContainer OSG::ReflexiveContainer OSG::CameraDecorator OSG::MatrixCameraDecoratorBase OSG::StereoCameraDecoratorBase OSG::TileCameraDecoratorBase OSG::MatrixCameraDecorator OSG::StereoCameraDecorator OSG::TileCameraDecorator OSG::ProjectionCameraDecoratorBase OSG::ShearedStereoCameraDecoratorBase OSG::ProjectionCameraDecorator OSG::ShearedStereoCameraDecorator List of all members.

dcast



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

Type definitions



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

Public Types

enum  { DecorateeFieldId = Inherited::NextFieldId, NextFieldId = DecorateeFieldId + 1 }
typedef Camera Inherited
typedef Camera ParentContainer
typedef Inherited::TypeObject TypeObject
typedef TypeObject::InitPhase InitPhase
enum  { BeaconFieldId = Inherited::NextFieldId, NearFieldId = BeaconFieldId + 1, FarFieldId = NearFieldId + 1, NextFieldId = FarFieldId + 1 }
Type definitions


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

Public Member Functions

 OSG_GEN_INTERNALPTR (CameraDecorator)
 OSG_GEN_INTERNALPTR (Camera)
FieldContainer Get


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


virtual const SFCameraPtr * getSFDecoratee (void) const
virtual const SFNodePtr * getSFBeacon (void) const
 Get the CameraDecorator::_sfBeacon field.
virtual SFReal32 * editSFNear (void)
virtual const SFReal32 * getSFNear (void) const
virtual SFReal32 * editSFFar (void)
virtual const SFReal32 * getSFFar (void) const
virtual CameraPtrConst getDecoratee (void) const
virtual NodePtrConst getBeacon (void) const
 Get the value of the CameraDecorator::_sfBeacon field.
virtual Real32 & editNear (void)
 Get the value of the CameraDecorator::_sfNear field.
virtual const Real32 & getNear (void) const
 Get the value of the CameraDecorator::_sfNear field.
virtual Real32 & editFar (void)
 Get the value of the CameraDecorator::_sfFar field.
virtual const Real32 & getFar (void) const
 Get the value of the CameraDecorator::_sfFar field.
Field Set


virtual void setDecoratee (const CameraPtr &value)
virtual void setBeacon (NodePtrConstArg value)
 Set the value of the CameraDecorator::_sfBeacon field.
virtual void setNear (const Real32 &value)
 Set the value of the CameraDecorator::_sfNear field.
virtual void setFar (const Real32 &value)
 Set the value of the CameraDecorator::_sfFar field.
Binary Access


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


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


virtual void setup (DrawActionBase *action, const Viewport &port)
virtual void setupProjection (DrawActionBase *action, const Viewport &port)
Access Parameters


virtual void getProjection (Matrixr &result, UInt32 width, UInt32 height)
virtual void getProjectionTranslation (Matrixr &result, UInt32 width, UInt32 height)
virtual void getViewing (Matrixr &result, UInt32 width, UInt32 height)
virtual void getFrustum (FrustumVolume &result, const Viewport &port)
virtual void getWorldToScreen (Matrixr &result, const Viewport &port)
virtual void getDecoration (Matrixr &result, UInt32 width, UInt32 height)
virtual Matrixr getProjectionVal (UInt32 width, UInt32 height)
virtual Matrixr getProjectionTranslationVal (UInt32 width, UInt32 height)
virtual Matrixr getViewingVal (UInt32 width, UInt32 height)
virtual Matrixr getWorldToScreenVal (const Viewport &port)
virtual Matrixr getDecorationVal (UInt32 width, UInt32 height)
virtual FrustumVolume getFrustumVal (const Viewport &port)
Intersection Helper


bool calcViewRay (Line &line, Int32 x, Int32 y, const Viewport &port)
dump


virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
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 DecorateeFieldMask
static const OSG::BitVector BeaconFieldMask
static const OSG::BitVector NearFieldMask
static const OSG::BitVector FarFieldMask
static const OSG::BitVector NextFieldMask

Protected Member Functions

Constructors


 CameraDecoratorBase (void)
 CameraDecoratorBase (const CameraDecoratorBase &source)
Destructors


virtual ~CameraDecoratorBase (void)
onCreate


void onCreate (const CameraDecorator *source=NULL)
Generic Field Access


GetFieldHandlePtr getHandleDecoratee (void) const
EditFieldHandlePtr editHandleDecoratee (void)
GetFieldHandlePtr getHandleBeacon (void) const
EditFieldHandlePtr editHandleBeacon (void)
GetFieldHandlePtr getHandleNear (void) const
EditFieldHandlePtr editHandleNear (void)
GetFieldHandlePtr getHandleFar (void) const
EditFieldHandlePtr editHandleFar (void)
Sync


virtual void resolveLinks (void)
onCreate


void onCreate (const Camera *source=NULL)
MT Construction


OSG_SYSTEM_DLLMAPPING void onCreate (const FieldContainer *source=NULL)
OSG_SYSTEM_DLLMAPPING void onCreateAspect (const FieldContainer *createAspect, 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)
Sync


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


OSG_SYSTEM_DLLMAPPING void subReferenceUnresolved (void)
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


SFCameraPtr _sfDecoratee
Fields


SFNodePtr _sfBeacon
SFReal32 _sfNear
SFReal32 _sfFar
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 Member Functions

void operator= (const CameraDecoratorBase &source)

Detailed Description

Definition at line 78 of file OSGCameraDecoratorBase.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

Enumerator:
DecorateeFieldId 
NextFieldId 

Definition at line 94 of file OSGCameraDecoratorBase.h.

anonymous enum [inherited]

Enumerator:
BeaconFieldId 
NearFieldId 
FarFieldId 
NextFieldId 

Definition at line 96 of file OSGCameraBase.h.

00097     {
00098         BeaconFieldId = Inherited::NextFieldId,
00099         NearFieldId = BeaconFieldId + 1,
00100         FarFieldId = NearFieldId + 1,
00101         NextFieldId = FarFieldId + 1
00102     };


Constructor & Destructor Documentation

OSG::CameraDecoratorBase::CameraDecoratorBase ( void   )  [protected]

Definition at line 314 of file OSGCameraDecoratorBase.cpp.

00314                                              :
00315     Inherited(),
00316     _sfDecoratee()
00317 {
00318 }

OSG::CameraDecoratorBase::CameraDecoratorBase ( const CameraDecoratorBase source  )  [protected]

Definition at line 320 of file OSGCameraDecoratorBase.cpp.

00320                                                                           :
00321     Inherited(source),
00322     _sfDecoratee(source._sfDecoratee)
00323 {
00324 }

OSG::CameraDecoratorBase::~CameraDecoratorBase ( void   )  [protected, virtual]

Definition at line 329 of file OSGCameraDecoratorBase.cpp.

00330 {
00331 }


Member Function Documentation

OSG::CameraDecoratorBase::OSG_GEN_INTERNALPTR ( CameraDecorator   ) 

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

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

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

FieldContainerType & OSG::CameraDecoratorBase::getType ( void   )  [virtual]

const FieldContainerType & OSG::CameraDecoratorBase::getType ( void   )  const [virtual]

UInt32 OSG::CameraDecoratorBase::getContainerSize ( void   )  const [virtual]

Reimplemented from OSG::CameraBase.

Reimplemented in OSG::ProjectionCameraDecoratorBase, OSG::TileCameraDecoratorBase, OSG::MatrixCameraDecoratorBase, OSG::ShearedStereoCameraDecoratorBase, and OSG::StereoCameraDecoratorBase.

Definition at line 183 of file OSGCameraDecoratorBase.cpp.

00184 {
00185     return sizeof(CameraDecorator);
00186 }

const SFCameraPtr * OSG::CameraDecoratorBase::getSFDecoratee ( void   )  const [virtual]

Definition at line 190 of file OSGCameraDecoratorBase.cpp.

References _sfDecoratee.

00191 {
00192     return &_sfDecoratee;
00193 }

const SFNodePtr * OSG::CameraDecoratorBase::getSFBeacon ( void   )  const [virtual]

Reimplemented from OSG::CameraBase.

Definition at line 196 of file OSGCameraDecoratorBase.cpp.

References _sfDecoratee, getDecoratee(), and NullFC.

00197 {
00198     if(_sfDecoratee.getValue() != NullFC)
00199     {
00200         return getDecoratee()->getSFBeacon();
00201     }
00202     else
00203     {
00204         return NULL;
00205     }
00206 }

SFReal32 * OSG::CameraDecoratorBase::editSFNear ( void   )  [virtual]

Reimplemented from OSG::CameraBase.

Definition at line 208 of file OSGCameraDecoratorBase.cpp.

References _sfDecoratee, getDecoratee(), and NullFC.

00209 {
00210     if(_sfDecoratee.getValue() != NullFC)
00211     {
00212         return getDecoratee()->editSFNear();
00213     }
00214     else
00215     {
00216         return NULL;
00217     }
00218 }

const SFReal32 * OSG::CameraDecoratorBase::getSFNear ( void   )  const [virtual]

Reimplemented from OSG::CameraBase.

Definition at line 220 of file OSGCameraDecoratorBase.cpp.

References _sfDecoratee, getDecoratee(), and NullFC.

00221 {
00222     if(_sfDecoratee.getValue() != NullFC)
00223     {
00224         return getDecoratee()->getSFNear();
00225     }
00226     else
00227     {
00228         return NULL;
00229     }
00230 }

SFReal32 * OSG::CameraDecoratorBase::editSFFar ( void   )  [virtual]

Reimplemented from OSG::CameraBase.

Definition at line 238 of file OSGCameraDecoratorBase.cpp.

References _sfDecoratee, getDecoratee(), and NullFC.

00239 {
00240     if(_sfDecoratee.getValue() != NullFC)
00241     {
00242         return getDecoratee()->editSFFar();
00243     }
00244     else
00245     {
00246         return NULL;
00247     }
00248 }

const SFReal32 * OSG::CameraDecoratorBase::getSFFar ( void   )  const [virtual]

Reimplemented from OSG::CameraBase.

Definition at line 250 of file OSGCameraDecoratorBase.cpp.

References _sfDecoratee, getDecoratee(), and NullFC.

00251 {
00252     if(_sfDecoratee.getValue() != NullFC)
00253     {
00254         return getDecoratee()->getSFFar();
00255     }
00256     else
00257     {
00258         return NULL;
00259     }
00260 }

const CameraPtrConst OSG::CameraDecoratorBase::getDecoratee ( void   )  const [inline, virtual]

NodePtrConst OSG::CameraDecoratorBase::getBeacon ( void   )  const [virtual]

Reimplemented from OSG::CameraBase.

Definition at line 469 of file OSGCameraDecoratorBase.cpp.

References _sfDecoratee, getDecoratee(), and NullFC.

Referenced by onCreate().

00470 {
00471     if(_sfDecoratee.getValue() != NullFC)
00472     {
00473         return getDecoratee()->getBeacon();
00474     }
00475     else
00476     {
00477         return Inherited::getBeacon();
00478     }
00479 }

Real32 & OSG::CameraDecoratorBase::editNear ( void   )  [virtual]

Reimplemented from OSG::CameraBase.

Definition at line 495 of file OSGCameraDecoratorBase.cpp.

References _sfDecoratee, getDecoratee(), and NullFC.

00496 {
00497     if(_sfDecoratee.getValue() != NullFC)
00498     {
00499         return getDecoratee()->editNear();
00500     }
00501     else
00502     {
00503         return Inherited::editNear();
00504     }
00505 }

const Real32 & OSG::CameraDecoratorBase::getNear ( void   )  const [virtual]

Reimplemented from OSG::CameraBase.

Definition at line 508 of file OSGCameraDecoratorBase.cpp.

References _sfDecoratee, getDecoratee(), and NullFC.

00509 {
00510     if(_sfDecoratee.getValue() != NullFC)
00511     {
00512         return getDecoratee()->getNear();
00513     }
00514     else
00515     {
00516         return Inherited::getNear();
00517     }
00518 }

Real32 & OSG::CameraDecoratorBase::editFar ( void   )  [virtual]

Reimplemented from OSG::CameraBase.

Definition at line 542 of file OSGCameraDecoratorBase.cpp.

References _sfDecoratee, getDecoratee(), and NullFC.

00543 {
00544     if(_sfDecoratee.getValue() != NullFC)
00545     {
00546         return getDecoratee()->editFar();
00547     }
00548     else
00549     {
00550         return Inherited::editFar();
00551     }
00552 }