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

osg::ShearedStereoCameraDecoratorBase Class Reference

ShearedStereoCameraDecorator Base Class.

#include <OSGShearedStereoCameraDecoratorBase.h>

Inheritance diagram for osg::ShearedStereoCameraDecoratorBase:

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

Public Types

typedef ShearedStereoCameraDecoratorPtr Ptr
enum  { ZeroParallaxDistanceFieldId = Inherited::NextFieldId, OverlapFieldId = ZeroParallaxDistanceFieldId + 1, NextFieldId = OverlapFieldId + 1 }

Public Member Functions

Intersection Helper
*bool calcViewRay (Line &line, Int32 x, Int32 y, const Viewport &port)
Intersection Helper
*bool calcViewRay (Line &line, Int32 x, Int32 y, const Viewport &port)
FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFReal32getSFZeroParallaxDistance (void)
 Get the ShearedStereoCameraDecorator::_sfZeroParallaxDistance field.
SFReal32getSFOverlap (void)
 Get the ShearedStereoCameraDecorator::_sfOverlap field.
Real32getZeroParallaxDistance (void)
 Get the value of the ShearedStereoCameraDecorator::_sfZeroParallaxDistance field.
const Real32getZeroParallaxDistance (void) const
 Get the value of the ShearedStereoCameraDecorator::_sfZeroParallaxDistance field.
Real32getOverlap (void)
 Get the value of the ShearedStereoCameraDecorator::_sfOverlap field.
const Real32getOverlap (void) const
 Get the value of the ShearedStereoCameraDecorator::_sfOverlap field.
Field Set
*void setZeroParallaxDistance (const Real32 &value)
 Set the value of the ShearedStereoCameraDecorator::_sfZeroParallaxDistance field.
void setOverlap (const Real32 &value)
 Set the value of the ShearedStereoCameraDecorator::_sfOverlap 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)
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 const char * getClassname (void)
Class Get
*static const char * getClassname (void)
Class Get
*static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
Construction
*static ShearedStereoCameraDecoratorPtr create (void)
 create a new instance of the class
static ShearedStereoCameraDecoratorPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype
Class Get
*static const char * getClassname (void)
Class Get
*static const char * getClassname (void)

Static Public Attributes

static const osg::BitVector ZeroParallaxDistanceFieldMask
static const osg::BitVector OverlapFieldMask
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

Sync
*void executeSyncImpl (CameraBase *pOther, const BitVector &whichField)
Sync
*void executeSyncImpl (CameraBase *pOther, const BitVector &whichField)
Constructors
ShearedStereoCameraDecoratorBase (void)
 ShearedStereoCameraDecoratorBase (const ShearedStereoCameraDecoratorBase &source)
Destructors
*virtual ~ShearedStereoCameraDecoratorBase (void)
Sync
*void executeSyncImpl (ShearedStereoCameraDecoratorBase *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)
Sync
*void executeSyncImpl (CameraDecoratorBase *pOther, const BitVector &whichField)
Sync
*void executeSyncImpl (CameraBase *pOther, const BitVector &whichField)

Protected Attributes

Fields
*SFNodePtr _sfBeacon
SFReal32 _sfNear
SFReal32 _sfFar
Fields
*SFNodePtr _sfBeacon
SFReal32 _sfNear
SFReal32 _sfFar
Fields
*SFReal32 _sfZeroParallaxDistance
SFReal32 _sfOverlap
Fields
*SFBool _sfLeftEye
SFReal32 _sfEyeSeparation
Fields
*SFCameraPtr _sfDecoratee
Fields
*SFNodePtr _sfBeacon
SFReal32 _sfNear
SFReal32 _sfFar
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 ShearedStereoCameraDecoratorBase &source)

Static Private Attributes

static FieldDescription_desc []
 ShearedStereoCameraDecorator description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 82 of file OSGShearedStereoCameraDecoratorBase.h.


Member Typedef Documentation

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

Reimplemented from osg::StereoCameraDecorator.

Reimplemented in osg::ShearedStereoCameraDecorator.

Definition at line 86 of file OSGShearedStereoCameraDecoratorBase.h.

typedef ShearedStereoCameraDecoratorPtr osg::ShearedStereoCameraDecoratorBase::Ptr
 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 91 of file OSGShearedStereoCameraDecoratorBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
ZeroParallaxDistanceFieldId 
OverlapFieldId 
NextFieldId 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 93 of file OSGShearedStereoCameraDecoratorBase.h.

00094     {
00095         ZeroParallaxDistanceFieldId = Inherited::NextFieldId,
00096         OverlapFieldId              = ZeroParallaxDistanceFieldId + 1,
00097         NextFieldId                 = OverlapFieldId              + 1
00098     };


Constructor & Destructor Documentation

ShearedStereoCameraDecoratorBase::ShearedStereoCameraDecoratorBase void   )  [protected]
 

Definition at line 175 of file OSGShearedStereoCameraDecoratorBase.cpp.

00175                                                                        :
00176     _sfZeroParallaxDistance   (Real32(1)), 
00177     _sfOverlap                (Real32(1)), 
00178     Inherited() 
00179 {
00180 }

ShearedStereoCameraDecoratorBase::ShearedStereoCameraDecoratorBase const ShearedStereoCameraDecoratorBase source  )  [protected]
 

Definition at line 186 of file OSGShearedStereoCameraDecoratorBase.cpp.

00186                                                                                                                  :
00187     _sfZeroParallaxDistance   (source._sfZeroParallaxDistance   ), 
00188     _sfOverlap                (source._sfOverlap                ), 
00189     Inherited                 (source)
00190 {
00191 }

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

Definition at line 195 of file OSGShearedStereoCameraDecoratorBase.cpp.

00196 {
00197 }


Member Function Documentation

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

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 58 of file OSGShearedStereoCameraDecoratorBase.inl.

References _type.

Referenced by create().

00059 {
00060     return _type; 
00061 } 

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

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 65 of file OSGShearedStereoCameraDecoratorBase.inl.

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

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

FieldContainerType & ShearedStereoCameraDecoratorBase::getType void   )  [virtual]
 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 117 of file OSGShearedStereoCameraDecoratorBase.cpp.

References _type.

00118 {
00119     return _type; 
00120 } 

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

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 122 of file OSGShearedStereoCameraDecoratorBase.cpp.

References _type.

00123 {
00124     return _type;
00125 } 

UInt32 ShearedStereoCameraDecoratorBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 137 of file OSGShearedStereoCameraDecoratorBase.cpp.

00138 { 
00139     return sizeof(ShearedStereoCameraDecorator); 
00140 }

SFReal32 * osg::ShearedStereoCameraDecoratorBase::getSFZeroParallaxDistance void   )  [inline]
 

Definition at line 101 of file OSGShearedStereoCameraDecoratorBase.inl.

References _sfZeroParallaxDistance.

00102 {
00103     return &_sfZeroParallaxDistance;
00104 }

SFReal32 * osg::ShearedStereoCameraDecoratorBase::getSFOverlap void   )  [inline]
 

Definition at line 108 of file OSGShearedStereoCameraDecoratorBase.inl.

References _sfOverlap.

00109 {
00110     return &_sfOverlap;
00111 }

Real32 & osg::ShearedStereoCameraDecoratorBase::getZeroParallaxDistance void   )  [inline]
 

Definition at line 116 of file OSGShearedStereoCameraDecoratorBase.inl.

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

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

00117 {
00118     return _sfZeroParallaxDistance.getValue();
00119 }

const Real32 & osg::ShearedStereoCameraDecoratorBase::getZeroParallaxDistance void   )  const [inline]
 

Definition at line 123 of file OSGShearedStereoCameraDecoratorBase.inl.

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

00124 {
00125     return _sfZeroParallaxDistance.getValue();
00126 }

Real32 & osg::ShearedStereoCameraDecoratorBase::getOverlap void   )  [inline]
 

Definition at line 137 of file OSGShearedStereoCameraDecoratorBase.inl.

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

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

00138 {
00139     return _sfOverlap.getValue();
00140 }

const Real32 & osg::ShearedStereoCameraDecoratorBase::getOverlap void   )  const [inline]
 

Definition at line 144 of file OSGShearedStereoCameraDecoratorBase.inl.

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

00145 {
00146     return _sfOverlap.getValue();
00147 }

void osg::ShearedStereoCameraDecoratorBase::setZeroParallaxDistance const Real32 value  )  [inline]
 

Definition at line 130 of file OSGShearedStereoCameraDecoratorBase.inl.

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

00131 {
00132     _sfZeroParallaxDistance.setValue(value);
00133 }

void osg::ShearedStereoCameraDecoratorBase::setOverlap const Real32 value  )  [inline]
 

Definition at line 151 of file OSGShearedStereoCameraDecoratorBase.inl.

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

00152 {
00153     _sfOverlap.setValue(value);
00154 }

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

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 201 of file OSGShearedStereoCameraDecoratorBase.cpp.

References _sfOverlap, _sfZeroParallaxDistance, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::StereoCameraDecoratorBase::getBinSize(), osg::FieldBits::NoField, OverlapFieldMask, and ZeroParallaxDistanceFieldMask.

00202 {
00203     UInt32 returnValue = Inherited::getBinSize(whichField);
00204 
00205     if(FieldBits::NoField != (ZeroParallaxDistanceFieldMask & whichField))
00206     {
00207         returnValue += _sfZeroParallaxDistance.getBinSize();
00208     }
00209 
00210     if(FieldBits::NoField != (OverlapFieldMask & whichField))
00211     {
00212         returnValue += _sfOverlap.getBinSize();
00213     }
00214 
00215 
00216     return returnValue;
00217 }

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

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 219 of file OSGShearedStereoCameraDecoratorBase.cpp.

References _sfOverlap, _sfZeroParallaxDistance, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::StereoCameraDecoratorBase::copyToBin(), osg::FieldBits::NoField, OverlapFieldMask, and ZeroParallaxDistanceFieldMask.

00221 {
00222     Inherited::copyToBin(pMem, whichField);
00223 
00224     if(FieldBits::NoField != (ZeroParallaxDistanceFieldMask & whichField))
00225     {
00226         _sfZeroParallaxDistance.copyToBin(pMem);
00227     }
00228 
00229     if(FieldBits::NoField != (OverlapFieldMask & whichField))
00230     {
00231         _sfOverlap.copyToBin(pMem);
00232     }
00233 
00234 
00235 }

void ShearedStereoCameraDecoratorBase::copyFromBin BinaryDataHandler pMem,
const BitVector whichField
[virtual]
 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition at line 237 of file OSGShearedStereoCameraDecoratorBase.cpp.

References _sfOverlap, _sfZeroParallaxDistance, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::StereoCameraDecoratorBase::copyFromBin(), osg::FieldBits::NoField, OverlapFieldMask, and ZeroParallaxDistanceFieldMask.

00239 {
00240     Inherited::copyFromBin(pMem, whichField);
00241 
00242     if(FieldBits::NoField != (ZeroParallaxDistanceFieldMask & whichField))
00243     {
00244         _sfZeroParallaxDistance.copyFromBin(pMem);
00245     }
00246 
00247     if(FieldBits::NoField != (OverlapFieldMask & whichField))
00248     {
00249         _sfOverlap.copyFromBin(pMem);
00250     }
00251 
00252 
00253 }

ShearedStereoCameraDecoratorPtr osg::ShearedStereoCameraDecoratorBase::create void   )  [inline, static]
 

Definition at line 72 of file OSGShearedStereoCameraDecoratorBase.inl.

References osg::AttachmentContainerPtr::dcast(), getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and shallowCopy().

00073 {
00074     ShearedStereoCameraDecoratorPtr fc; 
00075 
00076     if(getClassType().getPrototype() != OSG::NullFC) 
00077     {
00078         fc = ShearedStereoCameraDecoratorPtr::dcast(
00079             getClassType().getPrototype()-> shallowCopy()); 
00080     }
00081     
00082     return fc; 
00083 }

ShearedStereoCameraDecoratorPtr osg::ShearedStereoCameraDecoratorBase::createEmpty void   )  [inline, static]
 

Definition at line 87 of file OSGShearedStereoCameraDecoratorBase.inl.

References osg::FieldContainer::newPtr().

00088 { 
00089     ShearedStereoCameraDecoratorPtr returnValue; 
00090     
00091     newPtr(returnValue); 
00092 
00093     return returnValue; 
00094 }

FieldContainerPtr ShearedStereoCameraDecoratorBase::shallowCopy void   )  const [virtual]
 

Implements osg::FieldContainer.

Definition at line 128 of file OSGShearedStereoCameraDecoratorBase.cpp.

References osg::FieldContainer::newPtr().

Referenced by create().

00129 { 
00130     ShearedStereoCameraDecoratorPtr returnValue; 
00131 
00132     newPtr(returnValue, dynamic_cast<const ShearedStereoCameraDecorator *>(this)); 
00133 
00134     return returnValue; 
00135 }

void ShearedStereoCameraDecoratorBase::executeSyncImpl ShearedStereoCameraDecoratorBase pOther,
const BitVector whichField
[protected]
 

Definition at line 256 of file OSGShearedStereoCameraDecoratorBase.cpp.

References _sfOverlap, _sfZeroParallaxDistance, osg::StereoCameraDecoratorBase::executeSyncImpl(), osg::FieldBits::NoField, OverlapFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::syncWith(), and ZeroParallaxDistanceFieldMask.

Referenced by executeSync().

00258 {
00259 
00260     Inherited::executeSyncImpl(pOther, whichField);
00261 
00262     if(FieldBits::NoField != (ZeroParallaxDistanceFieldMask & whichField))
00263         _sfZeroParallaxDistance.syncWith(pOther->_sfZeroParallaxDistance);
00264 
00265     if(FieldBits::NoField != (OverlapFieldMask & whichField))
00266         _sfOverlap.syncWith(pOther->_sfOverlap);
00267 
00268 
00269 }

void ShearedStereoCameraDecoratorBase::executeSync FieldContainer other,
const BitVector whichField
[protected, virtual]
 

Reimplemented from osg::StereoCameraDecoratorBase.

Definition a