MeVisLab Toolbox Reference
MutableView2DPosition Class Reference

MutableView2DPosition just exists as a way to set the values in a View2DPosition object which will be attached to a SoPointerPosition. More...

#include <SoView2DInteraction.h>

Inheritance diagram for MutableView2DPosition:
View2DPosition

Public Member Functions

 MutableView2DPosition (SoView2D *viewer)
 
void setDevicePosition (const SbVec2f &pos)
 
void setVoxelPosition (const SbVec3f &pos)
 
void setViewport (const SbVec2f &origin, const SbVec2f &size)
 
- Public Member Functions inherited from View2DPosition
 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
 

Additional Inherited Members

- Protected Attributes inherited from View2DPosition
SbVec2f _relPos
 
SbVec3f _voxelPos
 
SbVec2f _vpOrigin
 
SbVec2f _vpSize
 

Detailed Description

MutableView2DPosition just exists as a way to set the values in a View2DPosition object which will be attached to a SoPointerPosition.

Definition at line 22 of file SoView2DInteraction.h.

Constructor & Destructor Documentation

◆ MutableView2DPosition()

MutableView2DPosition::MutableView2DPosition ( SoView2D viewer)
inline

Definition at line 25 of file SoView2DInteraction.h.

Member Function Documentation

◆ setDevicePosition()

void MutableView2DPosition::setDevicePosition ( const SbVec2f &  pos)
inline

Definition at line 26 of file SoView2DInteraction.h.

References View2DPosition::_relPos.

◆ setViewport()

void MutableView2DPosition::setViewport ( const SbVec2f &  origin,
const SbVec2f &  size 
)
inline

Definition at line 28 of file SoView2DInteraction.h.

References View2DPosition::_vpOrigin, and View2DPosition::_vpSize.

◆ setVoxelPosition()

void MutableView2DPosition::setVoxelPosition ( const SbVec3f &  pos)
inline

Definition at line 27 of file SoView2DInteraction.h.

References View2DPosition::_voxelPos.


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