Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SiRenderArea.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2019 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20
21#ifndef SI_RENDERAREA
22#define SI_RENDERAREA
23
24#include <Inventor/nodes/SoNode.h>
25#include <Inventor/SbColorRGBA.h>
26#include <Inventor/SbVec.h>
27#include <Inventor/SbEventArg.h>
28#include <Inventor/SbEventHandler.h>
29
44{
45
46public:
47
54 virtual void setSceneGraph(SoNode *newScene) = 0;
55
59 virtual SoNode* getSceneGraph() const = 0;
60
75
82 virtual void setClearPolicy(ClearPolicy policy) = 0;
83
87 virtual ClearPolicy getClearPolicy() const = 0;
88
95 virtual void setClearColor(const SbColorRGBA& color) = 0;
96
100 virtual SbColorRGBA getClearColor() const = 0;
101
108 virtual void setClearDepth(float depth) = 0;
109
113 virtual float getClearDepth() const = 0;
114
118 virtual void setSize(const SbVec2i32& size) = 0;
119
123 virtual SbVec2i32 getSize() const = 0;
124
141
146 virtual RenderStatus render() = 0;
147
152 {
153 public:
155 m_source(source)
156 {}
157
159 {
160 return m_source;
161 }
162 private:
163 SiRenderArea* m_source;
164 };
165
170};
171
172#endif // SI_RENDERAREA
ColorRGBA vector class.
Definition SbColorRGBA.h:61
Base class for all event arguments.
Definition SbEventArg.h:41
Class representing an event.
2D vector class.
Definition SbVec.h:517
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> RenderArea inter...
virtual SbEventHandler< RenderEventArg & > & onStartRender()=0
Returns the event handler that raises when a new render starts.
virtual SbVec2i32 getSize() const =0
virtual void setClearDepth(float depth)=0
Defines the depth value used when the depth buffer is cleared.
virtual void setSize(const SbVec2i32 &size)=0
Defines the size to use for rendering.
RenderStatus
Returned by the render method.
@ ABORTED
The frame rendering has been ended before its completion.
@ STILL
The frame has been rendered in still mode.
@ INTERACTIVE
The frame has been rendered in interactive mode (some shapes may have been rendered with low quality ...
virtual SoNode * getSceneGraph() const =0
virtual void setClearPolicy(ClearPolicy policy)=0
Defines the color buffer and depth buffer clear policy.
virtual SbColorRGBA getClearColor() const =0
virtual float getClearDepth() const =0
ClearPolicy
Policy values to clear color and depth buffers beforing rendering.
@ COLORBUFFER
Clear only color buffer beforing rendering.
@ COLORBUFFER_AND_DEPTHBUFFER
Clear both color buffer and depth buffer beforing rendering.
@ NONE
Do not clear both color buffer and depth buffer beforing rendering.
@ DEPTHBUFFER
Clear only depth buffer beforing rendering.
virtual void setSceneGraph(SoNode *newScene)=0
Defines the scene graph which is managed here.
virtual ClearPolicy getClearPolicy() const =0
virtual RenderStatus render()=0
Render the managed scene graph (see setSceneGraph).
virtual void setClearColor(const SbColorRGBA &color)=0
Defines the RGBA value used when the color buffer is cleared.
Abstract base class for all database nodes.
Definition SoNode.h:145
Structure given when a start render event is raised.
SiRenderArea * getSource() const
RenderEventArg(SiRenderArea *source)