OSG::CameraBase Class Reference

Camera Base Class.

#include <OSGCameraBase.h>

Inheritance diagram for OSG::CameraBase:

OSG::AttachmentContainer OSG::FieldContainer OSG::ReflexiveContainer OSG::Camera OSG::CameraDecoratorBase OSG::MatrixCameraBase OSG::OrthographicCameraBase OSG::PerspectiveCameraBase OSG::CameraDecorator OSG::MatrixCamera OSG::OrthographicCamera OSG::PerspectiveCamera OSG::MatrixCameraDecoratorBase OSG::StereoCameraDecoratorBase OSG::TileCameraDecoratorBase OSG::OffCenterPerspectiveCameraBase OSG::MatrixCameraDecorator OSG::StereoCameraDecorator OSG::TileCameraDecorator OSG::OffCenterPerspectiveCamera 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  { BeaconFieldId = Inherited::NextFieldId, NearFieldId = BeaconFieldId + 1, FarFieldId = NearFieldId + 1, NextFieldId = FarFieldId + 1 }
typedef AttachmentContainer Inherited
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 (Camera)
FieldContainer Get


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


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


virtual void setBeacon (NodePtrConstArg value)
 Set the value of the Camera::_sfBeacon field.
virtual void setNear (const Real32 &value)
 Set the value of the Camera::_sfNear field.
virtual void setFar (const Real32 &value)
 Set the value of the Camera::_sfFar 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
Dump


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


virtual ObjPtr shallowCopy (void) const=0
Set


virtual void changed (ConstFieldMaskArg whichField, UInt32 origin, BitVector details)
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 BeaconFieldMask
static const OSG::BitVector NearFieldMask
static const OSG::BitVector FarFieldMask
static const OSG::BitVector NextFieldMask

Protected Member Functions

Constructors


 CameraBase (void)
 CameraBase (const CameraBase &source)
Destructors


virtual ~CameraBase (void)
onCreate


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


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


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


static void initMethod (InitPhase ePhase)

Protected Attributes

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 CameraBase &source)

Detailed Description

Definition at line 80 of file OSGCameraBase.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:
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::CameraBase::CameraBase ( void   )  [protected]

Definition at line 340 of file OSGCameraBase.cpp.

00340                            :
00341     Inherited(),
00342     _sfBeacon                 (NullFC),
00343     _sfNear                   (),
00344     _sfFar                    ()
00345 {
00346 }

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

Definition at line 348 of file OSGCameraBase.cpp.

00348                                                :
00349     Inherited(source),
00350     _sfBeacon                 (NullFC),
00351     _sfNear                   (source._sfNear                   ),
00352     _sfFar                    (source._sfFar                    )
00353 {
00354 }

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

Definition at line 359 of file OSGCameraBase.cpp.

00360 {
00361 }


Member Function Documentation

OSG::CameraBase::OSG_GEN_INTERNALPTR ( Camera   ) 

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

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

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

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

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

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

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

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 228 of file OSGCameraBase.cpp.

References _sfBeacon.

00229 {
00230     return &_sfBeacon;
00231 }

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

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 233 of file OSGCameraBase.cpp.

References _sfNear, OSG::FieldContainer::editSField(), and NearFieldMask.

00234 {
00235     editSField(NearFieldMask);
00236 
00237     return &_sfNear;
00238 }

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

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 240 of file OSGCameraBase.cpp.

References _sfNear.

00241 {
00242     return &_sfNear;
00243 }

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

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 252 of file OSGCameraBase.cpp.

References _sfFar, OSG::FieldContainer::editSField(), and FarFieldMask.

00253 {
00254     editSField(FarFieldMask);
00255 
00256     return &_sfFar;
00257 }

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

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 259 of file OSGCameraBase.cpp.

References _sfFar.

00260 {
00261     return &_sfFar;
00262 }

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

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 474 of file OSGCameraBase.cpp.

References _sfBeacon.

Referenced by onCreate().

00475 {
00476     return _sfBeacon.getValue();
00477 }

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

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 488 of file OSGCameraBase.cpp.

References _sfNear, OSG::FieldContainer::editSField(), and NearFieldMask.

00489 {
00490     editSField(NearFieldMask);
00491 
00492     return _sfNear.getValue();
00493 }

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

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

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 517 of file OSGCameraBase.cpp.

References _sfFar, OSG::FieldContainer::editSField(), and FarFieldMask.

00518 {
00519     editSField(FarFieldMask);
00520 
00521     return _sfFar.getValue();
00522 }

const Real32 & OSG::CameraBase::getFar ( void   )  const [virtual]

void OSG::CameraBase::setBeacon ( NodePtrConstArg  value  )  [virtual]

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 480 of file OSGCameraBase.cpp.

References _sfBeacon, BeaconFieldMask, OSG::FieldContainer::editSField(), and OSG::setRefd().

Referenced by editHandleBeacon(), onCreate(), and resolveLinks().

00481 {
00482     editSField(BeaconFieldMask);
00483 
00484     setRefd(_sfBeacon.getValue(), value);
00485 }

void OSG::CameraBase::setNear ( const Real32 &  value  )  [virtual]

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 509 of file OSGCameraBase.cpp.

References _sfNear, OSG::FieldContainer::editSField(), and NearFieldMask.

00510 {
00511     editSField(NearFieldMask);
00512 
00513     _sfNear.setValue(value);
00514 }

void OSG::CameraBase::setFar ( const Real32 &  value  )  [virtual]

Reimplemented in OSG::CameraDecoratorBase.

Definition at line 538 of file OSGCameraBase.cpp.

References _sfFar, OSG::FieldContainer::editSField(), and FarFieldMask.

00539 {
00540     editSField(FarFieldMask);
00541 
00542     _sfFar.setValue(value);
00543 }

UInt32 OSG::CameraBase::getBinSize ( ConstFieldMaskArg  whichField  )  [virtual]

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

Reimplemented from OSG::AttachmentContainer.

Reimplemented in