Class PoMesh2DVec

  • All Implemented Interfaces:
    SafeDisposable

    public class PoMesh2DVec
    extends PoMesh2D
    Representation of vectors data of a surface mesh. Class to build a vectors field on a surface mesh. This class handles all vectors attributes. A vector is represented by an arrow made of 3 parts, the body, the start-shape and the end-shape. The body is a line or a cylinder starting from a node of the mesh. The start-shape is a pattern drawn at the node position. The end-shape is a pattern drawn at the other extremity of the body. Several type of pattern can be used to draw the shape. The 3 parts can be scaled and colored according to the value of the different fields of the class.

    The current mesh is used for the representation of vectors. See PoMesh for more explanations about the current mesh. The vectors of the mesh to be drawn, are defined by the method addVecsSet of the current mesh (see PoMeshProperty, PbMesh or PbMesh2D), and by the field PoMesh.vecsIndex. The node of the mesh are used as start point of the representation of the vectors.

    File format/default:

    PoMesh2DVec {

      density 1
      eliminationStatus NONE
      minLength 0.0
      maxLength 1E30
      bodyShape LINE
      bodyLengthType RELATIVE_LENGTH
      bodyLengthFactor 1.0
      bodyRadiusType CONSTANT_RADIUS
      bodyRadiusFactor 0.02
      bodyColoringType CONSTANT_COLOR
      startArrowShape NO_SHAPE
      startArrowHeightType RELATIVE_HEIGHT
      startArrowHeightFactor 0.1
      startArrowRadiusFactor 0.5
      startArrowColoringType CONSTANT_COLOR
      endArrowShape CHEVRON
      endArrowHeightType RELATIVE_HEIGHT
      endArrowHeightFactor 0.1
      endArrowRadiusFactor 0.5
      endArrowColoringType CONSTANT_COLOR
      coloringType COLOR_INHERITED
      valuesIndex -1
      valuesIndexForCellFilter -1
      vecsIndex -1
      moduleDataMapping NULL
      zValuesIndex -1
    }

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <link REL="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> <title></title> </head> <BODY> <h1></h1> <h4> <A NAME="Heading1018">CATALOG PARTS</A></h4> <ul><b>PoMesh2DVec</b> {</ul> <ul><ul><b>Separator</b> <tt>alternateRep</tt> (from PoBase) {<br> </ul></ul> <ul><ul><ul><b>AppearanceKit</b> <tt>appearance</tt> (from PoBase)</ul></ul></ul> <ul><ul><ul><i>Specifies the appearance of all the kit. By default lightModel.model=PHONG.</i></ul></ul></ul> <ul><ul><ul><b>MatrixTransform</b> <tt>domainTransform</tt> (from PoBase)</ul></ul></ul> <ul><ul><ul><i>Corresponds to the domain transformation.</i></ul></ul></ul> <ul><ul><ul><ul></ul></ul></ul></ul> <ul><ul><ul><b>Separator</b> <tt>bodySep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes of the bodies of vectors.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>bodyApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of the bodies.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>bodyGroup</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a list of SoLineSet or SoCylinder shape to draw vectors bodies.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>startArrowSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes of the start-shape of vectors.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>startArrowApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of the start-shapes.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>startArrowGroup</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a list of nodes to draw the start arrow shapes.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>endArrowSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes of the end-shape of vectors.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>endArrowApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of the end-shapes.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>endArrowGroup</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a list of nodes to draw the end arrow shapes.</i></ul></ul></ul></ul> <ul><ul><ul>}</ul></ul></ul> <ul><ul>}</ul></ul> <ul>}</ul> <ul><ul><ul><br> </ul></ul></ul> </body> </html>

    • Field Detail

      • density

        public final SoSFInt32 density
        Vector field density filter. If density = 1, each vector of the mesh is drawn. If density = 2, one vector every 2 vectors is drawn...
      • eliminationStatus

        public final SoSFEnum<PoMesh2DVec.EliminationStatusType> eliminationStatus
        If eliminationStatus = TOO_SMALL, the vectors which module is lower than minLength are not drawn. If eliminationStatus = TOO_LONG, the vectors which module is greater than maxLength are not drawn. If eliminationStatus = TOO_SMALL_OR_LONG, the vectors which module is lower than minLength or greater than maxLength are not drawn. If eliminationStatus = NONE, each vector selected by the density filter is drawn.
      • minLength

        public final SoSFFloat minLength
        Minimum length of the vector to be drawn. Only used when eliminationStatus is TOO_SMALL or TOO_SMALL_OR_LONG
      • maxLength

        public final SoSFFloat maxLength
        Maximum length of the vector to be drawn. Only used when eliminationStatus is TOO_LONG or TOO_SMALL_OR_LONG
      • bodyShape

        public final SoSFEnum<PoMesh2DVec.BodyShapes> bodyShape
        Type of shape (no body, line, cylinder) used to draw the body. If bodyShape = NO_BODY, the body of each vector is invisible.
      • bodyLengthType

        public final SoSFEnum<PoMesh2DVec.BodyLengthTypes> bodyLengthType
        If bodyLengthType = CONSTANT_LENGTH, each vector has the same body length = bodyLengthFactor . If bodyLengthType = RELATIVE_LENGTH, the body length of a vector is bodyLengthFactor * vector-module.
      • bodyLengthFactor

        public final SoSFFloat bodyLengthFactor
        Length (or length multiplicative factor) of the body shape.
      • bodyRadiusType

        public final SoSFEnum<PoMesh2DVec.BodyRadiusTypes> bodyRadiusType
        Defines type of method to compute the cylinder's radius. If bodyRadiusType = CONSTANT_RADIUS, each vector has the same body radius = bodyRadiusFactor . If bodyRadiusType = RELATIVE_RADIUS, the body radius of a vector is bodyRadiusFactor * vector-module. The body radius is either a line-width or a cylinder-radius depending on the field's value bodyShape.
      • bodyRadiusFactor

        public final SoSFFloat bodyRadiusFactor
        Radius (or radius multiplicative factor) of the cylinder.
      • bodyColoringType

        public final SoSFEnum<PoMesh2DVec.ArrowColoringTypes> bodyColoringType
        coloring method of the body. If bodyColoringType = CONSTANT_COLOR, each vector has the same body color, which is the last found during the scene graph traversal.

        If bodyColoringType = MODULE_MAPPING_COLOR, the body's color of a vector depends on its module, and by using the current module-data-mapping (see PoMesh for explanation of the current module-data-mapping).

        If bodyColoringType = SCALAR_MAPPING_COLOR, the body's color of a vector depends on the scalar value at the mesh node used as the start point of the body. In this case, the current data-mapping is used to compute the color in relation to the scalar-value (see PoMesh for more explanations about the current data-mapping). .

      • startArrowShape

        public final SoSFEnum<PoMesh2DVec.ArrowShapes> startArrowShape
        Type of shape to be drawn at the start point of the body. If startArrowShape = NO_SHAPE, the start-shape of each vector is invisible.
      • startArrowHeightType

        public final SoSFEnum<PoMesh2DVec.ArrowHeightTypes> startArrowHeightType
        Defines the type of method to compute the arrow height. If startArrowHeightType = CONSTANT_HEIGHT, each vector has the same start-shape height = startArrowHeightFactor . If startArrowHeightType = RELATIVE_ HEIGHT, the end-shape height of a vector is startArrowHeightFactor * body's length.
      • startArrowHeightFactor

        public final SoSFFloat startArrowHeightFactor
        Height (or Height multiplicative factor) of the arrow shape.
      • startArrowRadiusFactor

        public final SoSFFloat startArrowRadiusFactor
        The start-arrow's radius is start-arrow's height * startArrowRadiusFactor.
      • startArrowColoringType

        public final SoSFEnum<PoMesh2DVec.ArrowColoringTypes> startArrowColoringType
        Coloring method of the start shape. If startArrowColoringType = CONSTANT_COLOR, each vector has the same start-arrow's color, which is the last found during the scene graph traversal.

        If startArrowColoringType = MODULE_MAPPING_COLOR, the start-arrow's color of a vector depends on its module, and by using the current module-data- mapping (see PoMesh for explanation of the current module-data-mapping).

        If startArrowColoringType = SCALAR_MAPPING_COLOR, the start-arrow's color of a vector depends on the scalar value at the mesh node used as the start point of the start-arrow. In this case, the current data-mapping is used to compute the color in relation to the scalar-value (see PoMesh for more explanations about the current data-mapping).

      • endArrowShape

        public final SoSFEnum<PoMesh2DVec.ArrowShapes> endArrowShape
        Type of shape to be drawn at the end point of the body. If endArrowShape = NO_SHAPE, the end-shape of each vector is invisible.
      • endArrowHeightType

        public final SoSFEnum<PoMesh2DVec.ArrowHeightTypes> endArrowHeightType
        Defines the type of method to compute the arrow height. If endArrowHeightType = CONSTANT_HEIGHT, each vector has the same end-shape height = endArrowHeightFactor . If endArrowHeightType = RELATIVE_ HEIGHT, the end-shape height of a vector is endArrowHeightFactor * body's length.
      • endArrowHeightFactor

        public final SoSFFloat endArrowHeightFactor
        Height (or Height multiplicative factor) of the arrow shape.
      • endArrowRadiusFactor

        public final SoSFFloat endArrowRadiusFactor
        The end-arrow's radius is end-arrow's height * endArrowRadiusFactor.
      • endArrowColoringType

        public final SoSFEnum<PoMesh2DVec.ArrowColoringTypes> endArrowColoringType
        Coloring method of the end shape. If endArrowColoringType = CONSTANT_COLOR, each vector has the same end-arrow's color, which is the last found during the scene graph traversal.

        If endArrowColoringType = MODULE_MAPPING_COLOR, the end-arrow's color of a vector depends on its module, and by using the current module-data- mapping (see PoMesh for explanation of the current module-data-mapping).

        If endArrowColoringType = SCALAR_MAPPING_COLOR, the end-arrow's color of a vector depends on the scalar value at the mesh node used as the end point of the end-arrow. In this case, the current data-mapping is used to compute the color in relation to the scalar-value (see PoMesh for more explanations about the current data-mapping).

    • Constructor Detail

      • PoMesh2DVec

        public PoMesh2DVec()
        Constructor.