Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoLogicalViewportElement.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 : Pierre Stefani (MMM yyyy)
22**=======================================================================*/
23
24#ifndef _SO_LOGICAL_VIEW_PORT_ELEMENT
25#define _SO_LOGICAL_VIEW_PORT_ELEMENT
26
29
55
57
58 public:
62 static void set(SoState *state, const SbViewportRegion &vp);
63
67 static const SbViewportRegion &get(SoState *state);
68
73 { return SbViewportRegion(SbVec2s(100, 100)); }
74
81 SbBool &elemIsSet);
82
86 virtual void print(FILE *fp) const;
87
88private:
89
91 virtual void init(SoState *state);
92
96 virtual SbBool matches(const SoElement* elt) const;
97
101 virtual SoElement* copyMatchInfo() const;
102
103 private:
104 // Initializes the SoLogicalViewportElement class
105 static void initClass();
106 static void exitClass();
107
108 private:
109
111
112private:
113 SbViewportRegion m_viewport;
114 SbBool m_isSet;
115};
116#endif /* _SO_LOGICAL_VIEW_PORT_ELEMENT */
117
#define SoEXTENDER_Documented
static void init()
#define SO_ELEMENT_HEADER(className)
2D vector class.
Definition SbVec.h:700
Class for representing a viewport.
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 logic...
static const SbViewportRegion & get(SoState *state)
Returns the current viewport region from the state.
static SbViewportRegion getDefaultViewport()
Returns the default viewport region.
static void set(SoState *state, const SbViewportRegion &vp)
Sets the viewport region.
virtual void print(FILE *fp) const
Prints element (for debugging).
static SoLogicalViewportElement * getInstance(const SoState *state, SbBool &elemIsSet)
Return the top (current) instance of the element in the state.
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87