27 #include <unordered_set> 
   82               void*          onWndUpdateCallback,
 
   83               void*          onSelectNodeMeshCallback,
 
   85               const string&  configPath);
 
  214         return &_optixRaytracer;
 
  216     SLOptixPathtracer* optixPathtracer() { 
return &_optixPathtracer; }
 
  288     SLOptixPathtracer _optixPathtracer; 
 
SLProjType
Enumeration for different camera projections.
 
@ P_monoPerspective
standard mono pinhole perspective projection
 
SLRenderType
Rendering type enumeration.
 
SLMouseButton
Mouse button codes.
 
SLViewportAlign
Mouse button codes.
 
SLKey
Keyboard key codes enumeration.
 
typedef void(SL_STDCALL *cbOnImGuiBuild)(SLScene *s
Callback function typedef for ImGui build function.
 
OpenGL Frame Buffer Object for the Oculus Rift Display.
 
Extension class with functions for quick line & point drawing.
 
Wrapper Class around the external ImGui GUI-framework.
 
deque< SLNode * > SLVNode
SLVNode typedef for a vector of SLNodes.
 
void(SL_STDCALL * cbOnSelectNodeMesh)(SLNode *, SLMesh *)
Callback function typedef for select node.
 
SLbool(SL_STDCALL * cbOnWndUpdate)()
Callback function typedef for GUI window updateRec.
 
SLSceneView *SL_STDCALL * cbOnNewSceneView(SLScene *s, int dotsPerInch, SLInputManager &inputManager)
Callback function typedef for custom SLSceneView derived creator function.
 
vector< SLSceneView * > SLVSceneView
 
Active or visible camera node class.
 
Drawing states stored in the bits of an unsigned int.
 
SLbool get(SLuint bit)
Returns the specified bit.
 
Wrapper around Oculus Rift and its Frame Buffer Objects.
 
SLGLVertexArray adds Helper Functions for quick Line & Point Drawing.
 
ImGui Interface class for forwarding all events to the original ImGui Handlers.
 
Abstract Light class for OpenGL light sources.
 
An SLMesh object is a triangulated mesh, drawn with one draw call.
 
SLNode represents a node in a hierarchical scene graph.
 
Base class for all other classes.
 
const SLstring & name() const
 
Classic Monte Carlo Pathtracing algorithm for real global illumination.
 
SLRaytracer hold all the methods for Whitted style Ray Tracing.
 
The SLScene class represents the top level instance holding the scene structure.
 
SceneView class represents a dynamic real time 3D view onto the scene.
 
SLKey _mouseMod
mouse modifier key on key down
 
SLfloat _draw2DTimeMS
time for 2D drawing in ms
 
SLbool _screenCaptureIsRequested
Flag if screen capture is requested.
 
SLPathtracer _pathtracer
Pathtracer.
 
AvgFloat & shadowMapTimeMS()
 
std::unordered_set< SLMaterial * > _visibleMaterials2D
visible materials 2D per frame
 
SLint _scrW
Screen width in pixels.
 
void draw3DGLLinesOverlay(SLVNode &nodes)
 
SLVNode & nodesOpaque2D()
 
SLRecti viewportRect() const
 
void switchToNextCameraInScene()
Sets the active camera to the next in the scene.
 
std::unordered_set< SLMaterial * > _visibleMaterials3D
visible materials 3D per frame
 
SLbool doWaitOnIdle() const
 
AvgFloat & draw3DTimesMS()
 
SLbool screenCaptureIsRequested()
 
SLbool _stopPT
Flag to stop the PT.
 
SLNodeStats _stats3D
Statistic numbers for 3D nodes.
 
SLfloat _scrWdivH
Screen side aspect ratio.
 
SLint _screenCaptureWaitFrames
Frames to delay the screen capture.
 
virtual SLbool onDoubleClick(SLMouseButton button, SLint x, SLint y, SLKey mod)
 
SLint _scrH
Screen height in pixels.
 
void doMultiSampling(SLbool doMS)
 
SLRaytracer _raytracer
Whitted style raytracer.
 
SLbool _gotPainted
flag if this sceneview got painted
 
virtual SLbool onMouseWheelPos(SLint wheelPos, SLKey mod)
 
SLbool _mouseDownM
Flag if middle mouse button is pressed.
 
SLbool isSceneViewCameraActive()
 
SLVNode _nodesBlended3D
Vector of visible blended nodes not in _visibleMaterials3D rendered in 3D.
 
SLVNode _nodesOverdrawn
Vector of helper nodes drawn over all others.
 
void draw3DGLNodes(SLVNode &nodes, SLbool alphaBlended, SLbool depthSorted)
 
cbOnWndUpdate onWndUpdate
C-Callback for app for intermediate window repaint.
 
SLVNode _nodesOpaque2D
Vector of visible opaque nodes not in _visibleMaterials2D rendered in 2D.
 
virtual SLbool onCharInput(SLuint c)
 
void doDepthTest(SLbool doDT)
 
SLVNode _nodesBlended2D
Vector of visible blended nodes not in _visibleMaterials2D rendered in 2D.
 
SLbool doDepthTest() const
 
SLbool _doMultiSampling
Flag if multisampling is on.
 
SLRenderType _renderType
rendering type (GL,RT,PT)
 
SLGLOculusFB _oculusFB
Oculus framebuffer.
 
void draw3DGLLines(SLVNode &nodes)
 
SLVNode & nodesOpaque3D()
 
void startPathtracing(SLint maxDepth, SLint samples)
 
SLVNode & nodesBlended2D()
 
void onResize(SLint width, SLint height)
 
cbOnSelectNodeMesh onSelectedNodeMesh
C-Callback for app on node selection.
 
SLbool _mouseDownL
Flag if left mouse button is pressed.
 
void switchToSceneViewCamera()
 
virtual void postSceneLoad()
 
std::unordered_set< SLMaterial * > & visibleMaterials3D()
 
SLRecti _viewportRect
rectangle of viewport
 
AvgFloat & draw2DTimesMS()
 
SLVNode _nodesOpaque3D
Vector of visible opaque nodes not in _visibleMaterials3D rendered in 3D.
 
SLGLVertexArrayExt _vaoTouch
Buffer for touch pos. rendering.
 
SLUiInterface * _gui
new tighter imgui wrapper
 
SLbool doFrustumCulling() const
 
SLViewportAlign _viewportAlign
alignment of viewport
 
SLbool _doFrustumCulling
Flag if view frustum culling is on.
 
SLfloat _draw3DTimeMS
time for 3D drawing in ms
 
SLint _scrWdiv2
Screen half width in pixels.
 
SLbool _doWaitOnIdle
Flag for Event waiting.
 
virtual SLbool onMouseMove(SLint x, SLint y)
 
friend class SLOptixRaytracer
 
SLbool _doAlphaSorting
Flag if alpha sorting in blending is on.
 
SLint _scrHdiv2
Screen half height in pixels.
 
void camera(SLCamera *camera)
 
AvgFloat _shadowMapTimesMS
Averaged time for drawing the shadow maps in ms.
 
SLGLOculusFB * oculusFB()
 
SLNodeStats _stats2D
Statistic numbers for 2D nodes.
 
SLbool _mouseDownR
Flag if right mouse button is pressed.
 
void init(SLstring name, SLint screenWidth, SLint screenHeight, void *onWndUpdateCallback, void *onSelectNodeMeshCallback, SLUiInterface *gui, const string &configPath)
 
SLbool doMultiSampling() const
 
SLPathtracer * pathtracer()
 
void viewportSameAsVideo(bool sameAsVideo)
 
void startRaytracing(SLint maxDepth)
 
SLbool drawBit(SLuint bit)
 
void initSceneViewCamera(const SLVec3f &dir=-SLVec3f::AXISZ, SLProjType proj=P_monoPerspective)
 
void renderType(SLRenderType rt)
 
virtual SLbool onKeyRelease(SLKey key, SLKey mod)
 
SLbool doAlphaSorting() const
 
SLRenderType renderType() const
 
SLbool _viewportSameAsVideo
Adapt viewport aspect to the input video.
 
SLbool _doDepthTest
Flag if depth test is turned on.
 
SLbool _isFirstFrame
Flag if it is the first frame rendering.
 
void saveFrameBufferAsImage(SLstring pathFilename, cv::Size targetSize=cv::Size(-1, -1))
Saves after n wait frames the front frame buffer as a PNG image.
 
SLSceneView(SLScene *s, int dpi, SLInputManager &inputManager)
SLSceneView default constructor.
 
void doAlphaSorting(SLbool doAS)
 
AvgFloat _cullTimesMS
Averaged time for culling in ms.
 
SLVNode & nodesBlended3D()
 
virtual SLbool onMouseWheel(SLint delta, SLKey mod)
 
SLGLVertexArrayExt _vaoCursor
Virtual cursor for stereo rendering.
 
SLint _touchDowns
finger touch down count
 
SLVec2i _touch[3]
up to 3 finger touch coordinates
 
SLInputManager & _inputManager
 
SLCamera _sceneViewCamera
Default camera for this SceneView (default cam not in scenegraph)
 
AvgFloat _draw2DTimesMS
Averaged time for 2D drawing in ms.
 
SLfloat _cullTimeMS
time for culling in ms
 
SLVec2i viewportRatio() const
 
SLRaytracer * raytracer()
 
SLVec2i _viewportRatio
ratio of viewport
 
int _dpi
dots per inch of screen
 
virtual SLbool onTouch2Move(SLint scrX1, SLint scrY1, SLint scrX2, SLint scrY2)
 
virtual SLbool onMouseUp(SLMouseButton button, SLint scrX, SLint scrY, SLKey mod)
 
SLVNode & nodesOverdrawn()
 
SLScene * _s
Pointer to the scene observed by this scene view.
 
SLfloat _shadowMapTimeMS
time for drawing the shadow maps in ms
 
void setViewportFromRatio(const SLVec2i &vpRatio, SLViewportAlign vpAlignment, SLbool vpSameAsVideo)
Sets the viewport ratio and the viewport rectangle.
 
virtual SLbool onKeyPress(SLKey key, SLKey mod)
 
void scene(SLScene *scene)
 
AvgFloat _draw3DTimesMS
Averaged time for 3D drawing in ms.
 
virtual SLbool onMouseDown(SLMouseButton button, SLint scrX, SLint scrY, SLKey mod)
 
SLViewportAlign viewportAlign() const
 
SLfloat viewportWdivH() const
 
void doFrustumCulling(SLbool doFC)
 
SLbool viewportSameAsVideo() const
 
virtual SLbool onTouch2Up(SLint scrX1, SLint scrY1, SLint scrX2, SLint scrY2)
 
SLCamera * _camera
Pointer to the _active camera.
 
void doWaitOnIdle(SLbool doWI)
 
void screenCaptureIsRequested(bool doScreenCap)
 
SLDrawBits _drawBits
Sceneview level drawing flags.
 
SLbool _stopRT
Flag to stop the RT.
 
std::unordered_set< SLMaterial * > & visibleMaterials2D()
 
SLCamera * sceneViewCamera()
 
SLbool draw3DGL(SLfloat elapsedTimeSec)
Draws the 3D scene with OpenGL.
 
virtual SLbool onTouch2Down(SLint scrX1, SLint scrY1, SLint scrX2, SLint scrY2)
 
Interface for ui integration in SLSceneView.
 
virtual void drawMouseCursor(bool doDraw)
Turns on or off the mouse cursor drawing.
 
Struct for scene graph statistics.
 
void print() const
Prints all statistic informations on the std out stream.