![]() |
VR-Forces 5.0.3 Developer's Guide
|
A Tracked camera is typically attached to the HMD and can provide position and orientation data in addition to osg::textures with its video stream. Cameras are tracked by the Virtual Reality system and pose information is provided in the same coordinate system as the HMD and controllers.

Public Types | |
| enum | Eye { Mono = 0, Left = 0, Right } |
Public Member Functions | |
| DtTrackedCamera (DtDe &de) | |
| virtual | ~DtTrackedCamera () |
| virtual osg::ref_ptr < osg::Texture2D > | texture (Eye id) |
| virtual osg::Matrixd | pose (Eye e) |
| virtual osg::Matrixd | projection () |
| virtual bool | startStream ()=0 |
| virtual void | stopStream ()=0 |
| virtual void | toggleStreaming () |
| virtual void | tick ()=0 |
| virtual bool | isDualCamera () |
| virtual void | setCameraFov (float x, float y) |
| virtual void | setCameraEye (float x, float y, float z, float pitch) |
| virtual void | resetCameraProjection ()=0 |
Protected Types | |
| typedef unsigned long long | UInt64 |
Protected Member Functions | |
| virtual void | addEyeTexture (int width, int height, unsigned char *buffer) |
| virtual void | invertBuffer () |
| virtual osg::Matrixd | createProjectionMatrix (float zn, float zf, const float *fovx=NULL, const float *fovy=NULL)=0 |
Protected Attributes | |
| DtDe & | myDe |
| bool | myIsStreaming |
| UInt64 | myLastFrameSequence |
| unsigned int | myFrameWidth |
| unsigned int | myFrameHeight |
| unsigned int | myFrameBufferSize |
| unsigned char * | myFrameBuffer |
| unsigned char * | myFrameFlipBuffer |
| bool | myIsDualCamera |
| int | myDualFormat |
| std::vector< osg::ref_ptr < osg::Texture2D > > | myTextures |
| std::vector< osg::ref_ptr < osg::Image > > | myImages |
| osg::Matrixd | myProjection |
| osg::Matrixd | myView |
| std::vector< osg::Matrixd > | myHeadToCameraMatrix |
| int | myFrameType |
|
protected |
| makVrv::DtTrackedCamera::DtTrackedCamera | ( | DtDe & | de | ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
get the osg texture for a given eye. The data for the texture is updated each frame.
|
virtual |
Get the pose of the camera this frame. This is an ENU coordinate with respect to the observer.
|
virtual |
get the projection matrix for the camera.
|
pure virtual |
start streaming video to the attached osg textures
Implemented in makVrv::DtOpenVRTrackedCamera, and makVrv::DtZedTrackedCamera.
|
pure virtual |
stop streaming video to the attached osg textures
Implemented in makVrv::DtOpenVRTrackedCamera, and makVrv::DtZedTrackedCamera.
|
virtual |
toggle streaming video
|
pure virtual |
tick the camera to update position and texture data
Implemented in makVrv::DtOpenVRTrackedCamera, and makVrv::DtZedTrackedCamera.
|
inlinevirtual |
whether or not this camera provides two video feeds simultaneously for stereo vision.
|
virtual |
set the camera FOV manually instead of pulling it from the camera
|
virtual |
set the camera eye location manually instead of pulling it from the camera
|
pure virtual |
reset the camera projection
Implemented in makVrv::DtOpenVRTrackedCamera, and makVrv::DtZedTrackedCamera.
|
protectedvirtual |
create an osg texture
|
protectedvirtual |
flip the image buffer upside down so it is appropriate for openGL use
|
protectedpure virtual |
create a projection matrix
Implemented in makVrv::DtZedTrackedCamera, and makVrv::DtOpenVRTrackedCamera.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |