MeVisLab Toolbox Reference
View2DPosition Class Reference

This class stores all position information needed by SoView2DExtensions to handle the pointer position. More...

#include <View2DPosition.h>

Inheritance diagram for View2DPosition:
MutableView2DPosition

Public Member Functions

 View2DPosition (SoView2D *viewer=nullptr)
 Constructor and destructor. More...
 
 ~View2DPosition ()
 
SbVec2f getDevicePosition () const
 Return View2D device position of pointer (Note that this is corrected to the current GL viewport and that Y is flipped compared to SoPointerPosition). More...
 
SbVec3f getVoxelPosition () const
 Return voxel position of pointer. More...
 
SbVec2f getViewportOrigin () const
 Return view port origin of current slice in voxel coordinates. More...
 
SbVec2f getViewportSize () const
 Return view port size of current slice in voxel coordinates. More...
 
SoSFMLImagegetImage () const
 Return reference to image field of SoView2D. More...
 
SoView2DgetViewer () const
 Return pointer to SoView2D. More...
 
View2DSliceListgetSliceList () const
 pointer to slice list More...
 
void mapVoxelToWorld (const SbVec3f &src, SbVec3f &dst) const
 map from Voxel to World coordinate (convenience method) More...
 
void mapWorldToVoxel (const SbVec3f &src, SbVec3f &dst) const
 map from World to Voxel coordinate (convenience method) More...
 
bool isInsideImage () const
 Return whether the voxel position is inside the image extents. More...
 
bool isInsideViewport () const
 Return whether the voxel position is inside the visible viewport. More...
 
SbVec3f getWorldPosition () const
 

Protected Attributes

SbVec2f _relPos
 
SbVec3f _voxelPos
 
SbVec2f _vpOrigin
 
SbVec2f _vpSize
 

Detailed Description

This class stores all position information needed by SoView2DExtensions to handle the pointer position.

Definition at line 29 of file View2DPosition.h.

Constructor & Destructor Documentation

◆ View2DPosition()

View2DPosition::View2DPosition ( SoView2D viewer = nullptr)

Constructor and destructor.

◆ ~View2DPosition()

View2DPosition::~View2DPosition ( )
inline

Definition at line 34 of file View2DPosition.h.

Member Function Documentation

◆ getDevicePosition()

SbVec2f View2DPosition::getDevicePosition ( ) const
inline

Return View2D device position of pointer (Note that this is corrected to the current GL viewport and that Y is flipped compared to SoPointerPosition).

Definition at line 38 of file View2DPosition.h.

◆ getImage()

SoSFMLImage& View2DPosition::getImage ( ) const

Return reference to image field of SoView2D.

◆ getSliceList()

View2DSliceList* View2DPosition::getSliceList ( ) const

pointer to slice list

◆ getViewer()

SoView2D* View2DPosition::getViewer ( ) const
inline

Return pointer to SoView2D.

Definition at line 52 of file View2DPosition.h.

◆ getViewportOrigin()

SbVec2f View2DPosition::getViewportOrigin ( ) const
inline

Return view port origin of current slice in voxel coordinates.

Definition at line 44 of file View2DPosition.h.

Referenced by CSOBulgeAction::isInViewportRegion().

◆ getViewportSize()

SbVec2f View2DPosition::getViewportSize ( ) const
inline

Return view port size of current slice in voxel coordinates.

Definition at line 46 of file View2DPosition.h.

Referenced by CSOBulgeAction::isInViewportRegion().

◆ getVoxelPosition()

SbVec3f View2DPosition::getVoxelPosition ( ) const
inline

Return voxel position of pointer.

Definition at line 41 of file View2DPosition.h.

Referenced by CSOBulgeAction::isInViewportRegion().

◆ getWorldPosition()

SbVec3f View2DPosition::getWorldPosition ( ) const

◆ isInsideImage()

bool View2DPosition::isInsideImage ( ) const

Return whether the voxel position is inside the image extents.

◆ isInsideViewport()

bool View2DPosition::isInsideViewport ( ) const

Return whether the voxel position is inside the visible viewport.

◆ mapVoxelToWorld()

void View2DPosition::mapVoxelToWorld ( const SbVec3f &  src,
SbVec3f &  dst 
) const
inline

map from Voxel to World coordinate (convenience method)

Definition at line 58 of file View2DPosition.h.

◆ mapWorldToVoxel()

void View2DPosition::mapWorldToVoxel ( const SbVec3f &  src,
SbVec3f &  dst 
) const
inline

map from World to Voxel coordinate (convenience method)

Definition at line 61 of file View2DPosition.h.

Member Data Documentation

◆ _relPos

SbVec2f View2DPosition::_relPos
protected

Definition at line 73 of file View2DPosition.h.

Referenced by MutableView2DPosition::setDevicePosition().

◆ _voxelPos

SbVec3f View2DPosition::_voxelPos
protected

Definition at line 74 of file View2DPosition.h.

Referenced by MutableView2DPosition::setVoxelPosition().

◆ _vpOrigin

SbVec2f View2DPosition::_vpOrigin
protected

Definition at line 75 of file View2DPosition.h.

Referenced by MutableView2DPosition::setViewport().

◆ _vpSize

SbVec2f View2DPosition::_vpSize
protected

Definition at line 76 of file View2DPosition.h.

Referenced by MutableView2DPosition::setViewport().


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