VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtTrackedCamera Class Referenceabstract

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.

Inheritance diagram for makVrv::DtTrackedCamera:
Inheritance graph
[legend]

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

DtDemyDe
 
bool myIsStreaming
 
UInt64 myLastFrameSequence
 
unsigned int myFrameWidth
 
unsigned int myFrameHeight
 
unsigned int myFrameBufferSize
 
unsigned charmyFrameBuffer
 
unsigned charmyFrameFlipBuffer
 
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
 

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
Mono 
Left 
Right 

Constructor & Destructor Documentation

makVrv::DtTrackedCamera::DtTrackedCamera ( DtDe de)

CTOR.

virtual makVrv::DtTrackedCamera::~DtTrackedCamera ( )
virtual

DTOR.

Member Function Documentation

virtual osg::ref_ptr<osg::Texture2D> makVrv::DtTrackedCamera::texture ( Eye  id)
virtual

get the osg texture for a given eye. The data for the texture is updated each frame.

virtual osg::Matrixd makVrv::DtTrackedCamera::pose ( Eye  e)
virtual

Get the pose of the camera this frame. This is an ENU coordinate with respect to the observer.

virtual osg::Matrixd makVrv::DtTrackedCamera::projection ( )
virtual

get the projection matrix for the camera.

virtual bool makVrv::DtTrackedCamera::startStream ( )
pure virtual

start streaming video to the attached osg textures

Implemented in makVrv::DtOpenVRTrackedCamera.

virtual void makVrv::DtTrackedCamera::stopStream ( )
pure virtual

stop streaming video to the attached osg textures

Implemented in makVrv::DtOpenVRTrackedCamera.

virtual void makVrv::DtTrackedCamera::toggleStreaming ( )
virtual

toggle streaming video

virtual void makVrv::DtTrackedCamera::tick ( )
pure virtual

tick the camera to update position and texture data

Implemented in makVrv::DtOpenVRTrackedCamera.

virtual bool makVrv::DtTrackedCamera::isDualCamera ( )
inlinevirtual

whether or not this camera provides two video feeds simultaneously for stereo vision.

virtual void makVrv::DtTrackedCamera::setCameraFov ( float  x,
float  y 
)
virtual

set the camera FOV manually instead of pulling it from the camera

virtual void makVrv::DtTrackedCamera::setCameraEye ( float  x,
float  y,
float  z,
float  pitch 
)
virtual

set the camera eye location manually instead of pulling it from the camera

virtual void makVrv::DtTrackedCamera::resetCameraProjection ( )
pure virtual

reset the camera projection

Implemented in makVrv::DtOpenVRTrackedCamera.

virtual void makVrv::DtTrackedCamera::addEyeTexture ( int  width,
int  height,
unsigned char buffer 
)
protectedvirtual

create an osg texture

virtual void makVrv::DtTrackedCamera::invertBuffer ( )
protectedvirtual

flip the image buffer upside down so it is appropriate for openGL use

virtual osg::Matrixd makVrv::DtTrackedCamera::createProjectionMatrix ( float  zn,
float  zf,
const float *  fovx = NULL,
const float *  fovy = NULL 
)
protectedpure virtual

create a projection matrix

Implemented in makVrv::DtOpenVRTrackedCamera.

Member Data Documentation

DtDe& makVrv::DtTrackedCamera::myDe
protected
bool makVrv::DtTrackedCamera::myIsStreaming
protected
UInt64 makVrv::DtTrackedCamera::myLastFrameSequence
protected
unsigned int makVrv::DtTrackedCamera::myFrameWidth
protected
unsigned int makVrv::DtTrackedCamera::myFrameHeight
protected
unsigned int makVrv::DtTrackedCamera::myFrameBufferSize
protected
unsigned char* makVrv::DtTrackedCamera::myFrameBuffer
protected
unsigned char* makVrv::DtTrackedCamera::myFrameFlipBuffer
protected
bool makVrv::DtTrackedCamera::myIsDualCamera
protected
int makVrv::DtTrackedCamera::myDualFormat
protected
std::vector<osg::ref_ptr<osg::Texture2D> > makVrv::DtTrackedCamera::myTextures
protected
std::vector<osg::ref_ptr<osg::Image> > makVrv::DtTrackedCamera::myImages
protected
osg::Matrixd makVrv::DtTrackedCamera::myProjection
protected
osg::Matrixd makVrv::DtTrackedCamera::myView
protected
std::vector<osg::Matrixd> makVrv::DtTrackedCamera::myHeadToCameraMatrix
protected
int makVrv::DtTrackedCamera::myFrameType
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)