#include <OSGCameraDecoratorBase.h>
Inheritance diagram for osg::CameraDecoratorBase:

Setup Rendering | |
| *virtual void | setup (DrawActionBase *action, const Viewport &port) |
| virtual void | setupProjection (DrawActionBase *action, const Viewport &port) |
| virtual void | draw (DrawAction *action, const Viewport &port) |
Access Parameters | |
| *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) |
| virtual void | getFrustum (FrustumVolume &result, const Viewport &port) |
| virtual void | getWorldToScreen (Matrix &result, const Viewport &port) |
Public Types | |
| typedef CameraDecoratorPtr | Ptr |
| enum | { DecorateeFieldId = Inherited::NextFieldId, NextFieldId = DecorateeFieldId + 1 } |
Public Member Functions | |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFCameraPtr * | getSFDecoratee (void) |
| SFNodePtr * | getSFBeacon (void) |
| SFReal32 * | getSFNear (void) |
| SFReal32 * | getSFFar (void) |
| CameraPtr & | getDecoratee (void) |
| const CameraPtr & | getDecoratee (void) const |
| NodePtr & | getBeacon (void) |
| const NodePtr & | getBeacon (void) const |
| Real32 & | getNear (void) |
| const Real32 & | getNear (void) const |
| Real32 & | getFar (void) |
| const Real32 & | getFar (void) const |
Field Set | |
| *void | setDecoratee (const CameraPtr &value) |
| void | setBeacon (const NodePtr &value) |
| void | setNear (const Real32 &value) |
| void | setFar (const Real32 &value) |
Binary Access | |
| *virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
transformation | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
dump | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
Static Public Member Functions | |
Class Get | |
| *static FieldContainerType & | getClassType (void) |
| access the type of the class | |
| static UInt32 | getClassTypeId (void) |
| access the numerical type of the class | |
Class Get | |
| *static const char * | getClassname (void) |
Static Public Attributes | |
| static const osg::BitVector | DecorateeFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| 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 | |
| * | CameraDecoratorBase (void) |
| CameraDecoratorBase (const CameraDecoratorBase &source) | |
Destructors | |
| *virtual | ~CameraDecoratorBase (void) |
Sync | |
| *void | executeSyncImpl (CameraDecoratorBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Protected Attributes | |
Fields | |
| *SFCameraPtr | _sfDecoratee |
Private Types | |
| typedef Camera | Inherited |
Private Member Functions | |
| void | operator= (const CameraDecoratorBase &source) |
Static Private Attributes | |
| static FieldDescription * | _desc [] |
| CameraDecorator description. | |
| static FieldContainerType | _type |
Friends | |
| class | FieldContainer |
Definition at line 81 of file OSGCameraDecoratorBase.h.
|
|
Reimplemented from osg::Camera. Reimplemented in osg::CameraDecorator, osg::MatrixCameraDecorator, osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecorator, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecorator, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecorator, osg::StereoCameraDecoratorBase, osg::TileCameraDecorator, and osg::TileCameraDecoratorBase. Definition at line 85 of file OSGCameraDecoratorBase.h. |
|
|
Reimplemented from osg::CameraBase. Reimplemented in osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecoratorBase, and osg::TileCameraDecoratorBase. Definition at line 90 of file OSGCameraDecoratorBase.h. |
|
|
Reimplemented from osg::CameraBase. Definition at line 92 of file OSGCameraDecoratorBase.h. 00093 { 00094 DecorateeFieldId = Inherited::NextFieldId, 00095 NextFieldId = DecorateeFieldId + 1 00096 };
|
|
|
Definition at line 153 of file OSGCameraDecoratorBase.cpp. 00153 : 00154 _sfDecoratee(), 00155 Inherited() 00156 { 00157 }
|
|
|
Definition at line 163 of file OSGCameraDecoratorBase.cpp. 00163 : 00164 _sfDecoratee(source._sfDecoratee), 00165 Inherited (source) 00166 { 00167 }
|
|
|
Definition at line 171 of file OSGCameraDecoratorBase.cpp.
|
|
|
Reimplemented from osg::CameraBase. Reimplemented in osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecoratorBase, and osg::TileCameraDecoratorBase. Definition at line 58 of file OSGCameraDecoratorBase.inl. References _type. 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::CameraBase. Reimplemented in osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecoratorBase, and osg::TileCameraDecoratorBase. Definition at line 65 of file OSGCameraDecoratorBase.inl. References _type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::CameraBase. Reimplemented in osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecoratorBase, and osg::TileCameraDecoratorBase. Definition at line 104 of file OSGCameraDecoratorBase.cpp. References _type. 00105 { 00106 return _type; 00107 }
|
|
|
Reimplemented from osg::CameraBase. Reimplemented in osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecoratorBase, and osg::TileCameraDecoratorBase. Definition at line 109 of file OSGCameraDecoratorBase.cpp. References _type. 00110 { 00111 return _type; 00112 }
|
|
|
Reimplemented from osg::CameraBase. Reimplemented in osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecoratorBase, and osg::TileCameraDecoratorBase. Definition at line 115 of file OSGCameraDecoratorBase.cpp. 00116 { 00117 return sizeof(CameraDecorator); 00118 }
|
|
|
Definition at line 74 of file OSGCameraDecoratorBase.inl. References _sfDecoratee. 00075 { 00076 return &_sfDecoratee; 00077 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 98 of file OSGCameraDecoratorBase.inl. References getDecoratee(). 00099 { 00100 return getDecoratee()->getSFBeacon(); 00101 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 104 of file OSGCameraDecoratorBase.inl. References getDecoratee(). 00105 { 00106 return getDecoratee()->getSFNear(); 00107 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 110 of file OSGCameraDecoratorBase.inl. References getDecoratee(). 00111 { 00112 return getDecoratee()->getSFFar(); 00113 }
|
|
|
|
Definition at line 86 of file OSGCameraDecoratorBase.inl. References _sfDecoratee, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00087 { 00088 return _sfDecoratee.getValue(); 00089 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 117 of file OSGCameraDecoratorBase.inl. References getDecoratee(). 00118 { 00119 return getDecoratee()->getBeacon(); 00120 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 123 of file OSGCameraDecoratorBase.inl. References getDecoratee(). 00124 { 00125 return getDecoratee()->getBeacon(); 00126 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 137 of file OSGCameraDecoratorBase.inl. References getDecoratee(). 00138 { 00139 return getDecoratee()->getNear(); 00140 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 143 of file OSGCameraDecoratorBase.inl. References getDecoratee(). 00144 { 00145 return getDecoratee()->getNear(); 00146 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 157 of file OSGCameraDecoratorBase.inl. References getDecoratee(). 00158 { 00159 return getDecoratee()->getFar(); 00160 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 163 of file OSGCameraDecoratorBase.inl. References getDecoratee(). 00164 { 00165 return getDecoratee()->getFar(); 00166 }
|
|
|
Definition at line 92 of file OSGCameraDecoratorBase.inl. References _sfDecoratee, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00093 { 00094 _sfDecoratee.setValue(value); 00095 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 129 of file OSGCameraDecoratorBase.inl. References osg::CameraBase::BeaconFieldMask, osg::beginEditCP(), osg::endEditCP(), and getDecoratee(). 00130 { 00131 beginEditCP(getDecoratee(), BeaconFieldMask); 00132 getDecoratee()->setBeacon(value); 00133 endEditCP (getDecoratee(), BeaconFieldMask); 00134 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 149 of file OSGCameraDecoratorBase.inl. References osg::beginEditCP(), osg::endEditCP(), getDecoratee(), and osg::CameraBase::NearFieldMask. 00150 { 00151 beginEditCP(getDecoratee(), NearFieldMask); 00152 getDecoratee()->setNear(value); 00153 endEditCP (getDecoratee(), NearFieldMask); 00154 }
|
|
|
Reimplemented from osg::CameraBase. Definition at line 169 of file OSGCameraDecoratorBase.inl. References osg::beginEditCP(), osg::endEditCP(), osg::CameraBase::FarFieldMask, and getDecoratee(). 00170 { 00171 beginEditCP(getDecoratee(), FarFieldMask); 00172 getDecoratee()->setFar(value); 00173 endEditCP (getDecoratee(), FarFieldMask); 00174 }
|
|
|
Reimplemented from osg::CameraBase. Reimplemented in osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecoratorBase, and osg::TileCameraDecoratorBase. Definition at line 177 of file OSGCameraDecoratorBase.cpp. References _sfDecoratee, DecorateeFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::CameraBase::getBinSize(), and osg::FieldBits::NoField. Referenced by osg::TileCameraDecoratorBase::getBinSize(), osg::StereoCameraDecoratorBase::getBinSize(), and osg::MatrixCameraDecoratorBase::getBinSize(). 00178 { 00179 UInt32 returnValue = Inherited::getBinSize(whichField); 00180 00181 if(FieldBits::NoField != (DecorateeFieldMask & whichField)) 00182 { 00183 returnValue += _sfDecoratee.getBinSize(); 00184 } 00185 00186 return returnValue; 00187 }
|
|
||||||||||||
|
Reimplemented from osg::CameraBase. Reimplemented in osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecoratorBase, and osg::TileCameraDecoratorBase. Definition at line 189 of file OSGCameraDecoratorBase.cpp. References _sfDecoratee, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::CameraBase::copyToBin(), DecorateeFieldMask, and osg::FieldBits::NoField. Referenced by osg::TileCameraDecoratorBase::copyToBin(), osg::StereoCameraDecoratorBase::copyToBin(), and osg::MatrixCameraDecoratorBase::copyToBin(). 00191 { 00192 Inherited::copyToBin(pMem, whichField); 00193 00194 if(FieldBits::NoField != (DecorateeFieldMask & whichField)) 00195 { 00196 _sfDecoratee.copyToBin(pMem); 00197 } 00198 00199 }
|
|
||||||||||||
|
Reimplemented from osg::CameraBase. Reimplemented in osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecoratorBase, and osg::TileCameraDecoratorBase. Definition at line 201 of file OSGCameraDecoratorBase.cpp. References _sfDecoratee, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::CameraBase::copyFromBin(), DecorateeFieldMask, and osg::FieldBits::NoField. Referenced by osg::TileCameraDecoratorBase::copyFromBin(), osg::StereoCameraDecoratorBase::copyFromBin(), and osg::MatrixCameraDecoratorBase::copyFromBin(). 00203 { 00204 Inherited::copyFromBin(pMem, whichField); 00205 00206 if(FieldBits::NoField != (DecorateeFieldMask & whichField)) 00207 { 00208 _sfDecoratee.copyFromBin(pMem); 00209 } 00210 00211 }
|
|
||||||||||||
|
Definition at line 214 of file OSGCameraDecoratorBase.cpp. References _sfDecoratee, DecorateeFieldMask, osg::CameraBase::executeSyncImpl(), osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by executeSync(), osg::TileCameraDecoratorBase::executeSyncImpl(), osg::StereoCameraDecoratorBase::executeSyncImpl(), and osg::MatrixCameraDecoratorBase::executeSyncImpl(). 00216 { 00217 00218 Inherited::executeSyncImpl(pOther, whichField); 00219 00220 if(FieldBits::NoField != (DecorateeFieldMask & whichField)) 00221 { 00222 _sfDecoratee.syncWith(pOther->_sfDecoratee); 00223 } 00224 00225 }
|
|
||||||||||||
|
Reimplemented from osg::CameraBase. Reimplemented in osg::MatrixCameraDecoratorBase, osg::ProjectionCameraDecoratorBase, osg::ShearedStereoCameraDecoratorBase, osg::StereoCameraDecoratorBase, and osg::TileCameraDecoratorBase. Definition at line 122 of file OSGCameraDecoratorBase.cpp. References executeSyncImpl(). 00124 { 00125 this->executeSyncImpl((CameraDecoratorBase *) &other, whichField); 00126 }
|
|
|
|
|
|
Reimplemented in osg::MatrixCamera, osg::OffCenterPerspectiveCamera, osg::PerspectiveCamera, and osg::TileCameraDecorator. Definition at line 73 of file OSGCamera.h.
|
|
||||||||||||
|
Reimplemented from osg::AttachmentContainer. Reimplemented in osg::CameraDecorator, osg::MatrixCamera, osg::MatrixCameraDecorator, osg::OffCenterPerspectiveCamera, osg::PerspectiveCamera, osg::ProjectionCameraDecorator, osg::ShearedStereoCameraDecorator, osg::StereoCameraDecorator, and osg::TileCameraDecorator. Definition at line 98 of file OSGCamera.cpp. References osg::AttachmentContainer::changed(). Referenced by osg::PerspectiveCamera::changed(), osg::MatrixCamera::changed(), and osg::CameraDecorator::changed(). 00099 { 00100 Inherited::changed(whichField, origin); 00101 }
|
|
||||||||||||
|
Setup OpenGL for rendering, call all the necessary commands to start rendering with this camera. Definition at line 109 of file OSGCamera.cpp. References osg::Viewport::getPixelHeight(), osg::Viewport::getPixelWidth(), osg::Camera::getProjection(), osg::Camera::getProjectionTranslation(), osg::TransformationMatrix< ValueTypeT >::getValues(), osg::Camera::getViewing(), and osg::TransformationMatrix< ValueTypeT >::mult(). 00111 { 00112 Matrix m, t; 00113 00114 // set the projection 00115 00116 getProjection ( m, port.getPixelWidth(), port.getPixelHeight() ); 00117 getProjectionTranslation( t, port.getPixelWidth(), port.getPixelHeight() ); 00118 00119 m.mult(t); 00120 00121 //SDEBUG << "Projection matrix: " << m << std::endl; 00122 00123 glMatrixMode( GL_PROJECTION ); 00124 glLoadMatrixf( m.getValues() ); 00125 00126 // set the viewing 00127 00128 getViewing( m, port.getPixelWidth(), port.getPixelHeight() ); 00129 00130 //SDEBUG << "Viewing matrix: " << m << std::endl; 00131 00132 glMatrixMode( GL_MODELVIEW ); 00133 glLoadMatrixf( m.getValues() ); 00134 }
|
|
||||||||||||
|
Setup OpenGL projection for rendering. Definition at line 138 of file OSGCamera.cpp. References osg::Viewport::getPixelHeight(), osg::Viewport::getPixelWidth(), osg::Camera::getProjection(), osg::Camera::getProjectionTranslation(), osg::TransformationMatrix< ValueTypeT >::getValues(), and osg::TransformationMatrix< ValueTypeT >::mult(). Referenced by osg::RenderAction::start(). 00140 { 00141 Matrix m, t; 00142 00143 // set the projection 00144 00145 getProjection ( m, port.getPixelWidth(), port.getPixelHeight() ); 00146 getProjectionTranslation( t, port.getPixelWidth(), port.getPixelHeight() ); 00147 00148 m.mult(t); 00149 00150 //SDEBUG << "Projection matrix: " << m << std::endl; 00151 00152 glMatrixMode( GL_PROJECTION ); 00153 glLoadMatrixf( m.getValues() ); 00154 }
|
|
||||||||||||
|
Draw the camera's geometry (if any). Usually there is none. Reimplemented in osg::CameraDecorator, osg::MatrixCamera, osg::OffCenterPerspectiveCamera, and osg::PerspectiveCamera. Definition at line 158 of file OSGCamera.cpp.
|
|
||||||||||||||||
|
Get/calculate the projection matrix for this camera. Reimplemented in osg::CameraDecorator, osg::MatrixCamera, osg::MatrixCameraDecorator, osg::OffCenterPerspectiveCamera, osg::PerspectiveCamera, osg::ProjectionCameraDecorator, osg::ShearedStereoCameraDecorator, and osg::TileCameraDecorator. Definition at line 165 of file OSGCamera.cpp. References SFATAL. Referenced by osg::Camera::calcViewRay(), osg::SkyBackground::clear(), osg::DVRIsoShader::getCoveredScreenRect(), osg::Camera::getFrustum(), osg::Camera::getWorldToScreen(), osg::Camera::setup(), and osg::Camera::setupProjection(). 00168 { 00169 SFATAL << "Camera::getProjection: NIY" << std::endl; 00170 abort(); 00171 }
|
|
||||||||||||||||
|
Get/calculate the projection translation matrix for this camera. The default is identity. Reimplemented in osg::CameraDecorator, osg::MatrixCameraDecorator, and osg::ProjectionCameraDecorator. Definition at line 176 of file OSGCamera.cpp. References osg::TransformationMatrix< ValueTypeT >::setIdentity(). Referenced by osg::Camera::calcViewRay(), osg::SkyBackground::clear(), osg::DVRIsoShader::getCoveredScreenRect(), osg::Camera::getFrustum(), osg::Camera::getWorldToScreen(), osg::Camera::setup(), and osg::Camera::setupProjection(). 00179 { 00180 result.setIdentity(); 00181 }
|
|
||||||||||||||||
|
Get/calculate the viewing matrix for this camera. This is the inverse of the beacon's toWorld transformation. Reimplemented in osg::CameraDecorator, osg::MatrixCamera, osg::MatrixCameraDecorator, and osg::ProjectionCameraDecorator. Definition at line 186 of file OSGCamera.cpp. References osg::CameraBase::getBeacon(), osg::TransformationMatrix< ValueTypeT >::invert(), osg::NullFC, and SWARNING. Referenced by osg::TextureTransformChunk::activate(), osg::TexGenChunk::activate(), osg::Camera::calcViewRay(), osg::TextureTransformChunk::changeFrom(), osg::TexGenChunk::changeFrom(), osg::SkyBackground::clear(), osg::Camera::getFrustum(), osg::Camera::getWorldToScreen(), osg::Camera::setup(), osg::RenderAction::start(), osg::DrawActionBase::start(), osg::SHLChunk::updateCameraOrientation(), osg::SHLChunk::updateCameraPosition(), osg::SHLChunk::updateInvViewMatrix(), and osg::SHLChu |