OpenWalnut
1.5.0dev
|
manages the several selection tools More...
#include <WSelectionManager.h>
Public Member Functions | |
WSelectionManager () | |
standard constructor More... | |
virtual | ~WSelectionManager () |
destructor More... | |
std::shared_ptr< WCrosshair > | getCrosshair () |
Return the current position of the point selection. More... | |
int | getFrontSector () |
function returns an index of the direction one is currently looking at the scene More... | |
void | setPaintMode (WPaintMode mode) |
setter for paint mode, also forwards it to the graphics engine More... | |
WPaintMode | getPaintMode () |
getter for paint mode More... | |
void | setTexture (osg::ref_ptr< osg::Texture3D > texture, std::shared_ptr< WGridRegular3D >grid) |
setter for texture and grid More... | |
std::shared_ptr< WGridRegular3D > | getGrid () |
getter More... | |
void | setUseTexture (bool flag=true) |
setter More... | |
bool | getUseTexture () |
getter More... | |
float | getTextureOpacity () |
getter More... | |
void | setTextureOpacity (float value) |
setter More... | |
WPropDouble | getPropAxialPos () |
The property controlling the current axial position of slices. More... | |
WPropDouble | getPropCoronalPos () |
The property controlling the current coronal position of slices. More... | |
WPropDouble | getPropSagittalPos () |
The property controlling the current sagittal position of slices. More... | |
WPropBool | getPropAxialShow () |
The property controlling the current axial visible-flag. More... | |
WPropBool | getPropCoronalShow () |
The property controlling the current coronal visible-flag. More... | |
WPropBool | getPropSagittalShow () |
The property controlling the current sagittal visible-flag. More... | |
void | setShader (int shader) |
setter for the shader index to be used with the custom texture More... | |
int | getShader () |
getter More... | |
Private Member Functions | |
void | updateCrosshairPosition () |
Updates the crosshair position. More... | |
Private Attributes | |
std::shared_ptr< WCrosshair > | m_crosshair |
stores pointer to crosshair More... | |
WProperties::SPtr | m_sliceGroup |
Contains the slice related properties. More... | |
WPropDouble | m_axialPos |
Axial slice position. More... | |
WPropDouble | m_coronalPos |
Coronal slice position. More... | |
WPropDouble | m_sagittalPos |
Sagittal slice position. More... | |
WPropBool | m_axialShow |
Axial visible-flag. More... | |
WPropBool | m_coronalShow |
Coronal visible-flag. More... | |
WPropBool | m_sagittalShow |
Sagittal visible-flag. More... | |
boost::signals2::connection | m_axialUpdateConnection |
The connection for the axial property. More... | |
boost::signals2::connection | m_coronalUpdateConnection |
The connection for the coronal property. More... | |
boost::signals2::connection | m_sagittalUpdateConnection |
The connection for the sagittal property. More... | |
WPaintMode | m_paintMode |
stores the currently selected paint mode More... | |
osg::ref_ptr< osg::Texture3D > | m_texture |
stores a pointer to a texture 3d, this is used to provide a faster texture generation process than creating a new dataset for every texture change More... | |
std::shared_ptr< WGridRegular3D > | m_textureGrid |
stores a pointer to the grid to be used together with the texture More... | |
float | m_textureOpacity |
the texture opacity More... | |
bool | m_useTexture |
flag indicating if this additional texture should be used. More... | |
int | m_shader |
index of the shader to use with the texture More... | |
manages the several selection tools
Definition at line 51 of file WSelectionManager.h.
WSelectionManager::WSelectionManager | ( | ) |
standard constructor
Definition at line 40 of file WSelectionManager.cpp.
References m_axialPos, m_axialShow, m_axialUpdateConnection, m_coronalPos, m_coronalShow, m_coronalUpdateConnection, m_crosshair, m_sagittalPos, m_sagittalShow, m_sagittalUpdateConnection, m_sliceGroup, and updateCrosshairPosition().
|
virtual |
destructor
Definition at line 71 of file WSelectionManager.cpp.
std::shared_ptr< WCrosshair > WSelectionManager::getCrosshair | ( | ) |
Return the current position of the point selection.
Definition at line 75 of file WSelectionManager.cpp.
References m_crosshair.
int WSelectionManager::getFrontSector | ( | ) |
function returns an index of the direction one is currently looking at the scene
Definition at line 80 of file WSelectionManager.cpp.
References WKernel::getGraphicsEngine(), and WKernel::getRunningKernel().
std::shared_ptr< WGridRegular3D > WSelectionManager::getGrid | ( | ) |
WPaintMode WSelectionManager::getPaintMode | ( | ) |
getter for paint mode
Definition at line 146 of file WSelectionManager.cpp.
References m_paintMode.
WPropDouble WSelectionManager::getPropAxialPos | ( | ) |
The property controlling the current axial position of slices.
Definition at line 192 of file WSelectionManager.cpp.
References m_axialPos.
WPropBool WSelectionManager::getPropAxialShow | ( | ) |
The property controlling the current axial visible-flag.
Definition at line 207 of file WSelectionManager.cpp.
References m_axialShow.
WPropDouble WSelectionManager::getPropCoronalPos | ( | ) |
The property controlling the current coronal position of slices.
Definition at line 197 of file WSelectionManager.cpp.
References m_coronalPos.
WPropBool WSelectionManager::getPropCoronalShow | ( | ) |
The property controlling the current coronal visible-flag.
Definition at line 212 of file WSelectionManager.cpp.
References m_coronalShow.
WPropDouble WSelectionManager::getPropSagittalPos | ( | ) |
The property controlling the current sagittal position of slices.
Definition at line 202 of file WSelectionManager.cpp.
References m_sagittalPos.
WPropBool WSelectionManager::getPropSagittalShow | ( | ) |
The property controlling the current sagittal visible-flag.
Definition at line 217 of file WSelectionManager.cpp.
References m_sagittalShow.
int WSelectionManager::getShader | ( | ) |
getter
Definition at line 227 of file WSelectionManager.cpp.
References m_shader.
float WSelectionManager::getTextureOpacity | ( | ) |
getter
Definition at line 174 of file WSelectionManager.cpp.
References m_textureOpacity.
bool WSelectionManager::getUseTexture | ( | ) |
void WSelectionManager::setPaintMode | ( | WPaintMode | mode | ) |
setter for paint mode, also forwards it to the graphics engine
mode |
Definition at line 137 of file WSelectionManager.cpp.
References WKernel::getGraphicsEngine(), WKernel::getRunningKernel(), and m_paintMode.
void WSelectionManager::setShader | ( | int | shader | ) |
setter for the shader index to be used with the custom texture
shader | the index of the shader |
Definition at line 222 of file WSelectionManager.cpp.
References m_shader.
void WSelectionManager::setTexture | ( | osg::ref_ptr< osg::Texture3D > | texture, |
std::shared_ptr< WGridRegular3D > | grid | ||
) |
setter for texture and grid
texture | |
grid |
Definition at line 151 of file WSelectionManager.cpp.
References m_texture, and m_textureGrid.
void WSelectionManager::setTextureOpacity | ( | float | value | ) |
setter
value | the new opacity to use with the texture |
Definition at line 179 of file WSelectionManager.cpp.
References m_textureOpacity.
void WSelectionManager::setUseTexture | ( | bool | flag = true | ) |
setter
flag |
Definition at line 163 of file WSelectionManager.cpp.
References m_useTexture.
|
private |
Updates the crosshair position.
Definition at line 232 of file WSelectionManager.cpp.
References m_axialPos, m_coronalPos, m_crosshair, and m_sagittalPos.
Referenced by WSelectionManager().
|
private |
Axial slice position.
Definition at line 202 of file WSelectionManager.h.
Referenced by getPropAxialPos(), updateCrosshairPosition(), and WSelectionManager().
|
private |
Axial visible-flag.
Definition at line 217 of file WSelectionManager.h.
Referenced by getPropAxialShow(), and WSelectionManager().
|
private |
The connection for the axial property.
Definition at line 232 of file WSelectionManager.h.
Referenced by WSelectionManager().
|
private |
Coronal slice position.
Definition at line 207 of file WSelectionManager.h.
Referenced by getPropCoronalPos(), updateCrosshairPosition(), and WSelectionManager().
|
private |
Coronal visible-flag.
Definition at line 222 of file WSelectionManager.h.
Referenced by getPropCoronalShow(), and WSelectionManager().
|
private |
The connection for the coronal property.
Definition at line 237 of file WSelectionManager.h.
Referenced by WSelectionManager().
|
private |
stores pointer to crosshair
Definition at line 192 of file WSelectionManager.h.
Referenced by getCrosshair(), updateCrosshairPosition(), and WSelectionManager().
|
private |
stores the currently selected paint mode
Definition at line 244 of file WSelectionManager.h.
Referenced by getPaintMode(), and setPaintMode().
|
private |
Sagittal slice position.
Definition at line 212 of file WSelectionManager.h.
Referenced by getPropSagittalPos(), updateCrosshairPosition(), and WSelectionManager().
|
private |
Sagittal visible-flag.
Definition at line 227 of file WSelectionManager.h.
Referenced by getPropSagittalShow(), and WSelectionManager().
|
private |
The connection for the sagittal property.
Definition at line 242 of file WSelectionManager.h.
Referenced by WSelectionManager().
|
private |
index of the shader to use with the texture
Definition at line 270 of file WSelectionManager.h.
Referenced by getShader(), and setShader().
|
private |
Contains the slice related properties.
Definition at line 197 of file WSelectionManager.h.
Referenced by WSelectionManager().
|
private |
stores a pointer to a texture 3d, this is used to provide a faster texture generation process than creating a new dataset for every texture change
Definition at line 250 of file WSelectionManager.h.
Referenced by setTexture().
|
private |
stores a pointer to the grid to be used together with the texture
Definition at line 255 of file WSelectionManager.h.
Referenced by getGrid(), and setTexture().
|
private |
the texture opacity
Definition at line 260 of file WSelectionManager.h.
Referenced by getTextureOpacity(), and setTextureOpacity().
|
private |
flag indicating if this additional texture should be used.
Definition at line 265 of file WSelectionManager.h.
Referenced by getUseTexture(), and setUseTexture().