Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoModifyViewVolumeElement.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-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Julien Chaplier (MMM yyyy)
22** Modified by : Olivier Fedkiw (MMM yyyy)
23**=======================================================================*/
24
25#ifndef _SO_MODIFY_VIEW_VOLUME_ELEMENT
26#define _SO_MODIFY_VIEW_VOLUME_ELEMENT
27
28#include <Inventor/elements/SoSubElement.h>
29#include <Inventor/SbBox.h>
30
49SoEXTENDER_Documented class SoModifyViewVolumeElement : public SoElement
50{
51
52 SO_ELEMENT_HEADER(SoModifyViewVolumeElement);
53
54 public:
59 static void set(SoState *state, const SbVec4f &portion);
64 static void set(SoState *state, const SbBox3f &portion);
65
69 static void setInfo(SoState *state, int info);
73 static int getInfo(SoState *state);
74
78 static const SbVec4f &get(SoState *state);
82 static const SbBox3f &getBox(SoState *state);
83
89 static void getWallCoordinates(SoState *state,
90 SbVec3f &lowerLeft,
91 SbVec3f &lowerRight,
92 SbVec3f &upperLeft);
98 static void setWallCoordinates(SoState *state,
99 SbVec3f lowerLeft,
100 SbVec3f lowerRight,
101 SbVec3f upperLeft);
102
108
113 { return SbVec4f(0., 0., 1., 1.); }
114
119 { return SbBox3f(0., 0., 0., 1., 1., 1.); }
120
126 static SoModifyViewVolumeElement *getInstance(const SoState *state, SbBool &elemIsSet);
127
128private:
129
131 virtual void init(SoState *state);
132
136 virtual SbBool matches(const SoElement* elt) const;
137
141 virtual SoElement* copyMatchInfo() const;
142
143 private:
144 // Initializes the SubViewVolumeElement class
145 static void initClass();
146 static void exitClass();
147
148 private:
150
151 int info;
152 SbBool isSet;
153 SbBox3f screenPortionBox;
154 SbVec4f screenPortion;
155 SbVec3f _lowerLeft, _lowerRight, _upperLeft;
156 SbBool _useWall;
157};
158
159#endif // _SO_MODIFY_VIEW_VOLUME_ELEMENT
160
161
3D box class.
Definition SbBox.h:649
3D vector class.
Definition SbVec.h:932
4D vector class.
Definition SbVec.h:2214
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 a view vo...
static SoModifyViewVolumeElement * getInstance(const SoState *state, SbBool &elemIsSet)
Return the top (current) instance of the element in the state Note it does NOT cause cache dependency...
static void set(SoState *state, const SbVec4f &portion)
Sets the current portion in the state to the given portion (left, bottom, right, top).
static void set(SoState *state, const SbBox3f &portion)
Sets the current portion in the state to the given portion (left, bottom, right, top).
static const SbVec4f & get(SoState *state)
Returns the current portion of the view volume from the state.
static void getWallCoordinates(SoState *state, SbVec3f &lowerLeft, SbVec3f &lowerRight, SbVec3f &upperLeft)
Returns the current coordinates of the virtual window in the real world.
static const SbBox3f & getBox(SoState *state)
Returns the current portion of the view volume from the state.
static void setWallCoordinates(SoState *state, SbVec3f lowerLeft, SbVec3f lowerRight, SbVec3f upperLeft)
Sets the current coordinates of the virtual window in the real world.
static SbBox3f getDefaultBox()
Returns the default screen portion.
static int getInfo(SoState *state)
Gets an integer info.
static SbBool useWallCoordinates(SoState *state)
Returns a boolean telling the Camera to compute a view volume using the wall coordinates.
static SbVec4f getDefault()
Returns the default screen portion.
static void setInfo(SoState *state, int info)
Sets an integer info.
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87