MeVisLab Resolution Independence API
SoViewportRegion Class Reference

#include <SoViewportRegion.h>

Inheritance diagram for SoViewportRegion:

Public Types

enum  PositionMode { POSITION_MODE_MIN_AND_MAX , POSITION_MODE_CENTER_AND_SIZE , POSITION_MODE_MIN_AND_SIZE , POSITION_MODE_MAX_AND_SIZE }
 
enum  ReferenceMode { REFERENCE_MODE_MIN , REFERENCE_MODE_CENTER , REFERENCE_MODE_MAX }
 
enum  DomainMode {
  DOMAIN_MODE_ABSOLUTE , DOMAIN_MODE_RELATIVE_TO_HEIGHT , DOMAIN_MODE_RELATIVE_TO_WIDTH , DOMAIN_MODE_RELATIVE_TO_MIN ,
  DOMAIN_MODE_RELATIVE_TO_MAX
}
 
enum  ProjectionType { ORTHOGRAPHIC , PERSPECTIVE , AUTO , UNMODIFIED }
 

Public Member Functions

 SoViewportRegion ()
 Constructor.
 
void getBoundingBox (SoGetBoundingBoxAction *action) override
 Get bounding box.
 
void GLRenderBelowPath (SoGLRenderAction *action) override
 Reimplemented GLRenderBelowPath to render child graph with modified viewportSize.
 
void handleEvent (SoHandleEventAction *action) override
 Handle event is reimplemented to forward events with modified viewportSize.
 
void connectViewportRegionDefinitionCallback (CallbackFunctionPtr cb, void *p)
 Called by wrapper to create connection.
 
void resetViewportRegion ()
 resets _prevInVPR and therfore forces recomputation of the viewport region
 

Static Public Member Functions

static void initClass ()
 Initializes this class (called on dll initialization).
 

Public Attributes

SoSFBool on
 ! Fields
 
SoSFBool modifyVP
 Enable/Disable viewport region modification.
 
SoSFBool usePreviousVP
 Enable/Disable relative viewport region modification.
 
SoSFBool autoScaleAbsoluteValuesHiDPI
 Enable automatic rescaling of absolute values in high DPI rendering.
 
SoSFBool cacheViewportRegion
 Enable caching of viewport region.
 
SoSFBool useViewportRegionDefinitionCallback
 Enable usage of callback function for viewport region definition.
 
SoSFEnum xPositionMode
 Define how specify the viewport region in the x-dimension.
 
SoSFFloat x1
 First value for viewport region definition in the x-dimension (right border, left border or center)
 
SoSFEnum x1ReferenceMode
 Reference for x1.
 
SoSFEnum x1DomainMode
 Domain of x1.
 
SoSFFloat x2
 Second value for viewport region definition in the x-dimension (width or right border)
 
SoSFEnum x2ReferenceMode
 Reference for x2.
 
SoSFEnum x2DomainMode
 Domain of x1.
 
SoSFEnum yPositionMode
 Define how specify the viewport region in the y-dimension.
 
SoSFFloat y1
 First value for viewport region definition in the y-dimension (lower border, upper border or center)
 
SoSFEnum y1ReferenceMode
 Reference for y1.
 
SoSFEnum y1DomainMode
 Domain of y1.
 
SoSFFloat y2
 Second value for viewport region definition in the y-dimension (height or upper border)
 
SoSFEnum y2ReferenceMode
 Reference for y2.
 
SoSFEnum y2DomainMode
 Domain of y2.
 
SoSFEnum projectionType
 Used ProjectionType.
 
SoSFBool renderDelayedPaths
 Enable/Disable delayed path rendering.
 
SoSFBool detectMouseOver
 Enable/Disable mouse over detection.
 
SoSFBool mouseOverViewport
 Indicates if the mouse is over the viewport region.
 
SoSFBool forwardEvents
 Enable/Disable forwarding of events to children.
 
SoSFBool forwardEventsInViewportOnly
 If true, only events that occurred in the viewport region will be forwarded.
 
SoSFBool keepViewportWhileDragging
 Do not change into/out of viewport while dragging (hold mouse button pressed)
 
SoSFBool mapEventToViewport
 Enable/Disable mapping of event coordinates to the viewport region.
 
SoSFBool consumeEventsInViewport
 Enable/Disable consumption of handled events.
 
SoSFBool enableBorder
 Enable/Disable drawing of a border.
 
SoSFInt32 borderWidth
 Width of the border.
 
SoSFColor borderColor
 Color used for drawing the border.
 
SoSFFloat borderAlpha
 Alpha used for drawing the border.
 
SoSFBool enableBackground
 Enable/Disable drawing of a background.
 
SoSFColor backgroundColor
 Color used for drawing the background.
 
SoSFFloat backgroundAlpha
 Alpha used for drawing the background.
 

Protected Member Functions

 ~SoViewportRegion () override
 Destructor.
 
SbViewportRegion getViewportRegion (SoState *state)
 Computes the ViewportRegion.
 
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.
 
int getInterpretedSize (float value, int width, int height, DomainMode domMode)
 Interprets value as size in relation to given size based on the DomainMode.
 
void onVPRFieldChanged (SoField *)
 Called on changes of fields that may influence the viewport region definition.
 

Protected Attributes

ProjectionType _prevProjType
 
SbViewVolume::ProjectionType _projType
 
SbViewportRegion _prevInVPR
 
SbViewportRegion _prevOutVPR
 
SoRef< SoCamera > _insetCam
 

Detailed Description

Definition at line 41 of file SoViewportRegion.h.

Member Enumeration Documentation

◆ DomainMode

Enumerator
DOMAIN_MODE_ABSOLUTE 
DOMAIN_MODE_RELATIVE_TO_HEIGHT 
DOMAIN_MODE_RELATIVE_TO_WIDTH 
DOMAIN_MODE_RELATIVE_TO_MIN 
DOMAIN_MODE_RELATIVE_TO_MAX 

Definition at line 71 of file SoViewportRegion.h.

◆ PositionMode

Enumerator
POSITION_MODE_MIN_AND_MAX 
POSITION_MODE_CENTER_AND_SIZE 
POSITION_MODE_MIN_AND_SIZE 
POSITION_MODE_MAX_AND_SIZE 

Definition at line 56 of file SoViewportRegion.h.

◆ ProjectionType

Enumerator
ORTHOGRAPHIC 
PERSPECTIVE 
AUTO 

same type as previous camera in state

UNMODIFIED 

use cam as specified in child graph

Definition at line 80 of file SoViewportRegion.h.

◆ ReferenceMode

Enumerator
REFERENCE_MODE_MIN 
REFERENCE_MODE_CENTER 
REFERENCE_MODE_MAX 

Definition at line 64 of file SoViewportRegion.h.

Constructor & Destructor Documentation

◆ SoViewportRegion()

SoViewportRegion::SoViewportRegion ( )

Constructor.

◆ ~SoViewportRegion()

SoViewportRegion::~SoViewportRegion ( )
overrideprotected

Destructor.

Member Function Documentation

◆ connectViewportRegionDefinitionCallback()

void SoViewportRegion::connectViewportRegionDefinitionCallback ( CallbackFunctionPtr cb,
void * p )
inline

Called by wrapper to create connection.

Definition at line 209 of file SoViewportRegion.h.

◆ getBoundingBox()

void SoViewportRegion::getBoundingBox ( SoGetBoundingBoxAction * action)
override

Get bounding box.

◆ getInterpretedPosition()

int SoViewportRegion::getInterpretedPosition ( float value,
int width,
int height,
bool isY,
ReferenceMode refMode,
DomainMode domMode )
protected

Interprets value as position in relation to given size based on the ReferenceMode and the DomainMode.

◆ getInterpretedSize()

int SoViewportRegion::getInterpretedSize ( float value,
int width,
int height,
DomainMode domMode )
protected

Interprets value as size in relation to given size based on the DomainMode.

◆ getViewportRegion()

SbViewportRegion SoViewportRegion::getViewportRegion ( SoState * state)
protected

Computes the ViewportRegion.

◆ GLRenderBelowPath()

void SoViewportRegion::GLRenderBelowPath ( SoGLRenderAction * action)
override

Reimplemented GLRenderBelowPath to render child graph with modified viewportSize.

◆ handleEvent()

void SoViewportRegion::handleEvent ( SoHandleEventAction * action)
override

Handle event is reimplemented to forward events with modified viewportSize.

◆ initClass()

static void SoViewportRegion::initClass ( )
static

Initializes this class (called on dll initialization).

◆ onVPRFieldChanged()

void SoViewportRegion::onVPRFieldChanged ( SoField * )
inlineprotected

Called on changes of fields that may influence the viewport region definition.

Definition at line 240 of file SoViewportRegion.h.

◆ resetViewportRegion()

void SoViewportRegion::resetViewportRegion ( )
inline

resets _prevInVPR and therfore forces recomputation of the viewport region

Definition at line 217 of file SoViewportRegion.h.

Member Data Documentation

◆ _insetCam

SoRef<SoCamera> SoViewportRegion::_insetCam
protected

Definition at line 228 of file SoViewportRegion.h.

◆ _prevInVPR

SbViewportRegion SoViewportRegion::_prevInVPR
protected

Definition at line 226 of file SoViewportRegion.h.

◆ _prevOutVPR

SbViewportRegion SoViewportRegion::_prevOutVPR
protected

Definition at line 226 of file SoViewportRegion.h.

◆ _prevProjType

ProjectionType SoViewportRegion::_prevProjType
protected

Definition at line 224 of file SoViewportRegion.h.

◆ _projType

SbViewVolume::ProjectionType SoViewportRegion::_projType
protected

Definition at line 225 of file SoViewportRegion.h.

◆ autoScaleAbsoluteValuesHiDPI

SoSFBool SoViewportRegion::autoScaleAbsoluteValuesHiDPI

Enable automatic rescaling of absolute values in high DPI rendering.

Definition at line 99 of file SoViewportRegion.h.

◆ backgroundAlpha

SoSFFloat SoViewportRegion::backgroundAlpha

Alpha used for drawing the background.

Definition at line 195 of file SoViewportRegion.h.

◆ backgroundColor

SoSFColor SoViewportRegion::backgroundColor

Color used for drawing the background.

Definition at line 192 of file SoViewportRegion.h.

◆ borderAlpha

SoSFFloat SoViewportRegion::borderAlpha

Alpha used for drawing the border.

Definition at line 186 of file SoViewportRegion.h.

◆ borderColor

SoSFColor SoViewportRegion::borderColor

Color used for drawing the border.

Definition at line 183 of file SoViewportRegion.h.

◆ borderWidth

SoSFInt32 SoViewportRegion::borderWidth

Width of the border.

Definition at line 180 of file SoViewportRegion.h.

◆ cacheViewportRegion

SoSFBool SoViewportRegion::cacheViewportRegion

Enable caching of viewport region.

Definition at line 102 of file SoViewportRegion.h.

◆ consumeEventsInViewport

SoSFBool SoViewportRegion::consumeEventsInViewport

Enable/Disable consumption of handled events.

Definition at line 174 of file SoViewportRegion.h.

◆ detectMouseOver

SoSFBool SoViewportRegion::detectMouseOver

Enable/Disable mouse over detection.

Definition at line 156 of file SoViewportRegion.h.

◆ enableBackground

SoSFBool SoViewportRegion::enableBackground

Enable/Disable drawing of a background.

Definition at line 189 of file SoViewportRegion.h.

◆ enableBorder

SoSFBool SoViewportRegion::enableBorder

Enable/Disable drawing of a border.

Definition at line 177 of file SoViewportRegion.h.

◆ forwardEvents

SoSFBool SoViewportRegion::forwardEvents

Enable/Disable forwarding of events to children.

Definition at line 162 of file SoViewportRegion.h.

◆ forwardEventsInViewportOnly

SoSFBool SoViewportRegion::forwardEventsInViewportOnly

If true, only events that occurred in the viewport region will be forwarded.

Definition at line 165 of file SoViewportRegion.h.

◆ keepViewportWhileDragging

SoSFBool SoViewportRegion::keepViewportWhileDragging

Do not change into/out of viewport while dragging (hold mouse button pressed)

Definition at line 168 of file SoViewportRegion.h.

◆ mapEventToViewport

SoSFBool SoViewportRegion::mapEventToViewport

Enable/Disable mapping of event coordinates to the viewport region.

Definition at line 171 of file SoViewportRegion.h.

◆ modifyVP

SoSFBool SoViewportRegion::modifyVP

Enable/Disable viewport region modification.

Definition at line 93 of file SoViewportRegion.h.

◆ mouseOverViewport

SoSFBool SoViewportRegion::mouseOverViewport

Indicates if the mouse is over the viewport region.

Definition at line 159 of file SoViewportRegion.h.

◆ on

SoSFBool SoViewportRegion::on

! Fields

Enable/Disable rendering of children

Definition at line 90 of file SoViewportRegion.h.

◆ projectionType

SoSFEnum SoViewportRegion::projectionType

Used ProjectionType.

Definition at line 150 of file SoViewportRegion.h.

◆ renderDelayedPaths

SoSFBool SoViewportRegion::renderDelayedPaths

Enable/Disable delayed path rendering.

Definition at line 153 of file SoViewportRegion.h.

◆ usePreviousVP

SoSFBool SoViewportRegion::usePreviousVP

Enable/Disable relative viewport region modification.

Definition at line 96 of file SoViewportRegion.h.

◆ useViewportRegionDefinitionCallback

SoSFBool SoViewportRegion::useViewportRegionDefinitionCallback

Enable usage of callback function for viewport region definition.

Definition at line 105 of file SoViewportRegion.h.

◆ x1

SoSFFloat SoViewportRegion::x1

First value for viewport region definition in the x-dimension (right border, left border or center)

Definition at line 111 of file SoViewportRegion.h.

◆ x1DomainMode

SoSFEnum SoViewportRegion::x1DomainMode

Domain of x1.

Definition at line 117 of file SoViewportRegion.h.

◆ x1ReferenceMode

SoSFEnum SoViewportRegion::x1ReferenceMode

Reference for x1.

Definition at line 114 of file SoViewportRegion.h.

◆ x2

SoSFFloat SoViewportRegion::x2

Second value for viewport region definition in the x-dimension (width or right border)

Definition at line 120 of file SoViewportRegion.h.

◆ x2DomainMode

SoSFEnum SoViewportRegion::x2DomainMode

Domain of x1.

Definition at line 126 of file SoViewportRegion.h.

◆ x2ReferenceMode

SoSFEnum SoViewportRegion::x2ReferenceMode

Reference for x2.

Definition at line 123 of file SoViewportRegion.h.

◆ xPositionMode

SoSFEnum SoViewportRegion::xPositionMode

Define how specify the viewport region in the x-dimension.

Definition at line 108 of file SoViewportRegion.h.

◆ y1

SoSFFloat SoViewportRegion::y1

First value for viewport region definition in the y-dimension (lower border, upper border or center)

Definition at line 132 of file SoViewportRegion.h.

◆ y1DomainMode

SoSFEnum SoViewportRegion::y1DomainMode

Domain of y1.

Definition at line 138 of file SoViewportRegion.h.

◆ y1ReferenceMode

SoSFEnum SoViewportRegion::y1ReferenceMode

Reference for y1.

Definition at line 135 of file SoViewportRegion.h.

◆ y2

SoSFFloat SoViewportRegion::y2

Second value for viewport region definition in the y-dimension (height or upper border)

Definition at line 141 of file SoViewportRegion.h.

◆ y2DomainMode

SoSFEnum SoViewportRegion::y2DomainMode

Domain of y2.

Definition at line 147 of file SoViewportRegion.h.

◆ y2ReferenceMode

SoSFEnum SoViewportRegion::y2ReferenceMode

Reference for y2.

Definition at line 144 of file SoViewportRegion.h.

◆ yPositionMode

SoSFEnum SoViewportRegion::yPositionMode

Define how specify the viewport region in the y-dimension.

Definition at line 129 of file SoViewportRegion.h.


The documentation for this class was generated from the following file: