Class MoMeshPointProbe

All Implemented Interfaces:
SafeDisposable

public class MoMeshPointProbe extends MoActionNode
Action node that probes cells of a mesh.

This node retrieves information at a given position in a mesh and trigger a callback each time the position moves.

The callback is defined by calling the method setProbeCallback().

The information available in the callback are the cell Id, the scalars and vectors interpolated at the probe location. The scalar and vector values are computed from the scalar sets and vector sets defined by the scalarSetIds and vectorSetIds fields. These are indices into the list of scalar sets and vector sets existing in the traversal state (see the MoScalarSetxxx and MoVec3Setxxx nodes).

Set these fields to -1 to disable interpolating these data sets.

Probing can be optimized by setting environment variables (see the "See also" Section)

See Also:
  • Field Details

    • position

      public SoSFVec3f position
      Field representing the position of the probe. The default value is (0,0,0).
    • scalarSetIds

      public SoMFInt32 scalarSetIds
      Field representing the scalar set nodes to use when probing at the current position. During traversal of the scene graph, scalar set nodes are accumulated in a list of scalar sets. scalarSetIds are indices into this list.
      The default value is 0 which means that only the first scalar set stored in the scene graph is used. Setting this value to -1 disables the probing on scalar sets.
    • vectorSetIds

      public SoMFInt32 vectorSetIds
      Field representing the vector set nodes to use when probing at the current position. During traversal of the scene graph, vector set nodes are accumulated in a list of vector sets. vectorSetIds are indices into this list.
      The default value is 0 which means that only the first vector set stored in the scene graph is used. Setting this value to -1 disables the probing on vector sets.
  • Constructor Details

    • MoMeshPointProbe

      public MoMeshPointProbe()
      Constructs an action node with default values.
      • position = (0,0,0)
      • scalarSetIds = 0
      • vectorSetIds = 0
  • Method Details

    • getUnstructuredExtractor

      public MiPointProbeUnstructured getUnstructuredExtractor()
      Gets probes for unstructured meshes to reuse outside this node.
      Note: The returned object may be null if no unstructured mesh has been set in the scene graph or if no render action has traversed the scene graph.
      Returns:
      probes for unstructured meshes
    • getHexahedronIjkExtractor

      public MiPointProbeHexahedronIjk getHexahedronIjkExtractor()
      Gets probes for hexahedron IJK meshes to reuse outside this node.
      Note: The returned object may be null if no hexahedron IJK mesh has been set in the scene graph or if no render action has traversed the scene graph.
      Returns:
      probes for hexahedron IJK meshes
    • getIjkExtractor

      public MiPointProbeIjk getIjkExtractor()
      Gets probes for IJK meshes to reuse outside this node.
      Note: The returned object may be null if no IJK mesh has been set in the scene graph or if no render action has traversed the scene graph.
      Returns:
      probes for IJK meshes
    • setProbeCallback

      public void setProbeCallback(MoMeshPointProbe.MoProbeCallback probeCallback)
      Set the user defined probe callback which will be called when the motion event occurs. If no callback set, the node is not activated (see also removeProbeCallback()).
    • removeProbeCallback

      public void removeProbeCallback()
      Removes the user defined probe callback (see setProbeCallback(MoProbeCallback)) which will disable the node.
    • doAction

      public void doAction(SoAction action)
      Overrides:
      doAction in class SoNode