Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoMPEGNavRenderer.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-2017 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : C. HUFSCHMITT (Jul 2001)
22**=======================================================================*/
23
24#ifndef _SO_MPEGNAVRENDERER_
25#define _SO_MPEGNAVRENDERER_
26
27#include <Inventor/MPEG/SoMPEGRenderer.h>
28#include <Inventor/nodes/SoCamera.h>
29#include <Inventor/sensors/SoFieldSensor.h>
30#include <Inventor/SbBasic.h>
31#include <Inventor/SbPList.h>
32#include <Inventor/nodes/SoDirectionalLight.h>
33#include <Inventor/nodes/SoRotation.h>
34#include <Inventor/SoOffscreenRenderArea.h>
35
36/*----------------------------------------------------------------------------*/
37
63
64 public:
65
73
78
82 virtual void setSceneGraph(SoNode *node);
83
88 virtual void record();
89
94 virtual void stop();
95
116
122
128 void setCamera(SoCamera* camera);
129
134
135 /*----------------------------------------------------------------------------*/
136
137 private:
138 SbPList *getHistory ();
139
140 struct CamPosition {
141 SbVec3f position;
142 SbRotation orientation;
143 float nearDistance;
144 float farDistance;
145 unsigned long time;
146 };
147
148 static void cameraChangedCB(void *render, SoSensor *s);
149
150 void searchCameraAndHeadlight();
151
152 private:
153
154 SoCamera *m_Camera;
155 SoDirectionalLight *m_Light;
156 SoRotation *m_LightRotation;
157 SoFieldSensor *m_Sensor;
158 SbBool m_AdjustFrameRate;
159 SbPList *m_CamHistory;
160
161 SoRef<SoOffscreenRenderArea> m_osRenderArea;
162};/*----------------------------------------------------------------------------*/
163
164#endif /* _SO_MPEGNAVRENDERER_ */
165
166
List of generic (void *) pointers.
Definition SbPList.h:77
Class for representing a rotation.
Definition SbRotation.h:126
3D vector class.
Definition SbVec.h:932
Abstract base class for camera nodes.
Definition SoCamera.h:188
Node representing a directional light source.
Sensor class that can be attached to Open Inventor fields.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Generates MPEG o...
virtual void record()
Starts recording camera movements.
virtual ~SoMPEGNavRenderer()
Destructor.
virtual void stop()
Stops recording camera movements.
void adjustNumFramesPerSecond(SbBool flag)
Specifies whether the camera movements are adjusted to the number of frames per second.
SbBool isAdjustedNumFramesPerSecond() const
Returns whether the camera movements are adjusted to the number of frames per second.
SoCamera * getCamera()
Returns the camera currently used by the MPEG renderer.
virtual void setSceneGraph(SoNode *node)
Sets the scene graph used for generating frames in the MPEG output.
SoMPEGNavRenderer(SoNode *node)
Constructor.
void setCamera(SoCamera *camera)
Specifies the camera to be used by the MPEG renderer.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Base class for g...
Abstract base class for all database nodes.
Definition SoNode.h:145
Smart pointer for any class inheriting SoRefCounter.
Definition SoRef.h:90
Node representing a 3D rotation about an arbitrary axis.
Definition SoRotation.h:98
Abstract base class for Open Inventor sensors.
Definition SoSensor.h:100
int SbBool
Boolean type.
Definition SbBase.h:87