Class MoMeshVector

  • All Implemented Interfaces:
    SafeDisposable

    public class MoMeshVector
    extends MoMeshRepresentation
    Rendering node that displays a vector data set.

    Each value of the vector data set is represented by a line plus an optional small arrow or a cylinder and an optional cone depending of the thicknessFactor. The vectors are located at the cell centers for per cell data sets or at the node positions for per node data sets. The vectorSetId field defines the index of the vector set to display. This is an index into the list of vector sets existing in the traversal state (see the MoVec3Setxxx nodes).

    The vectors can be colored using a scalar set defined in the colorScalarSetId inherited field. This is an index into the list of scalar sets existing in the traversal state (see the MoScalarSetxxx nodes). To disable coloring set this field to -1.

    • Field Detail

      • vectorSetId

        public SoSFInt32 vectorSetId
        Specifies the vector set to display. During traversal of the scene graph, vector sets are accumulated in a list of vector sets. vectorSetId is an index in this list.
        The default value is 0 meaning the first set in the list.
      • scaleFactor

        public SoSFFloat scaleFactor
        The scale factor to apply to the vector field to resize the representation. The default value is 1.0. All values are accepted. If scale factor is 0, the representation is empty.
      • arrow

        public SoSFBool arrow
        Do not draw arrows on vectors if set to false The default value is true
      • shiftFactor

        public SoSFFloat shiftFactor
        The shift factor to apply to the representation of each vector. Each vector is translated along its direction by the value of shiftFactor. The default value is 0.0 (no shift). All values are accepted.

        The following images illustrate the effect of shiftFactor on the vector field representation, with a vector set using a PER_NODE binding.

        No shift: shiftFactor = 0.0 Centered vectors: shiftFactor = -0.5 Vectors pointing target point: shiftFactor = -1.0
        SHIFT_0.0 SHIFT_0.5 SHIFT_1.0
      • thicknessFactor

        public SoSFFloat thicknessFactor
        The thickness factor to apply to the representation of each vector. If the thickness factor is:
        • < 0, nothing is rendered.
        • = 0, each vector is displayed as a line (plus arrow if arrow is true).
        • > 0, each vector is displayed as a cylinder (plus cone if arrow is true).
        Factor values > 0 control both the radius of the cylinder and the radius of the cone. For example, when the factor is 1 the radius of the cylinder is 5% of the average vector length in the data set. Larger factors also proportionally increase the height of the cone up to a maximum of half the vector length. When this limit is reached, larger values of the factor have no effect unless the arrow is removed by setting arrow to false.
        Default is 0.0.
        Since:
        Open Inventor 10.1
    • Constructor Detail

      • MoMeshVector

        public MoMeshVector()
        Constructs a rendering node with default options.
        • vectorSetId = 0
        • scaleFactor = 1
        • shiftFactor = 0
        • thicknessFactor = 0
        • arrow = true