Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
TissueForge::rendering Namespace Reference

Tissue Forge rendering and visualization. More...

Classes

struct  Angle3DInstanceData
 
struct  AngleRenderer
 
struct  AngleRenderer3D
 
struct  Application
 
struct  ApplicationConfig
 
class  ArcBall
 
class  ArcBallCamera
 
class  ArcBallInteractor
 
struct  ArrowData
 Vector visualization specification. More...
 
struct  ArrowInstanceData
 
struct  ArrowRenderer
 Vector renderer. More...
 
struct  Bond3DInstanceData
 
struct  BondRenderer
 
struct  BondRenderer3D
 
struct  BondsInstanceData
 
struct  ClipPlane
 
struct  ClipPlanes
 
struct  ColorMapper
 The color mapping type. More...
 
struct  DihedralRenderer
 
struct  DihedralRenderer3D
 
class  EGLInfo
 
class  GlfwApplication
 
struct  GlfwWindow
 
class  GLInfo
 
struct  OrientationRenderer
 Orientaton renderer. More...
 
struct  Plane3DInstanceData
 
struct  Renderer
 
struct  SphereInstanceData
 
struct  Style
 The Tissue Forge style type. More...
 
struct  SubRenderer
 
struct  UniverseRenderer
 
struct  Window
 
struct  WindowlessApplication
 

Typedefs

typedef float(* ParticleColorMapperFunc) (TissueForge::Particle *o, struct ColorMapper *mapper)
 
typedef float(* AngleColorMapperFunc) (TissueForge::Angle *o, struct ColorMapper *mapper)
 
typedef float(* BondColorMapperFunc) (TissueForge::Bond *o, struct ColorMapper *mapper)
 
typedef float(* DihedralColorMapperFunc) (TissueForge::Dihedral *o, struct ColorMapper *mapper)
 
typedef fVector4(* ColorMapperFunc) (struct ColorMapper *mapper, const float &s)
 
typedef enum TissueForge::rendering::SubRendererFlag SubRendererFlag
 

Enumerations

enum  WindowAttributes {
  TF_FOCUSED = GLFW_FOCUSED , TF_ICONIFIED = GLFW_ICONIFIED , TF_RESIZABLE = GLFW_RESIZABLE , TF_VISIBLE = GLFW_VISIBLE ,
  TF_DECORATED = GLFW_DECORATED , TF_AUTO_ICONIFY = GLFW_AUTO_ICONIFY , TF_FLOATING = GLFW_FLOATING , TF_MAXIMIZED = GLFW_MAXIMIZED ,
  TF_CENTER_CURSOR = GLFW_CENTER_CURSOR , TF_TRANSPARENT_FRAMEBUFFER = GLFW_TRANSPARENT_FRAMEBUFFER , TF_HOVERED = GLFW_HOVERED , TF_FOCUS_ON_SHOW = GLFW_FOCUS_ON_SHOW ,
  TF_RED_BITS = GLFW_RED_BITS , TF_GREEN_BITS = GLFW_GREEN_BITS , TF_BLUE_BITS = GLFW_BLUE_BITS , TF_ALPHA_BITS = GLFW_ALPHA_BITS ,
  TF_DEPTH_BITS = GLFW_DEPTH_BITS , TF_STENCIL_BITS = GLFW_STENCIL_BITS , TF_ACCUM_RED_BITS = GLFW_ACCUM_RED_BITS , TF_ACCUM_GREEN_BITS = GLFW_ACCUM_GREEN_BITS ,
  TF_ACCUM_BLUE_BITS = GLFW_ACCUM_BLUE_BITS , TF_ACCUM_ALPHA_BITS = GLFW_ACCUM_ALPHA_BITS , TF_AUX_BUFFERS = GLFW_AUX_BUFFERS , TF_STEREO = GLFW_STEREO ,
  TF_SAMPLES = GLFW_SAMPLES , TF_SRGB_CAPABLE = GLFW_SRGB_CAPABLE , TF_REFRESH_RATE = GLFW_REFRESH_RATE , TF_DOUBLEBUFFER = GLFW_DOUBLEBUFFER ,
  TF_CLIENT_API = GLFW_CLIENT_API , TF_CONTEXT_VERSION_MAJOR = GLFW_CONTEXT_VERSION_MAJOR , TF_CONTEXT_VERSION_MINOR = GLFW_CONTEXT_VERSION_MINOR , TF_CONTEXT_REVISION = GLFW_CONTEXT_REVISION ,
  TF_CONTEXT_ROBUSTNESS = GLFW_CONTEXT_ROBUSTNESS , TF_OPENGL_FORWARD_COMPAT = GLFW_OPENGL_FORWARD_COMPAT , TF_OPENGL_DEBUG_CONTEXT = GLFW_OPENGL_DEBUG_CONTEXT , TF_OPENGL_PROFILE = GLFW_OPENGL_PROFILE ,
  TF_CONTEXT_RELEASE_BEHAVIOR = GLFW_CONTEXT_RELEASE_BEHAVIOR , TF_CONTEXT_NO_ERROR = GLFW_CONTEXT_NO_ERROR , TF_CONTEXT_CREATION_API = GLFW_CONTEXT_CREATION_API , TF_SCALE_TO_MONITOR = GLFW_SCALE_TO_MONITOR ,
  TF_COCOA_RETINA_FRAMEBUFFER = GLFW_COCOA_RETINA_FRAMEBUFFER , TF_COCOA_FRAME_NAME = GLFW_COCOA_FRAME_NAME , TF_COCOA_GRAPHICS_SWITCHING = GLFW_COCOA_GRAPHICS_SWITCHING , TF_X11_CLASS_NAME = GLFW_X11_CLASS_NAME ,
  TF_X11_INSTANCE_NAME = GLFW_X11_INSTANCE_NAME
}
 
enum  Renderer_Kind {
  RENDERER_WINDOWED = 1 << 0 , RENDERER_HEADLESS = 1 << 1 , RENDERER_WINDOWED_MAC = (1 << 2) | (1 << 0) , RENDERER_HEADLESS_MAC = (1 << 2) | (1 << 1) ,
  RENDERER_WINDOWED_EGL = (1 << 2) | (1 << 0) , RENDERER_HEADLESS_EGL = (1 << 2) | (1 << 1) , RENDERER_WINDOWED_WINDOWS = (1 << 2) | (1 << 0) , RENDERER_HEADLESS_WINDOWS = (1 << 2) | (1 << 1) ,
  RENDERER_WINDOWED_GLX = (1 << 2) | (1 << 0) , RENDERER_HEADLESS_GLX = (1 << 2) | (1 << 1)
}
 
enum  SubRendererFlag {
  SUBRENDERER_ANGLE = 1 << 0 , SUBRENDERER_ARROW = 1 << 1 , SUBRENDERER_BOND = 1 << 2 , SUBRENDERER_DIHEDRAL = 1 << 3 ,
  SUBRENDERER_ORIENTATION = 1 << 4
}
 

Functions

void render_arc3d (rendering::Angle3DInstanceData *arcData, const unsigned int &idx, const fVector3 &posi, const fVector3 &posj, const fVector3 &posk, const fVector4 &color, const unsigned int &numSegments, const unsigned int &faceDetail, const float &radius)
 
Corrade::Containers::Array< char > JpegImageData ()
 
Corrade::Containers::Array< char > BMPImageData ()
 
Corrade::Containers::Array< char > HDRImageData ()
 
Corrade::Containers::Array< char > PNGImageData ()
 
Corrade::Containers::Array< char > TGAImageData ()
 
std::tuple< char *, size_t > framebufferImageData ()
 
HRESULT screenshot (const std::string &filePath)
 Save a screenshot of the current scene.
 
fMatrix3 vectorFrameRotation (const fVector3 &vec)
 Generates a 3x3 rotation matrix into the frame of a vector.
 
void render_bond3d (rendering::Bond3DInstanceData *bondData, const int &idx, const fVector3 &pipos, const fVector3 &pjpos, const fVector4 &color, const float &radius)
 
ClipPlanesgetClipPlanes ()
 
ColorMapperFunc getColorMapperFunc (const std::string &name)
 
std::vector< std::string > getColorMapperFuncNames ()
 
void render_plane3d (rendering::Plane3DInstanceData *planeData, const unsigned int &idx, const fVector3 &posi, const fVector3 &posj, const fVector3 &posk, const fVector4 &color)
 
std::unordered_map< std::string, std::string > glInfo ()
 
std::string eglInfo ()
 
std::string gl_info ()
 
Corrade::Containers::Array< char > convertImageDataToJpeg (const Magnum::ImageView2D &image, int jpegQuality=100)
 
Corrade::Containers::Array< char > convertImageDataToBMP (const Magnum::ImageView2D &image)
 
Corrade::Containers::Array< char > convertImageDataToHDR (const Magnum::ImageView2D &image)
 
Corrade::Containers::Array< char > convertImageDataToPNG (const Magnum::ImageView2D &image)
 
Corrade::Containers::Array< char > convertImageDataToTGA (const Magnum::ImageView2D &image)
 
uint32_t availableRenderers ()
 
HRESULT pollEvents ()
 
HRESULT waitEvents (double timeout)
 
HRESULT postEmptyEvent ()
 
HRESULT initializeGraphics ()
 

Detailed Description

Tissue Forge rendering and visualization.

Derived from Magnum, with the following notice:

Original authors — credit is appreciated but not required:

   2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 —
       Vladimír Vondruš <mosra@centrum.cz>
   2020 — Nghia Truong <nghiatruong.vn@gmail.com>

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Function Documentation

◆ convertImageDataToJpeg()

Corrade::Containers::Array< char > TissueForge::rendering::convertImageDataToJpeg ( const Magnum::ImageView2D & image,
int jpegQuality = 100 )

jpegQuality shall construct JPEG quantization tables for the given quality setting. The quality value ranges from 0..100.

◆ getClipPlanes()

ClipPlanes * TissueForge::rendering::getClipPlanes ( )

get a reference to the cut planes collection.

◆ screenshot()

HRESULT TissueForge::rendering::screenshot ( const std::string & filePath)

Save a screenshot of the current scene.

Parameters
filePathpath of file to save
Returns
HRESULT

◆ vectorFrameRotation()

fMatrix3 TissueForge::rendering::vectorFrameRotation ( const fVector3 & vec)

Generates a 3x3 rotation matrix into the frame of a vector.

The orientation of the second and third axes of the resulting transformation are arbitrary.

Parameters
vecVector along which the first axis of the transformed frame is aligned.
Returns
fMatrix3