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

Namespaces

namespace  config
namespace  correction
namespace  mutex
namespace  text

Classes

class  BaseViewport
 This class holds and manages viewportdata and calculates frustums. More...
class  ClusterManager
 The ClusterManager manages all nodes and cluster settings. More...
struct  Configuration
class  CorrectionMesh
 Helper class for reading and rendering a correction mesh. More...
class  CubemapProjection
 This class manages and renders non-linear fisheye projections. More...
class  CylindricalProjection
class  Engine
 The Engine class is the central part of SGCT and handles most of the callbacks, rendering, network handling, input devices, etc. More...
class  EquirectangularProjection
struct  Error
class  FisheyeProjection
 This class manages and renders non linear fisheye projections. More...
class  Image
struct  ivec2
struct  ivec3
struct  ivec4
class  Log
struct  mat4
class  Network
 Network manages peer-to-peer tcp connections. More...
class  NetworkManager
 The network manager manages all network connections for SGCT. More...
class  Node
class  NonLinearProjection
 Base class for non-linear projections. More...
class  OffScreenBuffer
 Helper class for creating frame buffer objects and render buffer objects. More...
class  Projection
 This class holds and manages 3D projections. More...
class  ProjectionPlane
 This class holds and manages the 3D projection plane. More...
struct  quat
struct  RenderData
class  ScreenCapture
 This class is used internally by SGCT and is called when taking screenshots. More...
class  ShaderManager
 For managing shader programs. More...
class  ShaderProgram
 Class for handling compiling, linking and using shader programs. More...
class  SharedData
 This class shares application data between nodes in a cluster where the master encodes and transmits the data and the clients receives and decode the data. More...
class  SphericalMirrorProjection
 This class manages and renders non-linear fisheye projections. More...
class  StatisticsRenderer
class  TextureManager
 The TextureManager loads and handles textures. More...
class  User
 Helper class for setting user variables. More...
struct  vec2
struct  vec3
struct  vec4
class  Viewport
 This class holds and manages viewportdata and calculates frustums. More...
class  Window

Enumerations

enum class  Action { Release = 0 , Press = 1 , Repeat = 2 }
enum class  Eye : uint8_t { MonoOrLeft , Right }
enum class  FrustumMode : uint8_t { Mono , StereoLeft , StereoRight }
enum class  Joystick {
  Joystick1 = 0 , Joystick2 = 1 , Joystick3 = 2 , Joystick4 = 3 ,
  Joystick5 = 4 , Joystick6 = 5 , Joystick7 = 6 , Joystick8 = 7 ,
  Joystick9 = 8 , Joystick10 = 9 , Joystick11 = 10 , Joystick12 = 11 ,
  Joystick13 = 12 , Joystick14 = 13 , Joystick15 = 14 , Joystick16 = 15
}
enum class  Key {
  Unknown = -1 , Space = 32 , Apostrophe = 39 , Comma = 44 ,
  Minus = 45 , Period = 46 , Slash = 47 , Key0 = 48 ,
  Key1 = 49 , Key2 = 50 , Key3 = 51 , Key4 = 52 ,
  Key5 = 53 , Key6 = 54 , Key7 = 55 , Key8 = 56 ,
  Key9 = 57 , Semicolon = 59 , Equal = 61 , A = 65 ,
  B = 66 , C = 67 , D = 68 , E = 69 ,
  F = 70 , G = 71 , H = 72 , I = 73 ,
  J = 74 , K = 75 , L = 76 , M = 77 ,
  N = 78 , O = 79 , P = 80 , Q = 81 ,
  R = 82 , S = 83 , T = 84 , U = 85 ,
  V = 86 , W = 87 , X = 88 , Y = 89 ,
  Z = 90 , LeftBracket = 91 , Backslash = 92 , RightBracket = 93 ,
  GraveAccent = 96 , World1 = 161 , World2 = 162 , Esc = 256 ,
  Escape = 256 , Enter = 257 , Tab = 258 , Backspace = 259 ,
  Insert = 260 , Del = 261 , Delete = 261 , Right = 262 ,
  Left = 263 , Down = 264 , Up = 265 , Pageup = 266 ,
  Pagedown = 267 , PageUp = 266 , PageDown = 267 , Home = 268 ,
  End = 269 , CapsLock = 280 , ScrollLock = 281 , NumLock = 282 ,
  PrintScreen = 283 , Pause = 284 , F1 = 290 , F2 = 291 ,
  F3 = 292 , F4 = 293 , F5 = 294 , F6 = 295 ,
  F7 = 296 , F8 = 297 , F9 = 298 , F10 = 299 ,
  F11 = 300 , F12 = 301 , F13 = 302 , F14 = 303 ,
  F15 = 304 , F16 = 305 , F17 = 306 , F18 = 307 ,
  F19 = 308 , F20 = 309 , F21 = 310 , F22 = 311 ,
  F23 = 312 , F24 = 313 , F25 = 314 , Kp0 = 320 ,
  Kp1 = 321 , Kp2 = 322 , Kp3 = 323 , Kp4 = 324 ,
  Kp5 = 325 , Kp6 = 326 , Kp7 = 327 , Kp8 = 328 ,
  Kp9 = 329 , KpDecimal = 330 , KpDivide = 331 , KpMultiply = 332 ,
  KpSubtract = 333 , KpAdd = 334 , KpEnter = 335 , KpEqual = 336 ,
  LeftShift = 340 , LeftControl = 341 , LeftAlt = 342 , LeftSuper = 343 ,
  RightShift = 344 , RightControl = 345 , RightAlt = 346 , RightSuper = 347 ,
  Menu = 348
}
enum class  Modifier { Shift = 0x0001 , Control = 0x0002 , Alt = 0x0004 , Super = 0x0008 }
enum class  MouseButton { ButtonLeft = 0 , ButtonRight = 1 , ButtonMiddle = 2 }

Functions

Configuration parseArguments (std::vector< std::string > &arg)
 Command line parameters are used to load a configuration file and settings.
std::string helpMessage ()
 Returns the text providing information about the available commandline options.
config::Cluster readConfig (const std::filesystem::path &filename)
 Reads a JSON configuration file from the provided filename.
config::Cluster readJsonConfig (std::string_view configuration)
 Reads a JSON-formatted configuration direction from the provided configuration.
config::Cluster defaultCluster ()
std::string serializeConfig (const config::Cluster &cluster, std::optional< config::GeneratorVersion > genVersion=std::nullopt)
 Serialize the provided cluster into its JSON string representation such that parsing the serialized string later with readJsonConfig will result int the same cluster again.
std::string validateConfigAgainstSchema (std::string_view configuration, const std::filesystem::path &schema)
 Validate the provided JSON-based string representation of a configuration against the schema file located at the provided schema file.
std::string validateConfigAgainstSchema (const std::filesystem::path &configuration, const std::filesystem::path &schema)
 Validate the provided configuration file against the schema file located at the provided schema file.
config::Cluster loadCluster (std::optional< std::filesystem::path > path=std::nullopt)
 Loads the cluster information from the provided path.
double time ()
 Returns the number of seconds since the program start.
mat4 operator* (const mat4 &m1, const mat4 &m2)
vec4 operator* (const mat4 &m, const vec4 &v)
vec3 operator* (const quat &q, const vec3 &v)
template<typename T>
void serializeObject (std::vector< std::byte > &buffer, T value)
template<typename T>
void serializeObject (std::vector< std::byte > &buffer, const std::vector< T > &value)
template<>
void serializeObject (std::vector< std::byte > &buffer, std::string_view value)
void serializeObject (std::vector< std::byte > &buffer, const std::string &value)
void serializeObject (std::vector< std::byte > &buffer, const std::wstring &value)
template<typename T>
void deserializeObject (const std::vector< std::byte > &buffer, unsigned int &pos, T &value)
template<typename T>
void deserializeObject (const std::vector< std::byte > &buffer, unsigned int &pos, std::vector< T > &value)
template<>
void deserializeObject (const std::vector< std::byte > &buffer, unsigned int &pos, std::string &value)
template<>
void deserializeObject (const std::vector< std::byte > &buffer, unsigned int &pos, std::wstring &value)
config::Window createScalableConfiguration (const config::Window::Scalable &scalable, const config::Window &window)

Enumeration Type Documentation

◆ Action

enum class sgct::Action
strong
Enumerator
Release 
Press 
Repeat 

◆ Eye

enum class sgct::Eye : uint8_t
strong
Enumerator
MonoOrLeft 
Right 

◆ FrustumMode

enum class sgct::FrustumMode : uint8_t
strong
Enumerator
Mono 
StereoLeft 
StereoRight 

◆ Joystick

enum class sgct::Joystick
strong
Enumerator
Joystick1 
Joystick2 
Joystick3 
Joystick4 
Joystick5 
Joystick6 
Joystick7 
Joystick8 
Joystick9 
Joystick10 
Joystick11 
Joystick12 
Joystick13 
Joystick14 
Joystick15 
Joystick16 

◆ Key

enum class sgct::Key
strong
Enumerator
Unknown 
Space 
Apostrophe 
Comma 
Minus 
Period 
Slash 
Key0 
Key1 
Key2 
Key3 
Key4 
Key5 
Key6 
Key7 
Key8 
Key9 
Semicolon 
Equal 
A 
B 
C 
D 
E 
F 
G 
H 
I 
J 
K 
L 
M 
N 
O 
P 
Q 
R 
S 
T 
U 
V 
W 
X 
Y 
Z 
LeftBracket 
Backslash 
RightBracket 
GraveAccent 
World1 
World2 
Esc 
Escape 
Enter 
Tab 
Backspace 
Insert 
Del 
Delete 
Right 
Left 
Down 
Up 
Pageup 
Pagedown 
PageUp 
PageDown 
Home 
End 
CapsLock 
ScrollLock 
NumLock 
PrintScreen 
Pause 
F1 
F2 
F3 
F4 
F5 
F6 
F7 
F8 
F9 
F10 
F11 
F12 
F13 
F14 
F15 
F16 
F17 
F18 
F19 
F20 
F21 
F22 
F23 
F24 
F25 
Kp0 
Kp1 
Kp2 
Kp3 
Kp4 
Kp5 
Kp6 
Kp7 
Kp8 
Kp9 
KpDecimal 
KpDivide 
KpMultiply 
KpSubtract 
KpAdd 
KpEnter 
KpEqual 
LeftShift 
LeftControl 
LeftAlt 
LeftSuper 
RightShift 
RightControl 
RightAlt 
RightSuper 
Menu 

◆ Modifier

enum class sgct::Modifier
strong
Enumerator
Shift 
Control 
Alt 
Super 

◆ MouseButton

enum class sgct::MouseButton
strong
Enumerator
ButtonLeft 
ButtonRight 
ButtonMiddle 

Function Documentation

◆ createScalableConfiguration()

config::Window sgct::createScalableConfiguration ( const config::Window::Scalable & scalable,
const config::Window & window )

◆ defaultCluster()

config::Cluster sgct::defaultCluster ( )
nodiscard

◆ deserializeObject() [1/4]

template<>
void sgct::deserializeObject ( const std::vector< std::byte > & buffer,
unsigned int & pos,
std::string & value )

◆ deserializeObject() [2/4]

template<typename T>
void sgct::deserializeObject ( const std::vector< std::byte > & buffer,
unsigned int & pos,
std::vector< T > & value )

◆ deserializeObject() [3/4]

template<>
void sgct::deserializeObject ( const std::vector< std::byte > & buffer,
unsigned int & pos,
std::wstring & value )

◆ deserializeObject() [4/4]

template<typename T>
void sgct::deserializeObject ( const std::vector< std::byte > & buffer,
unsigned int & pos,
T & value )

◆ helpMessage()

std::string sgct::helpMessage ( )

Returns the text providing information about the available commandline options.

◆ loadCluster()

config::Cluster sgct::loadCluster ( std::optional< std::filesystem::path > path = std::nullopt)

Loads the cluster information from the provided path.

The path is a configuration file and should be an absolute path or relative to the current working directory. If no path is provided, a default setup consisting of a FOV-based rendering with a 1280x720 window with is loaded instead.

Parameters
pathThe path to the configuration that should be loaded
Returns
The loaded Cluster object that contains all of the information from the file
Exceptions
std::runtime_errorThis exception is thrown whenever an unrecoverable error occurs while trying to load the provided path. This error is never raised when providing no path
Precondition
The path, if it is provided, must be an existing file

◆ operator*() [1/3]

vec4 sgct::operator* ( const mat4 & m,
const vec4 & v )

◆ operator*() [2/3]

mat4 sgct::operator* ( const mat4 & m1,
const mat4 & m2 )

◆ operator*() [3/3]

vec3 sgct::operator* ( const quat & q,
const vec3 & v )

◆ parseArguments()

Configuration sgct::parseArguments ( std::vector< std::string > & arg)

Command line parameters are used to load a configuration file and settings.

The arguments that were successfully extracted are removed from the vector that is passed into this function.

Parameters
argThe list of arguments that should be processed by this function
Returns
The filled struct with commandline options

◆ readConfig()

config::Cluster sgct::readConfig ( const std::filesystem::path & filename)
nodiscard

Reads a JSON configuration file from the provided filename.

If the loading fails an exception is raised, otherwise a valid Cluster object is returned.

◆ readJsonConfig()

config::Cluster sgct::readJsonConfig ( std::string_view configuration)
nodiscard

Reads a JSON-formatted configuration direction from the provided configuration.

If the loading fails an exception is raised, otherwise a valid Cluster object is returned.

◆ serializeConfig()

std::string sgct::serializeConfig ( const config::Cluster & cluster,
std::optional< config::GeneratorVersion > genVersion = std::nullopt )
nodiscard

Serialize the provided cluster into its JSON string representation such that parsing the serialized string later with readJsonConfig will result int the same cluster again.

◆ serializeObject() [1/5]

void sgct::serializeObject ( std::vector< std::byte > & buffer,
const std::string & value )

◆ serializeObject() [2/5]

template<typename T>
void sgct::serializeObject ( std::vector< std::byte > & buffer,
const std::vector< T > & value )

◆ serializeObject() [3/5]

void sgct::serializeObject ( std::vector< std::byte > & buffer,
const std::wstring & value )

◆ serializeObject() [4/5]

template<>
void sgct::serializeObject ( std::vector< std::byte > & buffer,
std::string_view value )

◆ serializeObject() [5/5]

template<typename T>
void sgct::serializeObject ( std::vector< std::byte > & buffer,
T value )

◆ time()

double sgct::time ( )

Returns the number of seconds since the program start.

The resultion of this counter is usually the best available counter from the operating system.

Returns
The number of seconds since the program started

◆ validateConfigAgainstSchema() [1/2]

std::string sgct::validateConfigAgainstSchema ( const std::filesystem::path & configuration,
const std::filesystem::path & schema )
nodiscard

Validate the provided configuration file against the schema file located at the provided schema file.

If the JSON is valid according to the schema, the function returns the empty string. Otherwise it contains an error message that describes which parts of the JSON are ill-formed.

◆ validateConfigAgainstSchema() [2/2]

std::string sgct::validateConfigAgainstSchema ( std::string_view configuration,
const std::filesystem::path & schema )
nodiscard

Validate the provided JSON-based string representation of a configuration against the schema file located at the provided schema file.

If the JSON is valid according to the schema, the function returns the empty string. Otherwise it contains an error message that describes which parts of the JSON are ill-formed.