Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoUpdateAreaElement.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-2020 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19 =================================================================================*/
20
21#ifndef SO_UPDATE_AREA_ELEMENT
22#define SO_UPDATE_AREA_ELEMENT
23
24#include <Inventor/SbLinear.h>
25#include <Inventor/elements/SoSubElement.h>
26
52{
53
54 SO_ELEMENT_HEADER( SoUpdateAreaElement );
55
56public:
60 static void set( SoState* state, const SbVec2f& origin, const SbVec2f& size );
61
66 static bool get( SoState* state, SbVec2f& origin, SbVec2f& size );
67
71 static SbVec2f getDefaultOrigin() { return SbVec2f( 0.0f, 0.0f ); }
72
76 static SbVec2f getDefaultSize() { return SbVec2f( 0.0f, 0.0f ); }
77
81 virtual void push( SoState* state );
82
86 virtual void print( FILE* fp ) const;
87
88private:
89 static void initClass();
90 static void exitClass();
91
92private:
93
95 virtual void init( SoState* state );
96
100 virtual SbBool matches( const SoElement* elt ) const;
101
105 virtual SoElement* copyMatchInfo() const;
106
110 virtual void setElt( SoState* state, const SbVec2f& origin, const SbVec2f& size );
111
112 SbVec2f m_origin;
113 SbVec2f m_size;
114
115 virtual ~SoUpdateAreaElement();
116};
117
118#endif /* SO_UPDATE_AREA_ELEMENT */
2D vector class.
Definition SbVec.h:76
Abstract base class for all state elements.
Definition SoElement.h:102
Traversal state.
Definition SoState.h:74
Stores the rectangular area within the current viewport region that needs to be updated when renderin...
static SbVec2f getDefaultSize()
Returns the default update area size.
virtual void push(SoState *state)
Overrides push() method to copy values from next instance in the stack.
static void set(SoState *state, const SbVec2f &origin, const SbVec2f &size)
Sets the current update area in the state.
static SbVec2f getDefaultOrigin()
Returns the default update area origin.
static bool get(SoState *state, SbVec2f &origin, SbVec2f &size)
Returns current update area from the state.
virtual void print(FILE *fp) const
Prints element (for debugging).
int SbBool
Boolean type.
Definition SbBase.h:87