- All Implemented Interfaces:
public class Ruler extends SoNode(Preview Feature) Interactive distance measuring tool for SoOrthoSlice.
Preview Feature means this class is fully supported and can be used in Open Inventor applications. Being tagged as a Preview Feature just means that the implementation is still subject to API changes and adjustments based on feedback from early adopters. Please be also aware that source compatibility might be broken regardless of the Open Inventor compatibility changes policy due to our commitment to bring needed changes to be sure the specifications of this Preview Feature match the expectations of our customers.
This node displays an interactive distance measuring tool on top of an SoOrthoSlice. The user can click and drag to display a line and the physical distance between the clicked point and the current cursor position.
This node is only intended to be used in a "2D" viewing environment using an SoOrthographicCamera, for example viewing a single slice of a medical volume.
This node requires that the application handle mouse press, release and move events. Mouse move events must be forwarded to the node using the manageMouseMove method.
globalFactor 1 label mm
Fields Modifier and Type Field Description
globalFactorSpecifies a scale factor applied to the size of the arrowheads on the line.
labelSpecifies a label string appended to the measurement value.
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
doAction(SoAction action)Override doAction function
getBoundingBox(SoGetBoundingBoxAction action)Override getBoundingBox function
getFont()Access the font property
getRenderEngineMode()Returns the supported Render engine mode.
GLRender(SoGLRenderAction action)Override GLRender function
manageMouseMove(boolean firstClick, SoOrthoSliceDetail detail)The application should call this method with 'true' on the mouse down event that begins a measure operation, then call this method with 'false' on each mouse move event during the measure operation.
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, getAlternateRep, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
public void doAction(SoAction action)Override doAction function
public void GLRender(SoGLRenderAction action)Override GLRender function
public void getBoundingBox(SoGetBoundingBoxAction action)Override getBoundingBox function
public void manageMouseMove(boolean firstClick, SoOrthoSliceDetail detail)The application should call this method with 'true' on the mouse down event that begins a measure operation, then call this method with 'false' on each mouse move event during the measure operation. See the medicalRuler example program for more details.
public SoNode.RenderModes getRenderEngineMode()Description copied from class:
SoNodeReturns the supported Render engine mode.
For custom node, this method returns by default
SoNode.RenderModes.OIV_UNKNOWN_RENDERING_MODE, override this method to specify the Render engine mode supported by your custom node.
public SoFont getFont()Access the font property