SGCT master (487fac4)
Simple Graphics Cluster Toolkit
Loading...
Searching...
No Matches
sgct::User Class Reference

Helper class for setting user variables. More...

#include <sgct/user.h>

Public Member Functions

 User (const config::User &user)
 Default contructor.
void setPos (vec3 pos)
 Sets user's head position.
void setHeadTracker (std::string trackerName, std::string deviceName)
 Set if the user's head position & orientation should be managed by a VRPN tracking device.
void setTransform (mat4 transform)
 Set the user's head transform matrix.
void setOrientation (float xRot, float yRot, float zRot)
 Set the user's head orientation using euler angles.
void setOrientation (quat q)
 Set the user's head orientation using a quaternion.
void setEyeSeparation (float eyeSeparation)
 Changes the interocular distance and recalculates the user's eye positions.
const std::string & name () const
 Get the users name.
const vec3 & posMono () const
const vec3 & posLeftEye () const
const vec3 & posRightEye () const
float eyeSeparation () const
const std::string & headTrackerName () const
const std::string & headTrackerDeviceName () const
bool isTracked () const

Detailed Description

Helper class for setting user variables.

Constructor & Destructor Documentation

◆ User()

sgct::User::User ( const config::User & user)

Default contructor.

Member Function Documentation

◆ eyeSeparation()

float sgct::User::eyeSeparation ( ) const

◆ headTrackerDeviceName()

const std::string & sgct::User::headTrackerDeviceName ( ) const

◆ headTrackerName()

const std::string & sgct::User::headTrackerName ( ) const

◆ isTracked()

bool sgct::User::isTracked ( ) const
Returns
true if user is tracked

◆ name()

const std::string & sgct::User::name ( ) const

Get the users name.

◆ posLeftEye()

const vec3 & sgct::User::posLeftEye ( ) const

◆ posMono()

const vec3 & sgct::User::posMono ( ) const

◆ posRightEye()

const vec3 & sgct::User::posRightEye ( ) const

◆ setEyeSeparation()

void sgct::User::setEyeSeparation ( float eyeSeparation)

Changes the interocular distance and recalculates the user's eye positions.

◆ setHeadTracker()

void sgct::User::setHeadTracker ( std::string trackerName,
std::string deviceName )

Set if the user's head position & orientation should be managed by a VRPN tracking device.

This is normally done using the configuration file.

Parameters
trackerNameThe pointer to the tracker
deviceNameThe name of the device which is mapped to the tracker

◆ setOrientation() [1/2]

void sgct::User::setOrientation ( float xRot,
float yRot,
float zRot )

Set the user's head orientation using euler angles.

Note that rotations are dependent of each other, total rotation = xRot * yRot * zRot.

Parameters
xRotThe rotations around the x axes
yRotThe rotations around the y axes
zRotThe rotations around the z axes

◆ setOrientation() [2/2]

void sgct::User::setOrientation ( quat q)

Set the user's head orientation using a quaternion.

◆ setPos()

void sgct::User::setPos ( vec3 pos)

Sets user's head position.

◆ setTransform()

void sgct::User::setTransform ( mat4 transform)

Set the user's head transform matrix.

Parameters
transformThe transform matrix

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