YARP
Yet Another Robot Platform
OVRHeadset.cpp File Reference
#include "OVRHeadset.h"
#include "InputCallback.h"
#include "TextureBuffer.h"
#include "TextureStatic.h"
#include "TextureBattery.h"
#include "GLDebug.h"
#include "OVRHeadsetLogComponent.h"
#include "img-yarp-robot-64.h"
#include "img-crosshairs.h"
#include <yarp/os/BufferedPort.h>
#include <yarp/os/LogStream.h>
#include <yarp/os/Network.h>
#include <yarp/os/Stamp.h>
#include <yarp/os/Time.h>
#include <yarp/sig/Image.h>
#include <yarp/os/Property.h>
#include <yarp/os/SystemClock.h>
#include <yarp/math/Math.h>
#include <cmath>
#include <mutex>
#include <unordered_map>
#include <OVR_CAPI_Util.h>
#include <OVR_Math.h>
#include <GLFW/glfw3.h>
#include <GLFW/glfw3native.h>
#include <OVR_System.h>
#include <OVR_CAPI_GL.h>
+ Include dependency graph for OVRHeadset.cpp:

Go to the source code of this file.

Classes

struct  guiParam
 

Macros

#define _USE_MATH_DEFINES
 

Typedefs

typedef bool(yarp::os::Value::* valueIsType) (void) const
 
typedef yarp::os::BufferedPort< yarp::sig::FlexImageFlexImagePort
 

Functions

yarp::sig::Vector ovrVec3ToYarp (const ovrVector3f &v)
 
yarp::sig::Vector ovrRot2YarpRPY (const OVR::Quatf &rot)
 
yarp::sig::Matrix ovr2matrix (const ovrVector3f &pos, const OVR::Quatf &orientation)
 
ovrVector3f vecSubtract (const ovrVector3f &a, const ovrVector3f &b)
 
static void debugTangent (std::string message, float tangent1, float tangent2)
 
static void debugFov (const ovrFovPort fov[2])
 
static int compareLuid (const ovrGraphicsLuid &lhs, const ovrGraphicsLuid &rhs)
 
static ovrGraphicsLuid GetDefaultAdapterLuid ()
 
void writeVec3OnPort (yarp::os::BufferedPort< yarp::os::Bottle > *const &port, const OVR::Vector3f &vec3, yarp::os::Stamp &stamp)
 
OVR::Vector3f radToDeg (const OVR::Vector3f &v)
 
void setHeadLockedLayer (ovrLayerQuad &layer, TextureStatic *tex, const float x, const float y, const float z, const float rx, const float ry, const float rz, float rw, const float sizeX, const float sizeY)
 
void setHeadLockedLayer (ovrLayerQuad &layer, TextureBuffer *tex, const float x, const float y, const float z, const float rx, const float ry, const float rz, float rw, const float sizeX, const float sizeY)
 

Variables

constexpr unsigned int AXIS_COUNT = 8
 
constexpr unsigned int STICK_COUNT = 2
 
constexpr unsigned int BUTTON_COUNT = 13
 

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

Definition at line 19 of file OVRHeadset.cpp.

Typedef Documentation

◆ FlexImagePort

◆ valueIsType

typedef bool(yarp::os::Value::* valueIsType) (void) const

Definition at line 82 of file OVRHeadset.cpp.

Function Documentation

◆ compareLuid()

static int compareLuid ( const ovrGraphicsLuid &  lhs,
const ovrGraphicsLuid &  rhs 
)
static

Definition at line 162 of file OVRHeadset.cpp.

◆ debugFov()

static void debugFov ( const ovrFovPort  fov[2])
static

Definition at line 150 of file OVRHeadset.cpp.

◆ debugTangent()

static void debugTangent ( std::string  message,
float  tangent1,
float  tangent2 
)
inlinestatic

Definition at line 139 of file OVRHeadset.cpp.

◆ GetDefaultAdapterLuid()

static ovrGraphicsLuid GetDefaultAdapterLuid ( )
static

Definition at line 167 of file OVRHeadset.cpp.

◆ ovr2matrix()

yarp::sig::Matrix ovr2matrix ( const ovrVector3f &  pos,
const OVR::Quatf &  orientation 
)
inline

Definition at line 121 of file OVRHeadset.cpp.

◆ ovrRot2YarpRPY()

yarp::sig::Vector ovrRot2YarpRPY ( const OVR::Quatf &  rot)
inline

Definition at line 110 of file OVRHeadset.cpp.

◆ ovrVec3ToYarp()

yarp::sig::Vector ovrVec3ToYarp ( const ovrVector3f &  v)
inline

Definition at line 98 of file OVRHeadset.cpp.

◆ radToDeg()

OVR::Vector3f radToDeg ( const OVR::Vector3f &  v)
inline

Definition at line 208 of file OVRHeadset.cpp.

◆ setHeadLockedLayer() [1/2]

void setHeadLockedLayer ( ovrLayerQuad &  layer,
TextureBuffer tex,
const float  x,
const float  y,
const float  z,
const float  rx,
const float  ry,
const float  rz,
float  rw,
const float  sizeX,
const float  sizeY 
)
inline

Definition at line 240 of file OVRHeadset.cpp.

◆ setHeadLockedLayer() [2/2]

void setHeadLockedLayer ( ovrLayerQuad &  layer,
TextureStatic tex,
const float  x,
const float  y,
const float  z,
const float  rx,
const float  ry,
const float  rz,
float  rw,
const float  sizeX,
const float  sizeY 
)
inline

Definition at line 219 of file OVRHeadset.cpp.

◆ vecSubtract()

ovrVector3f vecSubtract ( const ovrVector3f &  a,
const ovrVector3f &  b 
)
inline

Definition at line 130 of file OVRHeadset.cpp.

◆ writeVec3OnPort()

void writeVec3OnPort ( yarp::os::BufferedPort< yarp::os::Bottle > *const &  port,
const OVR::Vector3f &  vec3,
yarp::os::Stamp stamp 
)
inline

Definition at line 194 of file OVRHeadset.cpp.

Variable Documentation

◆ AXIS_COUNT

constexpr unsigned int AXIS_COUNT = 8
constexpr

Definition at line 52 of file OVRHeadset.cpp.

◆ BUTTON_COUNT

constexpr unsigned int BUTTON_COUNT = 13
constexpr

Definition at line 54 of file OVRHeadset.cpp.

◆ STICK_COUNT

constexpr unsigned int STICK_COUNT = 2
constexpr

Definition at line 53 of file OVRHeadset.cpp.