Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoInteractionElement.h
Go to the documentation of this file.
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-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23#ifndef SO_INTERACTION_ELEMENT_H
24#define SO_INTERACTION_ELEMENT_H
25
27
41{
43
44public:
45
49 static void set(SoState *state, bool moving);
50
55 static bool isInteracting(SoState *state);
56
60 static uint32_t getElapsedFrames(SoState* state);
61
65 static double getElapsedSeconds(SoState* state);
66
67private:
68
72 virtual void commonInit();
73
75 virtual SbBool matches(const SoElement* elt) const;
76
78 virtual SoElement* copyMatchInfo() const;
79
80private:
81 static void initClass();
82 static void exitClass();
83
84 bool isInteracting() const;
85
86private:
87 void setElt(SoState *state, bool moving);
88
89 virtual ~SoInteractionElement();
90
91 struct
92 {
93
95
96 uint32_t numFrames;
97
98 double startTime;
99
100 } m_interactionInfos;
101};
102
103#endif // SO_INTERACTION_ELEMENT_H
104
105
#define SoEXTENDER_Documented
#define SO_ELEMENT_HEADER(className)
Abstract base class for all state elements.
Definition SoElement.h:102
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Stores the curre...
static bool isInteracting(SoState *state)
Returns TRUE if a user interaction with the viewer is in progress.
static void set(SoState *state, bool moving)
Sets the current interaction in the state.
static uint32_t getElapsedFrames(SoState *state)
Return number of frames since last interaction flag change.
static double getElapsedSeconds(SoState *state)
Return number of seconds since last interaction flag change.
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87