Object that moves an SoOrthoSlice by dragging with the mouse. More...
#include <VolumeViz/draggers/SoOrthoSliceDragger.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
virtual const SoNodekitCatalog * | getNodekitCatalog () const |
SoOrthoSliceDragger () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static const SoNodekitCatalog * | getClassNodekitCatalog () |
Public Attributes | |
SoSFPath | orthoSlicePath |
SoSFColor | highlightColor |
SoSFBool | enableHighlight |
Deprecated | |
| |
SoDEPRECATED SoSFVec3i32 | volumeDimension |
SoDEPRECATED SoSFBox3f | volumeExtent |
SoOrthoSliceDragger is derived from SoTranslate1Dragger and has similar behavior, but is specifically designed to allow direct manipulation of an SoOrthoSlice. The difference is that this class uses the actual geometry of the ortho slice to detect mouse clicks and automatically updates the slice's SoOrthoSlice::sliceNumber field as the dragger is moved. Conversely the dragger updates itself if the slice's axis or sliceNumber fields are changed by the application.
The dragger will not do anything until the field orthoSlicePath has been set. The path can be a partial path, i.e. it does not need to start at the root of the scene graph. However, it must include the SoOrthoSlice node.
The dragger always sets its "translator" part to be the actual ortho slice node. When the dragger is created it sets its "translatorActive" part to be an empty Separator. You can reset this to something else. You can attach callbacks to this dragger in the usual way.
If the camera faces the slice (i.e. the orientation of the slice and the camera are exactly the same), the dragger will automatically change its orientation to another axis so that it can be manipulated (otherwise it can't). When the dragger itself is displayed, this behaviour may be surprising, and it can be disabled by setting the SoPreferences value IVVR_ENABLE_ORTHOSLICE_DRAGGER_AXIS_SWITCH to FALSE.
SoSeparator* volSep = new SoSeparator(); root->addChild( volSep ); // Create and initialize data node SoVolumeData* volData = new SoVolumeData(); volSep->addChild( volData ); // Create and initialize orthoslice node SoOrthoSlice* orthoSlice = new SoOrthoSlice(); volSep->addChild( orthoSlice ); // Create path to slice node // Note: Can be a partial path but must include the slice node. SoPath* path = new SoPath( volSep ); path->append( orthoSlice ); // Create and initialize dragger SoOrthoSliceDragger* dragger = new SoOrthoSliceDragger(); dragger->orthoSlicePath = path; volSep->addChild( dragger );
orthoSlicePath | NULL |
volumeDimension | 0 0 0 |
volumeExtent | 0 0 0 |
enableHighlight | TRUE |
highlightColor | 1.0 1.0 0 |
SoDragger, SoTranslate1Dragger, SoOrthoSlice
SoOrthoSliceDragger::SoOrthoSliceDragger | ( | ) |
Constructor.
static const SoNodekitCatalog* SoOrthoSliceDragger::getClassNodekitCatalog | ( | ) | [static] |
Returns the SoNodekitCatalog for this class.
Reimplemented from SoTranslate1Dragger.
static SoType SoOrthoSliceDragger::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoTranslate1Dragger.
virtual const SoNodekitCatalog* SoOrthoSliceDragger::getNodekitCatalog | ( | ) | const [virtual] |
Returns the SoNodekitCatalog for this instance.
Reimplemented from SoTranslate1Dragger.
virtual SoType SoOrthoSliceDragger::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoTranslate1Dragger.
Enables highlighting.
If this field is true, during a mousemouve, a border is drawn and highlighted according to the highlightColor when the cursor moves over the slice. This border disappears once the cursor is no longer over the slice. Default is true.
Specifies the highlight color.
See also enableHighlight. The default color is yellow (1,1,0).
Path to the SoOrthoSlice node to drag.
Default is empty (no path).
SoDEPRECATED SoSFVec3i32 SoOrthoSliceDragger::volumeDimension |
Dimension of the volume.
SoDEPRECATED SoSFBox3f SoOrthoSliceDragger::volumeExtent |
Extent of the volume.