00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _SO_MODIFY_VIEW_VOLUME_ELEMENT
00026 #define _SO_MODIFY_VIEW_VOLUME_ELEMENT
00027
00028 #include <Inventor/elements/SoSubElement.h>
00029 #include <Inventor/SbBox.h>
00030
00049 SoEXTENDER_Documented class SoModifyViewVolumeElement : public SoElement
00050 {
00051
00052 SO_ELEMENT_HEADER(SoModifyViewVolumeElement);
00053
00054 public:
00059 static void set(SoState *state, const SbVec4f &portion);
00064 static void set(SoState *state, const SbBox3f &portion);
00065
00069 static void setInfo(SoState *state, int info);
00073 static int getInfo(SoState *state);
00074
00078 static const SbVec4f &get(SoState *state);
00082 static const SbBox3f &getBox(SoState *state);
00083
00089 static void getWallCoordinates(SoState *state,
00090 SbVec3f &lowerLeft,
00091 SbVec3f &lowerRight,
00092 SbVec3f &upperLeft);
00098 static void setWallCoordinates(SoState *state,
00099 SbVec3f lowerLeft,
00100 SbVec3f lowerRight,
00101 SbVec3f upperLeft);
00102
00107 static SbBool useWallCoordinates(SoState *state);
00108
00112 static SbVec4f getDefault()
00113 { return SbVec4f(0., 0., 1., 1.); }
00114
00118 static SbBox3f getDefaultBox()
00119 { return SbBox3f(0., 0., 0., 1., 1., 1.); }
00120
00126 static SoModifyViewVolumeElement *getInstance(const SoState *state, SbBool &elemIsSet);
00127
00128 private:
00129
00131 virtual void init(SoState *state);
00132
00136 virtual SbBool matches(const SoElement* elt) const;
00137
00141 virtual SoElement* copyMatchInfo() const;
00142
00143 private:
00144
00145 static void initClass();
00146 static void exitClass();
00147
00148 private:
00149 virtual ~SoModifyViewVolumeElement();
00150
00151 int info;
00152 SbBool isSet;
00153 SbBox3f screenPortionBox;
00154 SbVec4f screenPortion;
00155 SbVec3f _lowerLeft, _lowerRight, _upperLeft;
00156 SbBool _useWall;
00157 };
00158
00159 #endif // _SO_MODIFY_VIEW_VOLUME_ELEMENT
00160
00161
00162