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

osg::ProjectionCameraDecoratorBase Class Reference

ProjectionCameraDecorator Base Class.

#include <OSGProjectionCameraDecoratorBase.h>

Inheritance diagram for osg::ProjectionCameraDecoratorBase:

osg::StereoCameraDecorator osg::StereoCameraDecoratorBase osg::CameraDecorator osg::CameraDecoratorBase osg::Camera osg::CameraBase osg::AttachmentContainer osg::FieldContainer osg::ProjectionCameraDecorator List of all members.

Public Types

typedef ProjectionCameraDecoratorPtr Ptr
enum  {
  UserFieldId = Inherited::NextFieldId, SurfaceFieldId = UserFieldId + 1, LeftFieldId = SurfaceFieldId + 1, BottomFieldId = LeftFieldId + 1,
  NormalFieldId = BottomFieldId + 1, WidthFieldId = NormalFieldId + 1, HeightFieldId = WidthFieldId + 1, NextFieldId = HeightFieldId + 1
}

Public Member Functions

FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFNodePtrgetSFUser (void)
 Get the ProjectionCameraDecorator::_sfUser field.
MFPnt3fgetMFSurface (void)
 Get the ProjectionCameraDecorator::_mfSurface field.
SFReal32getSFWidth (void)
 Get the ProjectionCameraDecorator::_sfWidth field.
SFReal32getSFHeight (void)
 Get the ProjectionCameraDecorator::_sfHeight field.
NodePtrgetUser (void)
 Get the value of the ProjectionCameraDecorator::_sfUser field.
const NodePtrgetUser (void) const
 Get the value of the ProjectionCameraDecorator::_sfUser field.
Real32getWidth (void)
 Get the value of the ProjectionCameraDecorator::_sfWidth field.
const Real32getWidth (void) const
 Get the value of the ProjectionCameraDecorator::_sfWidth field.
Real32getHeight (void)
 Get the value of the ProjectionCameraDecorator::_sfHeight field.
const Real32getHeight (void) const
 Get the value of the ProjectionCameraDecorator::_sfHeight field.
Pnt3fgetSurface (const UInt32 index)
 Get the value of the index element the ProjectionCameraDecorator::_mfSurface field.
MFPnt3fgetSurface (void)
 Get the ProjectionCameraDecorator::_mfSurface field.
const MFPnt3fgetSurface (void) const
 Get the ProjectionCameraDecorator::_mfSurface field.
Field Set
*void setUser (const NodePtr &value)
 Set the value of the ProjectionCameraDecorator::_sfUser field.
void setWidth (const Real32 &value)
 Set the value of the ProjectionCameraDecorator::_sfWidth field.
void setHeight (const Real32 &value)
 Set the value of the ProjectionCameraDecorator::_sfHeight 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
Sync
*virtual void changed (BitVector whichField, UInt32 origin)
Output
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
Field Get
*SFBoolgetSFLeftEye (void)
 Get the StereoCameraDecorator::_sfLeftEye field.
SFReal32getSFEyeSeparation (void)
 Get the StereoCameraDecorator::_sfEyeSeparation field.
bool & getLeftEye (void)
 Get the value of the StereoCameraDecorator::_sfLeftEye field.
const bool & getLeftEye (void) const
 Get the value of the StereoCameraDecorator::_sfLeftEye field.
Real32getEyeSeparation (void)
 Get the value of the StereoCameraDecorator::_sfEyeSeparation field.
const Real32getEyeSeparation (void) const
 Get the value of the StereoCameraDecorator::_sfEyeSeparation field.
Field Set
*void setLeftEye (const bool &value)
 Set the value of the StereoCameraDecorator::_sfLeftEye field.
void setEyeSeparation (const Real32 &value)
 Set the value of the StereoCameraDecorator::_sfEyeSeparation field.
your_category
*virtual void draw (DrawAction *action, const Viewport &port)
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)
Field Get
*SFCameraPtrgetSFDecoratee (void)
SFNodePtrgetSFBeacon (void)
SFReal32getSFNear (void)
SFReal32getSFFar (void)
CameraPtrgetDecoratee (void)
const CameraPtrgetDecoratee (void) const
NodePtrgetBeacon (void)
const NodePtrgetBeacon (void) const
Real32getNear (void)
const Real32getNear (void) const
Real32getFar (void)
const Real32getFar (void) const
Field Set
*void setDecoratee (const CameraPtr &value)
void setBeacon (const NodePtr &value)
void setNear (const Real32 &value)
void setFar (const Real32 &value)
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 (Matrix &result, const Viewport &port)
Intersection Helper
*bool calcViewRay (Line &line, Int32 x, Int32 y, const Viewport &port)

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 ProjectionCameraDecoratorPtr create (void)
 create a new instance of the class
static ProjectionCameraDecoratorPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype
Class Get
*static const char * getClassname (void)

Static Public Attributes

static const osg::BitVector UserFieldMask
static const osg::BitVector SurfaceFieldMask
static const osg::BitVector LeftFieldMask
static const osg::BitVector BottomFieldMask
static const osg::BitVector NormalFieldMask
static const osg::BitVector WidthFieldMask
static const osg::BitVector HeightFieldMask
static const osg::BitVector MTInfluenceMask
static const osg::BitVector LeftEyeFieldMask
static const osg::BitVector EyeSeparationFieldMask
static const osg::BitVector DecorateeFieldMask
static const osg::BitVector BeaconFieldMask
static const osg::BitVector NearFieldMask
static const osg::BitVector FarFieldMask
static const BitVector AttachmentsFieldMask
static const BitVector NextFieldMask

Protected Member Functions

Constructors
ProjectionCameraDecoratorBase (void)
 ProjectionCameraDecoratorBase (const ProjectionCameraDecoratorBase &source)
Destructors
*virtual ~ProjectionCameraDecoratorBase (void)
Field Get
*SFPlanegetSFLeft (void)
 Get the ProjectionCameraDecorator::_sfLeft field.
SFPlanegetSFBottom (void)
 Get the ProjectionCameraDecorator::_sfBottom field.
SFPlanegetSFNormal (void)
 Get the ProjectionCameraDecorator::_sfNormal field.
PlanegetLeft (void)
 Get the value of the ProjectionCameraDecorator::_sfLeft field.
const PlanegetLeft (void) const
 Get the value of the ProjectionCameraDecorator::_sfLeft field.
PlanegetBottom (void)
 Get the value of the ProjectionCameraDecorator::_sfBottom field.
const PlanegetBottom (void) const
 Get the value of the ProjectionCameraDecorator::_sfBottom field.
PlanegetNormal (void)
 Get the value of the ProjectionCameraDecorator::_sfNormal field.
const PlanegetNormal (void) const
 Get the value of the ProjectionCameraDecorator::_sfNormal field.
Field Set
*void setLeft (const Plane &value)
 Set the value of the ProjectionCameraDecorator::_sfLeft field.
void setBottom (const Plane &value)
 Set the value of the ProjectionCameraDecorator::_sfBottom field.
void setNormal (const Plane &value)
 Set the value of the ProjectionCameraDecorator::_sfNormal field.
Sync
*void executeSyncImpl (ProjectionCameraDecoratorBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)
Sync
*void executeSyncImpl (StereoCameraDecoratorBase *pOther, const BitVector &whichField)
Sync
*void executeSyncImpl (CameraDecoratorBase *pOther, const BitVector &whichField)
Sync
*void executeSyncImpl (CameraBase *pOther, const BitVector &whichField)

Protected Attributes

Fields
*SFNodePtr _sfUser
MFPnt3f _mfSurface
SFPlane _sfLeft
SFPlane _sfBottom
SFPlane _sfNormal
SFReal32 _sfWidth
SFReal32 _sfHeight
Fields
*SFBool _sfLeftEye
SFReal32 _sfEyeSeparation
Fields
*SFCameraPtr _sfDecoratee
Fields
*SFNodePtr _sfBeacon
SFReal32 _sfNear
SFReal32 _sfFar

Private Types

typedef StereoCameraDecorator Inherited

Private Member Functions

void operator= (const ProjectionCameraDecoratorBase &source)

Static Private Attributes

static FieldDescription_desc []
 ProjectionCameraDecorator description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 87 of file OSGProjectionCameraDecoratorBase.h.


Member Typedef Documentation

typedef StereoCameraDecorator osg::ProjectionCameraDecoratorBase::Inherited [private]
 

Reimplemented from osg::StereoCameraDecorator.

Reimplemented in osg::ProjectionCameraDecorator.

Definition at line 91 of file OSGProjectionCameraDecoratorBase.h.

typedef ProjectionCameraDecoratorPtr osg::ProjectionCameraDecoratorBase::Ptr
 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 96 of file OSGProjectionCameraDecoratorBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
UserFieldId 
SurfaceFieldId 
LeftFieldId 
BottomFieldId 
NormalFieldId 
WidthFieldId 
HeightFieldId 
NextFieldId 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 98 of file OSGProjectionCameraDecoratorBase.h.

00099     {
00100         UserFieldId    = Inherited::NextFieldId,
00101         SurfaceFieldId = UserFieldId    + 1,
00102         LeftFieldId    = SurfaceFieldId + 1,
00103         BottomFieldId  = LeftFieldId    + 1,
00104         NormalFieldId  = BottomFieldId  + 1,
00105         WidthFieldId   = NormalFieldId  + 1,
00106         HeightFieldId  = WidthFieldId   + 1,
00107         NextFieldId    = HeightFieldId  + 1
00108     };


Constructor & Destructor Documentation

ProjectionCameraDecoratorBase::ProjectionCameraDecoratorBase void   )  [protected]
 

Definition at line 231 of file OSGProjectionCameraDecoratorBase.cpp.

00231                                                                  :
00232     _sfUser                   (), 
00233     _mfSurface                (), 
00234     _sfLeft                   (), 
00235     _sfBottom                 (), 
00236     _sfNormal                 (), 
00237     _sfWidth                  (), 
00238     _sfHeight                 (), 
00239     Inherited() 
00240 {
00241 }

ProjectionCameraDecoratorBase::ProjectionCameraDecoratorBase const ProjectionCameraDecoratorBase source  )  [protected]
 

Definition at line 247 of file OSGProjectionCameraDecoratorBase.cpp.

00247                                                                                                         :
00248     _sfUser                   (source._sfUser                   ), 
00249     _mfSurface                (source._mfSurface                ), 
00250     _sfLeft                   (source._sfLeft                   ), 
00251     _sfBottom                 (source._sfBottom                 ), 
00252     _sfNormal                 (source._sfNormal                 ), 
00253     _sfWidth                  (source._sfWidth                  ), 
00254     _sfHeight                 (source._sfHeight                 ), 
00255     Inherited                 (source)
00256 {
00257 }

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

Definition at line 261 of file OSGProjectionCameraDecoratorBase.cpp.

00262 {
00263 }


Member Function Documentation

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

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 58 of file OSGProjectionCameraDecoratorBase.inl.

References _type.

Referenced by create().

00059 {
00060     return _type; 
00061 } 

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

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 65 of file OSGProjectionCameraDecoratorBase.inl.

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

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

FieldContainerType & ProjectionCameraDecoratorBase::getType void   )  [virtual]
 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 172 of file OSGProjectionCameraDecoratorBase.cpp.

References _type.

00173 {
00174     return _type; 
00175 } 

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

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 177 of file OSGProjectionCameraDecoratorBase.cpp.

References _type.

00178 {
00179     return _type;
00180 } 

UInt32 ProjectionCameraDecoratorBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 192 of file OSGProjectionCameraDecoratorBase.cpp.

00193 { 
00194     return sizeof(ProjectionCameraDecorator); 
00195 }

SFNodePtr * osg::ProjectionCameraDecoratorBase::getSFUser void   )  [inline]
 

Definition at line 101 of file OSGProjectionCameraDecoratorBase.inl.

References _sfUser.

00102 {
00103     return &_sfUser;
00104 }

MFPnt3f * osg::ProjectionCameraDecoratorBase::getMFSurface void   )  [inline]
 

Definition at line 108 of file OSGProjectionCameraDecoratorBase.inl.

References _mfSurface.

00109 {
00110     return &_mfSurface;
00111 }

SFReal32 * osg::ProjectionCameraDecoratorBase::getSFWidth void   )  [inline]
 

Definition at line 136 of file OSGProjectionCameraDecoratorBase.inl.

References _sfWidth.

00137 {
00138     return &_sfWidth;
00139 }

SFReal32 * osg::ProjectionCameraDecoratorBase::getSFHeight void   )  [inline]
 

Definition at line 143 of file OSGProjectionCameraDecoratorBase.inl.

References _sfHeight.

00144 {
00145     return &_sfHeight;
00146 }

NodePtr & osg::ProjectionCameraDecoratorBase::getUser void   )  [inline]
 

Definition at line 151 of file OSGProjectionCameraDecoratorBase.inl.

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

Referenced by osg::ProjectionCameraDecorator::getProjection(), osg::ProjectionCameraDecorator::getProjectionTranslation(), and osg::ProjectionCameraDecorator::getViewing().

00152 {
00153     return _sfUser.getValue();
00154 }

const NodePtr & osg::ProjectionCameraDecoratorBase::getUser void   )  const [inline]
 

Definition at line 158 of file OSGProjectionCameraDecoratorBase.inl.

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

00159 {
00160     return _sfUser.getValue();
00161 }

Real32 & osg::ProjectionCameraDecoratorBase::getWidth void   )  [inline]
 

Definition at line 235 of file OSGProjectionCameraDecoratorBase.inl.

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

Referenced by osg::ProjectionCameraDecorator::getProjection().

00236 {
00237     return _sfWidth.getValue();
00238 }

const Real32 & osg::ProjectionCameraDecoratorBase::getWidth void   )  const [inline]
 

Definition at line 242 of file OSGProjectionCameraDecoratorBase.inl.

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

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

Real32 & osg::ProjectionCameraDecoratorBase::getHeight void   )  [inline]
 

Definition at line 256 of file OSGProjectionCameraDecoratorBase.inl.

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

Referenced by osg::ProjectionCameraDecorator::getProjection().

00257 {
00258     return _sfHeight.getValue();
00259 }

const Real32 & osg::ProjectionCameraDecoratorBase::getHeight void   )  const [inline]
 

Definition at line 263 of file OSGProjectionCameraDecoratorBase.inl.

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

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

Pnt3f & osg::ProjectionCameraDecoratorBase::getSurface const UInt32  index  )  [inline]
 

Definition at line 278 of file OSGProjectionCameraDecoratorBase.inl.

References _mfSurface.

00279 {
00280     return _mfSurface[index];
00281 }

MFPnt3f & osg::ProjectionCameraDecoratorBase::getSurface void   )  [inline]
 

Definition at line 285 of file OSGProjectionCameraDecoratorBase.inl.

References _mfSurface.

Referenced by osg::ProjectionCameraDecorator::updateData().

00286 {
00287     return _mfSurface;
00288 }

const MFPnt3f & osg::ProjectionCameraDecoratorBase::getSurface void   )  const [inline]
 

Definition at line 292 of file OSGProjectionCameraDecoratorBase.inl.

References _mfSurface.

00293 {
00294     return _mfSurface;
00295 }

void osg::ProjectionCameraDecoratorBase::setUser const NodePtr value  )  [inline]
 

Definition at line 165 of file OSGProjectionCameraDecoratorBase.inl.

References _sfUser, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00166 {
00167     _sfUser.setValue(value);
00168 }

void osg::ProjectionCameraDecoratorBase::setWidth const Real32 value  )  [inline]
 

Definition at line 249 of file OSGProjectionCameraDecoratorBase.inl.

References _sfWidth, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00250 {
00251     _sfWidth.setValue(value);
00252 }

void osg::ProjectionCameraDecoratorBase::setHeight const Real32 value  )  [inline]
 

Definition at line 270 of file OSGProjectionCameraDecoratorBase.inl.

References _sfHeight, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00271 {
00272     _sfHeight.setValue(value);
00273 }

UInt32 ProjectionCameraDecoratorBase::getBinSize const BitVector whichField  )  [virtual]
 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 267 of file OSGProjectionCameraDecoratorBase.cpp.

References _mfSurface, _sfBottom, _sfHeight, _sfLeft, _sfNormal, _sfUser, _sfWidth, BottomFieldMask, osg::MField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::StereoCameraDecoratorBase::getBinSize(), HeightFieldMask, LeftFieldMask, osg::FieldBits::NoField, NormalFieldMask, SurfaceFieldMask, UserFieldMask, and WidthFieldMask.

00268 {
00269     UInt32 returnValue = Inherited::getBinSize(whichField);
00270 
00271     if(FieldBits::NoField != (UserFieldMask & whichField))
00272     {
00273         returnValue += _sfUser.getBinSize();
00274     }
00275 
00276     if(FieldBits::NoField != (SurfaceFieldMask & whichField))
00277     {
00278         returnValue += _mfSurface.getBinSize();
00279     }
00280 
00281     if(FieldBits::NoField != (LeftFieldMask & whichField))
00282     {
00283         returnValue += _sfLeft.getBinSize();
00284     }
00285 
00286     if(FieldBits::NoField != (BottomFieldMask & whichField))
00287     {
00288         returnValue += _sfBottom.getBinSize();
00289     }
00290 
00291     if(FieldBits::NoField != (NormalFieldMask & whichField))
00292     {
00293         returnValue += _sfNormal.getBinSize();
00294     }
00295 
00296     if(FieldBits::NoField != (WidthFieldMask & whichField))
00297     {
00298         returnValue += _sfWidth.getBinSize();
00299     }
00300 
00301     if(FieldBits::NoField != (HeightFieldMask & whichField))
00302     {
00303         returnValue += _sfHeight.getBinSize();
00304     }
00305 
00306 
00307     return returnValue;
00308 }

void ProjectionCameraDecoratorBase::copyToBin BinaryDataHandler pMem,
const BitVector whichField
[virtual]
 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 310 of file OSGProjectionCameraDecoratorBase.cpp.

References _mfSurface, _sfBottom, _sfHeight, _sfLeft, _sfNormal, _sfUser, _sfWidth, BottomFieldMask, osg::MField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::StereoCameraDecoratorBase::copyToBin(), HeightFieldMask, LeftFieldMask, osg::FieldBits::NoField, NormalFieldMask, SurfaceFieldMask, UserFieldMask, and WidthFieldMask.

00312 {
00313     Inherited::copyToBin(pMem, whichField);
00314 
00315     if(FieldBits::NoField != (UserFieldMask & whichField))
00316     {
00317         _sfUser.copyToBin(pMem);
00318     }
00319 
00320     if(FieldBits::NoField != (