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

The ClusterManager manages all nodes and cluster settings. More...

#include <sgct/clustermanager.h>

Public Member Functions

const Node & node (int index) const
 Get a pointer to a specific node.
Node & thisNode ()
 Get the current node.
const Node & thisNode () const
 Get the current node.
User & defaultUser ()
 Get the default user.
User * user (std::string_view name)
 Get the user with the specific name.
User * trackedUser ()
 Get the tracked user.
int numberOfNodes () const
const mat4 & sceneTransform () const
int thisNodeId () const
const std::string & masterAddress () const
void setFirmFrameLockSyncStatus (bool state)
bool firmFrameLockSyncStatus () const
void setUseIgnoreSync (bool state)
 Set if software sync between nodes should be ignored.
bool ignoreSync () const
 Get if software sync between nodes is disabled.

Static Public Member Functions

static ClusterManager & instance ()
static void create (const config::Cluster &cluster, int clusterID)
static void destroy ()

Detailed Description

The ClusterManager manages all nodes and cluster settings.

This class is a static singleton and is accessed using its instance.

Member Function Documentation

◆ create()

void sgct::ClusterManager::create ( const config::Cluster & cluster,
int clusterID )
static

◆ defaultUser()

User & sgct::ClusterManager::defaultUser ( )

Get the default user.

Please observe that the address of this object might change between frames and should not be stored.

Returns
The pointer to the default user

◆ destroy()

void sgct::ClusterManager::destroy ( )
static

◆ firmFrameLockSyncStatus()

bool sgct::ClusterManager::firmFrameLockSyncStatus ( ) const
Returns
State of the firm frame lock lock sync

◆ ignoreSync()

bool sgct::ClusterManager::ignoreSync ( ) const

Get if software sync between nodes is disabled.

◆ instance()

ClusterManager & sgct::ClusterManager::instance ( )
static

◆ masterAddress()

const std::string & sgct::ClusterManager::masterAddress ( ) const
Returns
The DNS name or IP of the master in the cluster

◆ node()

const Node & sgct::ClusterManager::node ( int index) const

Get a pointer to a specific node.

Please observe that the address of this object might change between frames and should not be kept around for long.

Parameters
indexThe index to a node in the vector
Returns
The pointer to the requested node. This pointer is not guaranteed to be stable between function calls

◆ numberOfNodes()

int sgct::ClusterManager::numberOfNodes ( ) const
Returns
The number of nodes in the cluster

◆ sceneTransform()

const mat4 & sgct::ClusterManager::sceneTransform ( ) const
Returns
The scene transform specified in the configuration file

◆ setFirmFrameLockSyncStatus()

void sgct::ClusterManager::setFirmFrameLockSyncStatus ( bool state)
Parameters
stateThe state of the firm frame lock sync

◆ setUseIgnoreSync()

void sgct::ClusterManager::setUseIgnoreSync ( bool state)

Set if software sync between nodes should be ignored.

◆ thisNode() [1/2]

Node & sgct::ClusterManager::thisNode ( )

Get the current node.

Please observe that the address of this object might change between frames and should not be stored.

Returns
A reference to the node that this application is running on

◆ thisNode() [2/2]

const Node & sgct::ClusterManager::thisNode ( ) const

Get the current node.

Please observe that the address of this object might change between frames and should not be stored.

Returns
A reference to the node that this application is running on

◆ thisNodeId()

int sgct::ClusterManager::thisNodeId ( ) const
Returns
The id to the node which runs this application

◆ trackedUser()

User * sgct::ClusterManager::trackedUser ( )

Get the tracked user.

Please observe that the address of this object might change between frames and should not be stored.

Returns
The pointer to the tracked user. Returns nullptr if no user is tracked

◆ user()

User * sgct::ClusterManager::user ( std::string_view name)

Get the user with the specific name.

Please observe that the address of this object might change between frames and should not be stored.

Returns
The pointer to a named user. nullptr is returned if no user is found

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