Shiokaze Framework
A research-oriented fluid solver for computer graphics
graphics_interface Class Reference

Graphics engine moduled interface. More...

#include <graphics_interface.h>

Inheritance diagram for graphics_interface:
recursive_configurable_module graphics_engine recursive_configurable module configurable credit messageable

Additional Inherited Members

- Public Types inherited from configurable
using environment_map = std::map< std::string, const void * >
 Type for environment_map.
 
- Public Types inherited from graphics_engine
enum  FEATURE { FEATURE::OPACITY, FEATURE::_3D }
 List of features that can be specified to get_supported(). More...
 
enum  MODE {
  MODE::POINTS, MODE::LINES, MODE::LINE_STRIP, MODE::LINE_LOOP,
  MODE::TRIANGLES, MODE::TRIANGLE_STRIP, MODE::TRIANGLE_FAN
}
 List of drawing mode that is to be specified with begin() function. See https://www.khronos.org/opengl/wiki/Primitive for detail. More...
 
- Public Member Functions inherited from recursive_configurable_module
virtual void recursive_load (configuration &config) override
 Start recursively load configurables. More...
 
virtual void recursive_configure (configuration &config) override
 Recursively call configure. More...
 
- Public Member Functions inherited from recursive_configurable
 recursive_configurable ()=default
 Default constructor.
 
virtual void recursive_initialize (const configurable::environment_map &environment=configurable::environment_map())
 Initialize the program itself and relay the same to its children. Used to get things ready for actual use. More...
 
virtual bool is_ready () const
 Get if the instance is initialized. More...
 
virtual void add_child (configurable *child)
 Add a child instance. More...
 
virtual void add_child (recursive_configurable *child)
 Add a child instance. More...
 
virtual void remove_child (configurable *child)
 Remove a child instance. More...
 
virtual void remove_child (recursive_configurable *child)
 Remove a child instance. More...
 
virtual void setup_now (configuration &config=get_global_configuration()) override
 Run recursive_load - recursive_configure - recursive_initialize processes.
 
virtual bool not_recursive () override
 Check if this instance is not derived from recursive_configurable. More...
 
void set_environment (std::string name, const void *value)
 Set the pointer to an environmental value associated with an input name. More...
 
- Public Member Functions inherited from configurable
virtual void load (configuration &config)
 Load the program. Used to load files and libraries into memory. More...
 
virtual void configure (configuration &config)
 Configure the program. Used to load and set parameters. More...
 
- Public Member Functions inherited from module
 module ()
 Default constructor for module.
 
virtual ~module ()
 Default destructor for module.
 
virtual std::string get_module_name () const
 Get the module name. More...
 
- Public Member Functions inherited from credit
 credit ()=default
 Default constructor.
 
 credit (std::string name, std::string argument_name)
 Constructor for credit. More...
 
virtual void set_name (std::string name, std::string argument_name="")
 Set name (and perhaps, argument name together) More...
 
virtual std::string get_name () const
 Get the name.
 
virtual void set_argument_name (std::string argument_name)
 Set an argument name. More...
 
virtual std::string get_argument_name () const
 Get an argument name. More...
 
virtual double get_version () const
 Get version. More...
 
virtual std::string get_author () const
 Get author's name. More...
 
virtual std::tuple< int, int, int > get_date () const
 Get currently set date. More...
 
virtual std::string get_email_address () const
 Get email address. More...
 
- Public Member Functions inherited from messageable
virtual bool send_message (std::string message, void *ptr=nullptr)
 Send a message. More...
 
virtual bool const_send_message (std::string message, void *ptr=nullptr) const
 Send a message. More...
 
- Public Member Functions inherited from graphics_engine
virtual ~graphics_engine ()=default
 Default destructor.
 
virtual void setup_graphics (std::map< std::string, const void * > params=std::map< std::string, const void * >())=0
 Initialize graphics engine.
 
virtual std::string get_graphics_engine_name () const =0
 Get the name of the graphics engine. More...
 
virtual bool get_supported (FEATURE feature) const =0
 Get if a specified feature is supported. More...
 
virtual void set_viewport (unsigned x, unsigned y, unsigned width, unsigned height)=0
 Set view port.
 
virtual void get_viewport (unsigned &x, unsigned &y, unsigned &width, unsigned &height) const =0
 Get view port.
 
virtual void set_2D_coordinate (double left, double right, double bottom, double top)=0
 Configure 2D coordinate view. More...
 
virtual void look_at (const double target[3], const double position[3], const double up[3], double fov, double near, double far)=0
 Set up a camera with a target position, origin position and fov. More...
 
virtual void clear ()=0
 Clear out the canvas.
 
virtual void get_background_color (double color[3]) const =0
 Get the background color.
 
virtual void get_foreground_color (double color[3]) const =0
 Get the foreground color.
 
void color3 (double r, double g, double b)
 Equivalebt to glColor. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glColor.xml.
 
void color4 (double r, double g, double b, double a)
 Equivalebt to glColor. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glColor.xml.
 
template<class T >
void color3v (const T *v)
 Equivalebt to glColor. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glColor.xml.
 
virtual void color4v (const double *v)=0
 Equivalebt to glColor. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glColor.xml.
 
void color4v (const float *v)
 Equivalebt to glColor. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glColor.xml.
 
void vertex2 (double x, double y)
 Equivalebt to glVertex. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glVertex.xml.
 
void vertex3 (double x, double y, double z)
 Equivalebt to glVertex. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glVertex.xml.
 
virtual void begin (MODE mode)=0
 Equivalebt to glBegin. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glBegin.xml.
 
virtual void end ()=0
 Equivalebt to glEnd. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glEnd.xml.
 
virtual void point_size (double size)=0
 Equivalebt to glPointSize. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glPointSize.xml.
 
virtual void line_width (double width)=0
 Equivalebt to glLineWidth. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glLineWidth.xml.
 
template<class T >
void vertex2v (const T *v)
 Equivalebt to glVertex. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glVertex.xml.
 
virtual void vertex3v (const double *v)=0
 Equivalebt to glVertex. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glVertex.xml.
 
void vertex3v (const float *v)
 Equivalebt to glVertex. See https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glVertex.xml.
 
virtual void draw_string (const double *v, std::string str, unsigned size=0)=0
 Draw a string at the current position. More...
 
- Static Public Member Functions inherited from configurable
static configurationset_global_configuration (const configuration &config)
 Assign the global settings of the program. More...
 
static configurationget_global_configuration ()
 Get the global settings of the program. More...
 
template<class T >
static const T & get_env (const environment_map &environment, std::string key)
 Extract an specified type of pointer from the input environment. More...
 
- Static Public Member Functions inherited from module
static std::string module_libpath (std::string module_name)
 Get the path to the dynamic library. e.g., "mylib" -> "symlink-public/lib/libshiokaze_mylib.dylib". More...
 
static modulealloc_module (configuration &config, std::string arg_name, std::string default_module_name, std::string description)
 Automatically reads the parameter "arg_name" to fetch the name for the library, and allocate the library. More...
 
static modulealloc_module (std::string path)
 Reads the dynamic library of a class module, allocate, and return the pointer to it. More...
 
static unsigned close_all_handles ()
 Close all the handles that are still unloaded. More...
 
template<class T >
static std::unique_ptr< T > unique_alloc_module (configuration &config, std::string arg_name, std::string default_module_name, std::string description)
 Allocate the module and cast to the a specified class T. More...
 
static unsigned count_open_modules ()
 Count all the open modules. More...
 
- Protected Member Functions inherited from configurable
bool check_set (const environment_map &environment, std::vector< std::string > names)
 Check if the values for a variable keys exist. More...
 
- Protected Attributes inherited from credit
std::string m_name
 Name of credit.
 
std::string m_argument_name
 Argument name.
 

Detailed Description

Graphics engine moduled interface.


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