SGCT
master (487fac4)
Simple Graphics Cluster Toolkit
Toggle main menu visibility
Loading...
Searching...
No Matches
user.h
Go to the documentation of this file.
1
/*****************************************************************************************
2
* SGCT *
3
* Simple Graphics Cluster Toolkit *
4
* *
5
* Copyright (c) 2012-2026 *
6
* For conditions of distribution and use, see copyright notice in LICENSE.md *
7
****************************************************************************************/
8
9
#ifndef __SGCT__USER__H__
10
#define __SGCT__USER__H__
11
12
#include <sgct/sgctexports.h>
13
14
#include <
sgct/math.h
>
15
#include <string>
16
17
namespace
sgct
{
18
19
namespace
config
{
struct
User
; }
20
24
class
SGCT_EXPORT
User
{
25
public
:
29
User
(
const
config::User
& user);
30
34
void
setPos
(
vec3
pos);
35
43
void
setHeadTracker
(std::string trackerName, std::string deviceName);
44
50
void
setTransform
(
mat4
transform);
51
60
void
setOrientation
(
float
xRot,
float
yRot,
float
zRot);
61
65
void
setOrientation
(
quat
q);
66
70
void
setEyeSeparation
(
float
eyeSeparation
);
71
75
const
std::string&
name
()
const
;
76
77
const
vec3
&
posMono
()
const
;
78
const
vec3
&
posLeftEye
()
const
;
79
const
vec3
&
posRightEye
()
const
;
80
81
float
eyeSeparation
()
const
;
82
const
std::string&
headTrackerName
()
const
;
83
const
std::string&
headTrackerDeviceName
()
const
;
84
88
bool
isTracked
()
const
;
89
90
private
:
95
void
updateEyeSeparation();
96
101
void
updateEyeTransform();
102
103
const
std::string _name;
104
float
_eyeSeparation;
105
106
vec3
_posMono =
vec3
{ 0.f, 0.f, 0.f };
107
vec3
_posLeftEye =
vec3
{ 0.f, 0.f, 0.f };
108
vec3 _posRightEye = vec3{ 0.f, 0.f, 0.f };
109
110
mat4 _transform = mat4(1.0);
111
112
std::string _headTrackerDeviceName;
113
std::string _headTrackerName;
114
};
115
116
}
// namespace sgct
117
118
#endif
// __SGCT__USER__H__
sgct::User::setOrientation
void setOrientation(float xRot, float yRot, float zRot)
Set the user's head orientation using euler angles.
sgct::User::posRightEye
const vec3 & posRightEye() const
sgct::User::setEyeSeparation
void setEyeSeparation(float eyeSeparation)
Changes the interocular distance and recalculates the user's eye positions.
sgct::User::setOrientation
void setOrientation(quat q)
Set the user's head orientation using a quaternion.
sgct::User::headTrackerName
const std::string & headTrackerName() const
sgct::User::setHeadTracker
void setHeadTracker(std::string trackerName, std::string deviceName)
Set if the user's head position & orientation should be managed by a VRPN tracking device.
sgct::User::User
User(const config::User &user)
Default contructor.
sgct::User::posLeftEye
const vec3 & posLeftEye() const
sgct::User::posMono
const vec3 & posMono() const
sgct::User::setTransform
void setTransform(mat4 transform)
Set the user's head transform matrix.
sgct::User::setPos
void setPos(vec3 pos)
Sets user's head position.
sgct::User::name
const std::string & name() const
Get the users name.
sgct::User::eyeSeparation
float eyeSeparation() const
sgct::User::isTracked
bool isTracked() const
sgct::User::headTrackerDeviceName
const std::string & headTrackerDeviceName() const
math.h
sgct::config
Definition
clustermanager.h:22
sgct
Definition
actions.h:16
sgct::config::User
Definition
config.h:25
sgct::mat4
Definition
math.h:89
sgct::quat
Definition
math.h:77
sgct::vec3
Definition
math.h:56
sgct
user.h
Generated by
1.18.0