Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Headless::CLIRadiumEngineApp Class Reference

#include <Headless/CLIViewer.hpp>

+ Inheritance diagram for Ra::Headless::CLIRadiumEngineApp:
+ Collaboration diagram for Ra::Headless::CLIRadiumEngineApp:

Public Member Functions

 CLIRadiumEngineApp (std::unique_ptr< OpenGLContext > context)
 Construct the viewer using an OpenGL context of the given version.
 
virtual ~CLIRadiumEngineApp ()
 Base destructor.
 
const Engine::RadiumEnginegetEngine () const
 To have the same API to access Engine than in Qt based application.
 
int init (int argc, const char *argv[]) override
 Application initialization method.
 
void openGlAddOns (std::function< void()> f)
 
void bindOpenGLContext (bool on=true)
 
- Public Member Functions inherited from Ra::Headless::CLIBaseApplication
 CLIBaseApplication ()=default
 Base constructor.
 
virtual ~CLIBaseApplication ()=default
 Base destructor.
 
template<typename... Args>
CLI::Option * addOption (Args &&... args)
 
template<typename... Args>
CLI::Option * addFlag (Args &&... args)
 

Protected Attributes

std::unique_ptr< OpenGLContextm_glContext
 Headless OpenGLContext.
 
bool m_engineInitialized { false }
 is the engine initialized ?
 
Ra::Engine::RadiumEnginem_engine
 Instance of the radium engine.
 
- Protected Attributes inherited from Ra::Headless::CLIBaseApplication
CLI::App m_cmdLineParser
 

Detailed Description

Base class for radium based cmdline application.

This is the Headless pendant of the Ra::Gui::Viewer class, with only a very little interaction capabilities.

Definition at line 37 of file CLIViewer.hpp.

Constructor & Destructor Documentation

◆ CLIRadiumEngineApp()

Ra::Headless::CLIRadiumEngineApp::CLIRadiumEngineApp ( std::unique_ptr< OpenGLContext > context)
explicit

Construct the viewer using an OpenGL context of the given version.

Parameters
contextthe opengl context, e.g. EglOpenGLContext or GlfwOpenGLContext.

Definition at line 24 of file CLIViewer.cpp.

◆ ~CLIRadiumEngineApp()

Ra::Headless::CLIRadiumEngineApp::~CLIRadiumEngineApp ( )
virtual

Base destructor.

Definition at line 27 of file CLIViewer.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ bindOpenGLContext()

void Ra::Headless::CLIRadiumEngineApp::bindOpenGLContext ( bool on = true)

Activate/deactivate the OpenGL context

Definition at line 71 of file CLIViewer.cpp.

◆ getEngine()

const Engine::RadiumEngine * Ra::Headless::CLIRadiumEngineApp::getEngine ( ) const
inline

To have the same API to access Engine than in Qt based application.

Definition at line 49 of file CLIViewer.hpp.

◆ init()

int Ra::Headless::CLIRadiumEngineApp::init ( int argc,
const char * argv[] )
overridevirtual

Application initialization method.

This method is called by the main function to initialize the app giving its parameters.

Parameters
argcnumber of parameter
argvarray of string representing the parameters
Returns
0 if the application is correctly initialized or an application dependant error code if something went wrong.

Supported command line parameters are –help and –file <filename> from CLIRadiumApplication and the following parameters :

  • –size <width x height> : the size of the rendered picture
  • –animation : load the Radium animation system
  • –env <env_map> : load and use the given environment map.

Reimplemented from Ra::Headless::CLIBaseApplication.

Definition at line 36 of file CLIViewer.cpp.

+ Here is the call graph for this function:

◆ openGlAddOns()

void Ra::Headless::CLIRadiumEngineApp::openGlAddOns ( std::function< void()> f)

Register OpenGL addons The given functor will be called with the OpenGL context bound

Definition at line 65 of file CLIViewer.cpp.

Member Data Documentation

◆ m_engine

Ra::Engine::RadiumEngine* Ra::Headless::CLIRadiumEngineApp::m_engine
protected

Instance of the radium engine.

Definition at line 85 of file CLIViewer.hpp.

◆ m_engineInitialized

bool Ra::Headless::CLIRadiumEngineApp::m_engineInitialized { false }
protected

is the engine initialized ?

Definition at line 82 of file CLIViewer.hpp.

◆ m_glContext

std::unique_ptr<OpenGLContext> Ra::Headless::CLIRadiumEngineApp::m_glContext
protected

Headless OpenGLContext.

Todo
make privaet and check access

Definition at line 79 of file CLIViewer.hpp.


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