OSG::CameraDecorator Class Reference

Camera Decorator base class, see PageSystemWindowCameraDecorators for a description. More...

#include <OSGCameraDecorator.h>

Inheritance diagram for OSG::CameraDecorator:

OSG::CameraDecoratorBase OSG::Camera OSG::CameraBase OSG::AttachmentContainer OSG::FieldContainer OSG::ReflexiveContainer 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



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

Public Types

typedef CameraDecoratorBase Inherited
enum  { DecorateeFieldId = Inherited::NextFieldId, NextFieldId = DecorateeFieldId + 1 }
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)
Sync


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


virtual void getProjection (Matrix &result, UInt32 width, UInt32 height)
virtual void getProjectionTranslation (Matrix &result, UInt32 width, UInt32 height)
virtual void getViewing (Matrix &result, UInt32 width, UInt32 height)
Output


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


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)
Setup Rendering


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


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)
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


 CameraDecorator (void)
 CameraDecorator (const CameraDecorator &source)
Destructors


virtual ~CameraDecorator (void)
onCreate


void onCreate (const CameraDecorator *source=NULL)
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)
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)
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 CameraDecorator &source)

Friends

class FieldContainer
class CameraDecoratorBase

Detailed Description

The Camera base class, see PageSystemWindowCamera for a description.

The only common fields are _sfNear and _sfFar.

Definition at line 53 of file OSGCameraDecorator.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:
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

CameraDecorator::CameraDecorator ( void   )  [protected]

Definition at line 64 of file OSGCameraDecorator.cpp.

00064                                      :
00065     Inherited()
00066 {
00067 }

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

Definition at line 69 of file OSGCameraDecorator.cpp.

00069                                                               :
00070     Inherited(source)
00071 {
00072 }

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

Definition at line 74 of file OSGCameraDecorator.cpp.

00075 {
00076 }


Member Function Documentation

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

void CameraDecorator::getProjection ( Matrix result,
UInt32  width,
UInt32  height 
) [virtual]

Reimplemented from OSG::Camera.

Reimplemented in OSG::MatrixCameraDecorator, OSG::TileCameraDecorator, OSG::ShearedStereoCameraDecorator, and OSG::ProjectionCameraDecorator.

Definition at line 102 of file OSGCameraDecorator.cpp.

References FWARNING, OSG::CameraDecoratorBase::getDecoratee(), NullFC, and OSG::TransformationMatrix< ValueTypeT >::setIdentity().

00105 {
00106     CameraPtr camera = getDecoratee();
00107 
00108     if(camera == NullFC)
00109     {
00110         FWARNING(("CameraDecorator::getProjection: no decoratee!\n"));
00111 
00112         result.setIdentity();
00113 
00114         return;
00115     }
00116 
00117     camera->getProjection(result, width, height);
00118 }

void CameraDecorator::getProjectionTranslation ( Matrix result,
UInt32  width,
UInt32  height 
) [virtual]

Reimplemented from OSG::Camera.

Reimplemented in OSG::MatrixCameraDecorator, and OSG::ProjectionCameraDecorator.

Definition at line 120 of file OSGCameraDecorator.cpp.

References FWARNING, OSG::CameraDecoratorBase::getDecoratee(), NullFC, and OSG::TransformationMatrix< ValueTypeT >::setIdentity().

00123 {
00124     CameraPtr camera = getDecoratee();
00125 
00126     if(camera == NullFC)
00127     {
00128         FWARNING(("CameraDecorator::getProjectionTranslation: "
00129                   "no decoratee!\n"));
00130 
00131         result.setIdentity();
00132 
00133         return;
00134     }
00135 
00136     camera->getProjectionTranslation(result, width, height);
00137 }

void CameraDecorator::getViewing ( Matrix result,
UInt32  width,
UInt32  height 
) [virtual]

Reimplemented from OSG::Camera.

Reimplemented in OSG::MatrixCameraDecorator, and OSG::ProjectionCameraDecorator.

Definition at line 139 of file OSGCameraDecorator.cpp.

References FWARNING, OSG::CameraDecoratorBase::getDecoratee(), NullFC, and OSG::TransformationMatrix< ValueTypeT >::setIdentity().

00142 {
00143     CameraPtr camera = getDecoratee();
00144 
00145     if(camera == NullFC)
00146     {
00147         FWARNING(("CameraDecorator::getViewing: no decoratee!\n"));
00148 
00149         result.setIdentity();
00150 
00151         return;
00152     }
00153 
00154     camera->getViewing(result, width, height);
00155 }

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

Reimplemented from OSG::Camera.

Reimplemented in OSG::MatrixCameraDecorator, OSG::TileCameraDecorator, OSG::ShearedStereoCameraDecorator, OSG::ProjectionCameraDecorator, and OSG::StereoCameraDecorator.

Definition at line 92 of file OSGCameraDecorator.cpp.

References SLOG.

00094 {
00095     SLOG << "Dump CameraDecorator NI" << std::endl;
00096 }

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

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

OSG::CameraDecoratorBase::OSG_GEN_INTERNALPTR ( CameraDecorator   )  [inherited]

OSG::CameraBase::OSG_GEN_INTERNALPTR ( Camera   )  [inherited]

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

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

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

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

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

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

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

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

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, inherited]

Definition at line 190 of file OSGCameraDecoratorBase.cpp.

References OSG::CameraDecoratorBase::_sfDecoratee.

00191 {
00192     return &_sfDecoratee;
00193 }

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

Reimplemented from OSG::CameraBase.

Definition at line 196 of file OSGCameraDecoratorBase.cpp.

References OS