3#include <Core/Tasks/TaskQueue.hpp>
4#include <Headless/CLIBaseApplication.hpp>
5#include <Headless/OpenGLContext/OpenGLContext.hpp>
7#include <Core/Utils/Index.hpp>
11#include <glbinding/Version.h>
16class FileLoaderInterface;
66 int init(
int argc,
const char* argv[] )
override;
74 void bindOpenGLContext(
bool on =
true );
82 bool m_engineInitialized {
false };
91 struct ViewerParameters {
93 bool m_animationEnable {
false };
109 virtual ~CLIViewer();
126 int init(
int argc,
const char* argv[] )
override;
135 int oneFrame(
float timeStep = 1.f / 60.f );
146 void addDataFileLoader( Ra::Core::Asset::FileLoaderInterface* loader );
165 Ra::Core::Utils::Index setCamera( Ra::Core::Utils::Index camIdx = 0 );
171 const ViewerParameters& getCommandLineParameters()
const;
177 void showWindow(
bool on =
true,
178 OpenGLContext::EventMode mode = OpenGLContext::EventMode::POLL,
179 float delay = 1.f / 60.f );
188 inline OpenGLContext& getWindow();
201 inline void setDataFileName(
std::string filename );
205 void resize(
int width,
int height );
215 ViewerParameters m_parameters;
218 bool m_exposedWindow {
false };
221inline std::string CLIViewer::getDataFileName()
const {
222 return m_parameters.m_dataFile;
225inline void CLIViewer::setDataFileName(
std::string filename ) {
226 m_parameters.m_dataFile =
std::move( filename );
229inline OpenGLContext& CLIViewer::getWindow() {
Camera class storing the Camera frame and the projection properties The view direction is -z in camer...
Ra::Engine::RadiumEngine * m_engine
Instance of the radium engine.
std::unique_ptr< OpenGLContext > m_glContext
Headless OpenGLContext.
const Engine::RadiumEngine * getEngine() const
To have the same API to access Engine than in Qt based application.
hepler function to manage enum as underlying types in VariableSet