#include <OSGOffCenterPerspectiveCameraBase.h>
Inheritance diagram for osg::OffCenterPerspectiveCameraBase:

Public Types | |
| typedef OffCenterPerspectiveCameraPtr | Ptr |
| enum | { PrincipalPointFieldId = Inherited::NextFieldId, NextFieldId = PrincipalPointFieldId + 1 } |
Public Member Functions | |
Intersection Helper | |
| *bool | calcViewRay (Line &line, Int32 x, Int32 y, const Viewport &port) |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFVec2f * | getSFPrincipalPoint (void) |
| Get the OffCenterPerspectiveCamera::_sfPrincipalPoint field. | |
| Vec2f & | getPrincipalPoint (void) |
| Get the value of the OffCenterPerspectiveCamera::_sfPrincipalPoint field. | |
| const Vec2f & | getPrincipalPoint (void) const |
| Get the value of the OffCenterPerspectiveCamera::_sfPrincipalPoint field. | |
Field Set | |
| *void | setPrincipalPoint (const Vec2f &value) |
| Set the value of the OffCenterPerspectiveCamera::_sfPrincipalPoint 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 |
transformation | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
your_category | |
| *virtual void | draw (DrawAction *action, const Viewport &port) |
| virtual void | getProjection (Matrix &result, UInt32 width, UInt32 height) |
dump | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
Field Get | |
| *SFReal32 * | getSFFov (void) |
| Get the PerspectiveCamera::_sfFov field. | |
| SFReal32 * | getSFAspect (void) |
| Get the PerspectiveCamera::_sfAspect field. | |
| Real32 & | getFov (void) |
| Get the value of the PerspectiveCamera::_sfFov field. | |
| const Real32 & | getFov (void) const |
| Get the value of the PerspectiveCamera::_sfFov field. | |
| Real32 & | getAspect (void) |
| Get the value of the PerspectiveCamera::_sfAspect field. | |
| const Real32 & | getAspect (void) const |
| Get the value of the PerspectiveCamera::_sfAspect field. | |
Field Set | |
| *void | setFov (const Real32 &value) |
| Set the value of the PerspectiveCamera::_sfFov field. | |
| void | setAspect (const Real32 &value) |
| Set the value of the PerspectiveCamera::_sfAspect field. | |
Setup Rendering | |
| *virtual void | setup (DrawActionBase *action, const Viewport &port) |
| virtual void | setupProjection (DrawActionBase *action, const Viewport &port) |
Access Parameters | |
| 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) |
Intersection Helper | |
| *bool | calcViewRay (Line &line, Int32 x, Int32 y, const Viewport &port) |
Field Get | |
| *virtual SFNodePtr * | getSFBeacon (void) |
| virtual SFReal32 * | getSFNear (void) |
| virtual SFReal32 * | getSFFar (void) |
| virtual NodePtr & | getBeacon (void) |
| virtual const NodePtr & | getBeacon (void) const |
| virtual Real32 & | getNear (void) |
| virtual const Real32 & | getNear (void) const |
| virtual Real32 & | getFar (void) |
| virtual const Real32 & | getFar (void) const |
Field Set | |
| *virtual void | setBeacon (const NodePtr &value) |
| virtual void | setNear (const Real32 &value) |
| virtual void | setFar (const Real32 &value) |
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 | |
Construction | |
| *static OffCenterPerspectiveCameraPtr | create (void) |
| create a new instance of the class | |
| static OffCenterPerspectiveCameraPtr | 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 | PrincipalPointFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const osg::BitVector | FovFieldMask |
| static const osg::BitVector | AspectFieldMask |
| 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) |
Constructors | |
| * | OffCenterPerspectiveCameraBase (void) |
| OffCenterPerspectiveCameraBase (const OffCenterPerspectiveCameraBase &source) | |
Destructors | |
| *virtual | ~OffCenterPerspectiveCameraBase (void) |
Sync | |
| *void | executeSyncImpl (OffCenterPerspectiveCameraBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (PerspectiveCameraBase *pOther, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (CameraBase *pOther, const BitVector &whichField) |
Protected Attributes | |
Fields | |
| *SFNodePtr | _sfBeacon |
| SFReal32 | _sfNear |
| SFReal32 | _sfFar |
Fields | |
| *SFVec2f | _sfPrincipalPoint |
Fields | |
| *SFReal32 | _sfFov |
| SFReal32 | _sfAspect |
Fields | |
| *SFNodePtr | _sfBeacon |
| SFReal32 | _sfNear |
| SFReal32 | _sfFar |
Private Types | |
| typedef PerspectiveCamera | Inherited |
Private Member Functions | |
| void | operator= (const OffCenterPerspectiveCameraBase &source) |
Static Private Attributes | |
| static FieldDescription * | _desc [] |
| OffCenterPerspectiveCamera description. | |
| static FieldContainerType | _type |
Friends | |
| class | FieldContainer |
Definition at line 81 of file OSGOffCenterPerspectiveCameraBase.h.
|
|
Reimplemented from osg::PerspectiveCamera. Reimplemented in osg::OffCenterPerspectiveCamera. Definition at line 85 of file OSGOffCenterPerspectiveCameraBase.h. |
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 90 of file OSGOffCenterPerspectiveCameraBase.h. |
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 92 of file OSGOffCenterPerspectiveCameraBase.h. 00093 { 00094 PrincipalPointFieldId = Inherited::NextFieldId, 00095 NextFieldId = PrincipalPointFieldId + 1 00096 };
|
|
|
Definition at line 159 of file OSGOffCenterPerspectiveCameraBase.cpp. 00159 : 00160 _sfPrincipalPoint (Vec2f(0,0)), 00161 Inherited() 00162 { 00163 }
|
|
|
Definition at line 169 of file OSGOffCenterPerspectiveCameraBase.cpp. 00169 : 00170 _sfPrincipalPoint (source._sfPrincipalPoint ), 00171 Inherited (source) 00172 { 00173 }
|
|
|
Definition at line 177 of file OSGOffCenterPerspectiveCameraBase.cpp.
|
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 58 of file OSGOffCenterPerspectiveCameraBase.inl. References _type. Referenced by create(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 65 of file OSGOffCenterPerspectiveCameraBase.inl. References _type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 106 of file OSGOffCenterPerspectiveCameraBase.cpp. References _type. 00107 { 00108 return _type; 00109 }
|
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 111 of file OSGOffCenterPerspectiveCameraBase.cpp. References _type. 00112 { 00113 return _type; 00114 }
|
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 126 of file OSGOffCenterPerspectiveCameraBase.cpp. 00127 { 00128 return sizeof(OffCenterPerspectiveCamera); 00129 }
|
|
|
Definition at line 101 of file OSGOffCenterPerspectiveCameraBase.inl. References _sfPrincipalPoint. 00102 { 00103 return &_sfPrincipalPoint; 00104 }
|
|
|
Definition at line 109 of file OSGOffCenterPerspectiveCameraBase.inl. References _sfPrincipalPoint, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::OffCenterPerspectiveCamera::getProjection(). 00110 { 00111 return _sfPrincipalPoint.getValue(); 00112 }
|
|
|
Definition at line 116 of file OSGOffCenterPerspectiveCameraBase.inl. References _sfPrincipalPoint, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00117 { 00118 return _sfPrincipalPoint.getValue(); 00119 }
|
|
|
Definition at line 123 of file OSGOffCenterPerspectiveCameraBase.inl. References _sfPrincipalPoint, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00124 { 00125 _sfPrincipalPoint.setValue(value); 00126 }
|
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 183 of file OSGOffCenterPerspectiveCameraBase.cpp. References _sfPrincipalPoint, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::PerspectiveCameraBase::getBinSize(), osg::FieldBits::NoField, and PrincipalPointFieldMask. 00184 { 00185 UInt32 returnValue = Inherited::getBinSize(whichField); 00186 00187 if(FieldBits::NoField != (PrincipalPointFieldMask & whichField)) 00188 { 00189 returnValue += _sfPrincipalPoint.getBinSize(); 00190 } 00191 00192 00193 return returnValue; 00194 }
|
|
||||||||||||
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 196 of file OSGOffCenterPerspectiveCameraBase.cpp. References _sfPrincipalPoint, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::PerspectiveCameraBase::copyToBin(), osg::FieldBits::NoField, and PrincipalPointFieldMask. 00198 { 00199 Inherited::copyToBin(pMem, whichField); 00200 00201 if(FieldBits::NoField != (PrincipalPointFieldMask & whichField)) 00202 { 00203 _sfPrincipalPoint.copyToBin(pMem); 00204 } 00205 00206 00207 }
|
|
||||||||||||
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 209 of file OSGOffCenterPerspectiveCameraBase.cpp. References _sfPrincipalPoint, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::PerspectiveCameraBase::copyFromBin(), osg::FieldBits::NoField, and PrincipalPointFieldMask. 00211 { 00212 Inherited::copyFromBin(pMem, whichField); 00213 00214 if(FieldBits::NoField != (PrincipalPointFieldMask & whichField)) 00215 { 00216 _sfPrincipalPoint.copyFromBin(pMem); 00217 } 00218 00219 00220 }
|
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 72 of file OSGOffCenterPerspectiveCameraBase.inl. References osg::AttachmentContainerPtr::dcast(), getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and shallowCopy(). 00073 { 00074 OffCenterPerspectiveCameraPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = OffCenterPerspectiveCameraPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 87 of file OSGOffCenterPerspectiveCameraBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 OffCenterPerspectiveCameraPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 117 of file OSGOffCenterPerspectiveCameraBase.cpp. References osg::FieldContainer::newPtr(). Referenced by create(). 00118 { 00119 OffCenterPerspectiveCameraPtr returnValue; 00120 00121 newPtr(returnValue, dynamic_cast<const OffCenterPerspectiveCamera *>(this)); 00122 00123 return returnValue; 00124 }
|
|
||||||||||||
|
Definition at line 223 of file OSGOffCenterPerspectiveCameraBase.cpp. References _sfPrincipalPoint, osg::PerspectiveCameraBase::executeSyncImpl(), osg::FieldBits::NoField, PrincipalPointFieldMask, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by executeSync(). 00225 { 00226 00227 Inherited::executeSyncImpl(pOther, whichField); 00228 00229 if(FieldBits::NoField != (PrincipalPointFieldMask & whichField)) 00230 _sfPrincipalPoint.syncWith(pOther->_sfPrincipalPoint); 00231 00232 00233 }
|
|
||||||||||||
|
Reimplemented from osg::PerspectiveCameraBase. Definition at line 133 of file OSGOffCenterPerspectiveCameraBase.cpp. References executeSyncImpl(). 00135 { 00136 this->executeSyncImpl((OffCenterPerspectiveCameraBase *) &other, whichField); 00137 }
|
|
|
|
|
|
Reimplemented from osg::Camera. Reimplemented in osg::OffCenterPerspectiveCamera. Definition at line 67 of file OSGPerspectiveCamera.h.
|
|
||||||||||||
|
Reimplemented from osg::Camera. Reimplemented in osg::OffCenterPerspectiveCamera. Definition at line 115 of file OSGPerspectiveCamera.cpp. References osg::Camera::changed(). Referenced by osg::OffCenterPerspectiveCamera::changed(). 00116 { 00117 Inherited::changed(whichField, origin); 00118 }
|
|
||||||||||||
|
Draw the camera's geometry (if any). Usually there is none. Reimplemented from osg::Camera. Reimplemented in osg::OffCenterPerspectiveCamera. Definition at line 122 of file OSGPerspectiveCamera.cpp.
|
|
||||||||||||||||
|
Get/calculate the projection matrix for this camera. Reimplemented from osg::Camera. Reimplemented in osg::OffCenterPerspectiveCamera. Definition at line 127 of file OSGPerspectiveCamera.cpp. References osg::PerspectiveCameraBase::getAspect(), osg::CameraBase::getFar(), osg::PerspectiveCameraBase::getFov(), osg::CameraBase::getNear(), osg::MatrixPerspective(), osg::osgdegree2rad(), osg::Pi, and osg::TransformationMatrix< ValueTypeT >::setIdentity(). 00129 { 00130 Real32 fov = getFov(); 00131 00132 // catch some illegal cases 00133 if(fov < 0 || width == 0 || height == 0) 00134 { 00135 result.setIdentity(); 00136 return; 00137 } 00138 00139 // try to be nice to people giving degrees... 00140 if(fov > Pi) 00141 fov = osgdegree2rad(fov); 00142 00143 MatrixPerspective(result, fov / 2, 00144 width /(Real32) height * getAspect(), 00145 getNear(), getFar()); 00146 }
|
|
||||||||||||
|
Reimplemented from osg::Camera. Reimplemented in osg::OffCenterPerspectiveCamera. Definition at line 151 of file OSGPerspectiveCamera.cpp. References SLOG. 00153 { 00154 SLOG << "Dump PerspectiveCamera NI" << std::endl; 00155 }
|
|
|
Definition at line 101 of file OSGPerspectiveCameraBase.inl. References osg::PerspectiveCameraBase::_sfFov. 00102 { 00103 return &_sfFov; 00104 }
|
|
|
Definition at line 108 of file OSGPerspectiveCameraBase.inl. References osg::PerspectiveCameraBase::_sfAspect. 00109 { 00110 return &_sfAspect; 00111 }
|
|
|
Definition at line 116 of file OSGPerspectiveCameraBase.inl. References osg::PerspectiveCameraBase::_sfFov, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::PerspectiveCamera::getProjection(), and osg::OffCenterPerspectiveCamera::getProjection(). 00117 { 00118 return _sfFov.getValue(); 00119 }
|
|
|
Definition at line 123 of file OSGPerspectiveCameraBase.inl. References osg::PerspectiveCameraBase::_sfFov, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00124 { 00125 return _sfFov.getValue(); 00126 }
|
|
|
Definition at line 137 of file OSGPerspectiveCameraBase.inl. References osg::PerspectiveCameraBase::_sfAspect, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::PerspectiveCamera::getProjection(), and osg::OffCenterPerspectiveCamera::getProjection(). 00138 { 00139 return _sfAspect.getValue(); 00140 }
|
|
|
Definition at line 144 of file OSGPerspectiveCameraBase.inl. References osg::PerspectiveCameraBase::_sfAspect, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00145 { 00146 return _sfAspect.getValue(); 00147 }
|
|
|
Definition at line 130 of file OSGPerspectiveCameraBase.inl. References osg::PerspectiveCameraBase::_sfFov, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Definition at line 151 of file OSGPerspectiveCameraBase.inl. References osg::PerspectiveCameraBase::_sfAspect, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
||||||||||||
|
Definition at line 256 of file OSGPerspectiveCameraBase.cpp. References osg::PerspectiveCameraBase::_sfAspect, osg::PerspectiveCameraBase::_sfFov, osg::PerspectiveCameraBase::AspectFieldMask, osg::CameraBase::executeSyncImpl(), osg::PerspectiveCameraBase::FovFieldMask, osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::PerspectiveCameraBase::executeSync(), and executeSyncImpl(). 00258 { 00259 00260 Inherited::executeSyncImpl(pOther, whichField); 00261 00262 if(FieldBits::NoField != (FovFieldMask & whichField)) 00263 _sfFov.syncWith(pOther->_sfFov); 00264 00265 if(FieldBits::NoField != (AspectFieldMask & whichField)) 00266 _sfAspect.syncWith(pOther->_sfAspect); 00267 00268 00269 }
|
|
||||||||||||
|
Definition at line 275 of file OSGCameraBase.cpp. References osg::CameraBase::_sfBeacon, osg::CameraBase::_sfFar, osg::CameraBase::_sfNear, osg::CameraBase::BeaconFieldMask, osg::AttachmentContainer::executeSyncImpl(), osg::CameraBase::FarFieldMask, osg::CameraBase::NearFieldMask, osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::CameraBase::executeSync(), osg::PerspectiveCameraBase::executeSyncImpl(), osg::MatrixCameraBase::executeSyncImpl(), and osg::CameraDecoratorBase::executeSyncImpl(). 00277 { 00278 00279 Inherited::executeSyncImpl(pOther, whichField); 00280 00281 if(FieldBits::NoField != (BeaconFieldMask & whichField)) 00282 _sfBeacon.syncWith(pOther->_sfBeacon); 00283 00284 if(FieldBits::NoField != (NearFieldMask & whichField)) 00285 _sfNear.syncWith(pOther->_sfNear); 00286 00287 if(FieldBits::NoField != (FarFieldMask & whichField)) 00288 _sfFar.syncWith(pOther->_sfFar); 00289 00290 00291 }
|
|
||||||||||||