SGCT
master (487fac4)
Simple Graphics Cluster Toolkit
Toggle main menu visibility
Loading...
Searching...
No Matches
clustermanager.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__CLUSTERMANAGER__H__
10
#define __SGCT__CLUSTERMANAGER__H__
11
12
#include <sgct/sgctexports.h>
13
14
#include <
sgct/math.h
>
15
#include <memory>
16
#include <string>
17
#include <string_view>
18
#include <vector>
19
20
namespace
sgct
{
21
22
namespace
config
{
struct
Cluster
; }
23
class
Node
;
24
class
User
;
25
30
class
SGCT_EXPORT ClusterManager {
31
public
:
32
static
ClusterManager&
instance
();
33
static
void
create
(
const
config::Cluster
& cluster,
int
clusterID);
34
static
void
destroy
();
35
44
const
Node
&
node
(
int
index)
const
;
45
52
Node
&
thisNode
();
53
60
const
Node
&
thisNode
()
const
;
61
68
User
&
defaultUser
();
69
76
User
*
user
(std::string_view name);
77
84
User
*
trackedUser
();
85
89
int
numberOfNodes
()
const
;
90
94
const
mat4
&
sceneTransform
()
const
;
95
99
int
thisNodeId
()
const
;
100
104
const
std::string&
masterAddress
()
const
;
105
109
void
setFirmFrameLockSyncStatus
(
bool
state);
110
114
bool
firmFrameLockSyncStatus
()
const
;
115
119
void
setUseIgnoreSync
(
bool
state);
120
124
bool
ignoreSync
()
const
;
125
126
private
:
127
ClusterManager(
const
config::Cluster
& cluster,
int
clusterID);
128
ClusterManager(
const
ClusterManager&) =
delete
;
129
ClusterManager(ClusterManager&&) =
delete
;
130
ClusterManager& operator=(
const
ClusterManager&) =
delete
;
131
ClusterManager& operator=(ClusterManager&&) =
delete
;
132
133
~ClusterManager();
134
135
static
ClusterManager* _instance;
136
137
const
int
_thisNodeId;
138
bool
_firmFrameLockSync;
139
bool
_ignoreSync =
false
;
140
std::string _masterAddress;
141
142
std::vector<std::unique_ptr<Node>> _nodes;
143
std::vector<std::unique_ptr<User>> _users;
144
mat4
_sceneTransform =
mat4
(1.f);
145
};
146
147
}
// namespace sgct
148
149
#endif
// __SGCT__CLUSTERMANAGER__H__
sgct::ClusterManager::create
static void create(const config::Cluster &cluster, int clusterID)
sgct::ClusterManager::setUseIgnoreSync
void setUseIgnoreSync(bool state)
Set if software sync between nodes should be ignored.
sgct::ClusterManager::numberOfNodes
int numberOfNodes() const
sgct::ClusterManager::ignoreSync
bool ignoreSync() const
Get if software sync between nodes is disabled.
sgct::ClusterManager::defaultUser
User & defaultUser()
Get the default user.
sgct::ClusterManager::instance
static ClusterManager & instance()
sgct::ClusterManager::thisNode
const Node & thisNode() const
Get the current node.
sgct::ClusterManager::thisNode
Node & thisNode()
Get the current node.
sgct::ClusterManager::firmFrameLockSyncStatus
bool firmFrameLockSyncStatus() const
sgct::ClusterManager::user
User * user(std::string_view name)
Get the user with the specific name.
sgct::ClusterManager::trackedUser
User * trackedUser()
Get the tracked user.
sgct::ClusterManager::destroy
static void destroy()
sgct::ClusterManager::sceneTransform
const mat4 & sceneTransform() const
sgct::ClusterManager::node
const Node & node(int index) const
Get a pointer to a specific node.
sgct::ClusterManager::setFirmFrameLockSyncStatus
void setFirmFrameLockSyncStatus(bool state)
sgct::ClusterManager::masterAddress
const std::string & masterAddress() const
sgct::ClusterManager::thisNodeId
int thisNodeId() const
sgct::Node
Definition
node.h:24
sgct::User
Helper class for setting user variables.
Definition
user.h:24
math.h
sgct::config
Definition
clustermanager.h:22
sgct
Definition
actions.h:16
sgct::config::Cluster
Definition
config.h:453
sgct::mat4
Definition
math.h:89
sgct
clustermanager.h
Generated by
1.18.0