Class MoMeshVector
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.meshvizxlm.mapping.nodes.MoActionNode
-
- com.openinventor.meshvizxlm.mapping.nodes.MoMeshBaseRepresentation
-
- com.openinventor.meshvizxlm.mapping.nodes.MoMeshRepresentation
-
- com.openinventor.meshvizxlm.mapping.nodes.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. ThevectorSetId
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 theMoVec3Setxxx
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 theMoScalarSetxxx
nodes). To disable coloring set this field to -1.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFBool
arrow
Do not draw arrows on vectors if set tofalse
The default value istrue
SoSFFloat
scaleFactor
The scale factor to apply to the vector field to resize the representation.SoSFFloat
shiftFactor
The shift factor to apply to the representation of each vector.SoSFFloat
thicknessFactor
The thickness factor to apply to the representation of each vector.SoSFInt32
vectorSetId
Specifies the vector set to display.-
Fields inherited from class com.openinventor.meshvizxlm.mapping.nodes.MoMeshRepresentation
colorScalarSetId
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description MoMeshVector()
Constructs a rendering node with default options.
-
Method Summary
-
Methods inherited from class com.openinventor.meshvizxlm.mapping.nodes.MoMeshRepresentation
doAction, setExtractorCallback
-
Methods inherited from class com.openinventor.meshvizxlm.mapping.nodes.MoMeshBaseRepresentation
affectsState, write
-
Methods inherited from class com.openinventor.meshvizxlm.mapping.nodes.MoActionNode
callback, distribute, getBoundingBox, getMatrix, getPrimitiveCount, getRenderEngineMode, GLRender, handleEvent, pick, rayPick
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
copy, copy, getAlternateRep, getByName, getRenderUnitID, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, isBoundingBoxIgnoring, isOverride, search, setOverride, touch
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
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 tofalse
The default value istrue
-
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
-
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 ifarrow
is true).
>
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 settingarrow
to false.
Default is 0.0.- Since:
- Open Inventor 10.1
-
-