fast::Window class

Base classes

class Object
Base class for all FAST objects.

Derived classes

class DualViewWindow
A Window with 2 views.
class MultiViewWindow
Window with multiple views.
class SimpleGUI
class SimpleWindow
A Window with only 1 View.
class TrackingGUI

Public static functions

static void initializeQtApp()
static auto getMainGLContext() -> QGLContext*
static void setMainGLContext(QGLContext* context)
static void cleanup()

Constructors, destructors, conversion operators

~Window()
Window() protected

Public functions

void setTimeout(unsigned int milliseconds) virtual
void start() virtual
void run() virtual
Opens window and starts pipeline on all renderers.
void setWidth(uint width)
void setHeight(uint height)
void setSize(uint width, uint height)
void enableMaximized()
void disableMaximized()
void enableFullscreen()
void disableFullscreen()
void setTitle(std::string)
auto getViews() -> std::vector<View*>
auto getView(uint i) -> View*
auto getScreenWidth() const -> int
auto getScreenHeight() const -> int
auto getScalingFactor() const -> float
void saveScreenshotOnClose(std::string filename)
void saveScreenshotOfViewsOnClose(std::string filename)
auto getWidget() -> QWidget*
void addProcessObject(std::shared_ptr<ProcessObject> po)
auto getProcessObjects() -> std::vector<std::shared_ptr<ProcessObject>>
void clearProcessObjects()
void set2DMode()
Set 2D mode for all views in this window.
void set3DMode()
Set 3D mode for all views in this window.

Public slots

void stop()

Protected functions

void startComputationThread()
void stopComputationThread()
auto createView() -> View*

Protected variables

WindowWidget* mWidget
unsigned int mWidth
unsigned int mHeight
bool mFullscreen
bool mMaximized
unsigned int mTimeout
float mGUIScalingFactor
QEventLoop* mEventLoop
ComputationThread* mThread
std::vector<std::shared_ptr<ProcessObject>> m_processObjects
std::mutex m_mutex

Function documentation

void fast::Window::setTimeout(unsigned int milliseconds) virtual

Makes the window close after a specific number of ms

void fast::Window::start() virtual

Starts an update loop on all renderers attached to each view in this window.

int fast::Window::getScreenWidth() const

Returns width in pixels

Get screen width in pixels

int fast::Window::getScreenHeight() const

Returns height in pixels

Get screen height in pixels

float fast::Window::getScalingFactor() const

Get GUI scaling factor

void fast::Window::addProcessObject(std::shared_ptr<ProcessObject> po)

Add a process object to be updated by the computation thread.

std::vector<std::shared_ptr<ProcessObject>> fast::Window::getProcessObjects()

Get process objects to be updated by the computation thread.

void fast::Window::clearProcessObjects()

Clear the process objects to be updated by the computation thread.