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.
 
 ~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).
 
SbVec3f getVoxelPosition () const
 Return voxel position of pointer.
 
SbVec2f getViewportOrigin () const
 Return view port origin of current slice in voxel coordinates.
 
SbVec2f getViewportSize () const
 Return view port size of current slice in voxel coordinates.
 
SoSFMLImagegetImage () const
 Return reference to image field of SoView2D.
 
SoView2DgetViewer () const
 Return pointer to SoView2D.
 
View2DSliceListgetSliceList () const
 pointer to slice list
 
void mapVoxelToWorld (const SbVec3f &src, SbVec3f &dst) const
 map from Voxel to World coordinate (convenience method)
 
void mapWorldToVoxel (const SbVec3f &src, SbVec3f &dst) const
 map from World to Voxel coordinate (convenience method)
 
bool isInsideImage () const
 Return whether the voxel position is inside the image extents.
 
bool isInsideViewport () const
 Return whether the voxel position is inside the visible viewport.
 
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: