13#ifndef SO_VIEWPORT_REGION_H
14#define SO_VIEWPORT_REGION_H
20#include <Inventor/fields/SoSFBool.h>
21#include <Inventor/fields/SoSFInt32.h>
22#include <Inventor/nodes/SoSeparator.h>
23#include <Inventor/nodes/SoSubNode.h>
24#include <Inventor/events/SoMouseButtonEvent.h>
25#include <Inventor/sensors/SoFieldSensor.h>
26#include <Inventor/sensors/SoNodeSensor.h>
28#include <Inventor/fields/SoSFVec2f.h>
29#include <Inventor/fields/SoSFEnum.h>
30#include <Inventor/nodes/SoPerspectiveCamera.h>
34class SoGLRenderAction;
35class SoGetBoundingBoxAction;
37class SoViewportRegionWrapper;
60 POSITION_MODE_MAX_AND_SIZE
211 _vprCallbackFunction = cb;
212 _vprCallbackFunctionObject = p;
213 resetViewportRegion();
244 SbBool _calcBBoxIntern;
247 void *_vprCallbackFunctionObject;
#define SOUTILS_EXPORT
System dependent includes. Disables some compiler/linker warnings.
SbViewportRegion(* CallbackFunctionPtr)(void *, SbViewportRegion)
SoViewportRegion()
Constructor.
SoSFFloat y1
First value for viewport region definition in the y-dimension (lower border, upper border or center)
SbViewVolume::ProjectionType _projType
@ POSITION_MODE_CENTER_AND_SIZE
@ POSITION_MODE_MIN_AND_MAX
@ POSITION_MODE_MIN_AND_SIZE
SoSFBool mapEventToViewport
Enable/Disable mapping of event coordinates to the viewport region.
SoSFBool forwardEvents
Enable/Disable forwarding of events to children.
SoSFBool renderDelayedPaths
Enable/Disable delayed path rendering.
SoSFEnum x2ReferenceMode
Reference for x2.
SoSFBool forwardEventsInViewportOnly
If true, only events that occurred in the viewport region will be forwarded.
int getInterpretedPosition(float value, int width, int height, bool isY, ReferenceMode refMode, DomainMode domMode)
Interprets value as position in relation to given size based on the ReferenceMode and the DomainMode.
SoSFEnum x1DomainMode
Domain of x1.
SbViewportRegion getViewportRegion(SoState *state)
Computes the ViewportRegion.
SoSFFloat borderAlpha
Alpha used for drawing the border.
SoRef< SoCamera > _insetCam
void onVPRFieldChanged(SoField *)
Called on changes of fields that may influence the viewport region definition.
SoSFFloat x2
Second value for viewport region definition in the x-dimension (width or right border)
@ DOMAIN_MODE_RELATIVE_TO_WIDTH
@ DOMAIN_MODE_RELATIVE_TO_MIN
@ DOMAIN_MODE_RELATIVE_TO_MAX
@ DOMAIN_MODE_RELATIVE_TO_HEIGHT
SoSFEnum x2DomainMode
Domain of x1.
SoSFEnum yPositionMode
Define how specify the viewport region in the y-dimension.
SoSFBool autoScaleAbsoluteValuesHiDPI
Enable automatic rescaling of absolute values in high DPI rendering.
void GLRenderBelowPath(SoGLRenderAction *action) override
Reimplemented GLRenderBelowPath to render child graph with modified viewportSize.
SoSFEnum y1ReferenceMode
Reference for y1.
SoSFBool consumeEventsInViewport
Enable/Disable consumption of handled events.
SoSFBool cacheViewportRegion
Enable caching of viewport region.
ProjectionType _prevProjType
void getBoundingBox(SoGetBoundingBoxAction *action) override
Get bounding box.
SoSFFloat y2
Second value for viewport region definition in the y-dimension (height or upper border)
SoSFColor borderColor
Color used for drawing the border.
SoSFBool enableBackground
Enable/Disable drawing of a background.
SoSFBool usePreviousVP
Enable/Disable relative viewport region modification.
SoSFEnum projectionType
Used ProjectionType.
SoSFFloat x1
First value for viewport region definition in the x-dimension (right border, left border or center)
SoSFFloat backgroundAlpha
Alpha used for drawing the background.
SoSFBool detectMouseOver
Enable/Disable mouse over detection.
SbViewportRegion _prevInVPR
SoSFEnum x1ReferenceMode
Reference for x1.
static void initClass()
Initializes this class (called on dll initialization).
SoSFEnum xPositionMode
Define how specify the viewport region in the x-dimension.
SoSFBool enableBorder
Enable/Disable drawing of a border.
int getInterpretedSize(float value, int width, int height, DomainMode domMode)
Interprets value as size in relation to given size based on the DomainMode.
SoSFBool mouseOverViewport
Indicates if the mouse is over the viewport region.
SoSFInt32 borderWidth
Width of the border.
SoSFBool useViewportRegionDefinitionCallback
Enable usage of callback function for viewport region definition.
SoSFBool modifyVP
Enable/Disable viewport region modification.
SoSFEnum y2ReferenceMode
Reference for y2.
void resetViewportRegion()
resets _prevInVPR and therfore forces recomputation of the viewport region
~SoViewportRegion() override
Destructor.
void handleEvent(SoHandleEventAction *action) override
Handle event is reimplemented to forward events with modified viewportSize.
SoSFEnum y1DomainMode
Domain of y1.
SoSFColor backgroundColor
Color used for drawing the background.
SoSFEnum y2DomainMode
Domain of y2.
@ AUTO
same type as previous camera in state
void connectViewportRegionDefinitionCallback(CallbackFunctionPtr cb, void *p)
Called by wrapper to create connection.
SoSFBool keepViewportWhileDragging
Do not change into/out of viewport while dragging (hold mouse button pressed)