Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VectorSettings

Specification of how to render vector arrows for the given result on the model, on cutting planes and on isosurfaces.

Use this object to control the visual appearance of vector arrows in the 3D viewer. With colorMode you can specify whether vectors should use a singleVectorColor or the color mapping from the object's scalar result. You can also setup relative or absolute scaling with scaleMode and perform filtering and clamping of the vector magnitudes (lengths), with setFilteringRange and setClampingRange respectively.

Hierarchy

  • VectorSettings

Index

Accessors

Readonly clampingRangeMaximum

clampingRangeMaximum: number

The maximum length the vectors will have if clamping is enabled. This will be undefined if clamping is disabled.

Readonly clampingRangeMinimum

clampingRangeMinimum: number

The minimum length the vectors will have if clamping is enabled. This will be undefined if clamping is disabled.

colorMode

colorMode: VectorColorMode

The coloring mode of the vector arrows. This can be either single color, as specified by singleVectorColor, or color by fringes, where the color is taken from the scalar result in the object on which the vector arrows are mapped.

drawMaxCount

drawMaxCount: number

If there are more vectors than specified with setDrawMaximumCount(), every n'th vector arrow will be skipped to reduce the number of arrows to within maximum count.

When set to 0, all vectors will be drawn

Note! If drawSkipBy is set to value other than 0, this skip by value will be used and maximum count ignored!

drawMode

drawMode: VectorDrawMode

The rendering mode for the vector result.

Vectors can either be drawn as 3D arrows (default) or a simplified version

drawSkipBy

drawSkipBy: number

Get number of vectors to skip between each vector that is drawn. Default 0.

If set > 0, will draw every n'th vector. No guarantee of an even distribution.

Readonly dynamicSymmetricArrowsScalarId

dynamicSymmetricArrowsScalarId: number

The id of the scalar result used to determine directions of dynamic symmetric arrows. Use setVectorTypeDynamicSymmetricArrow to set this value.

Readonly filteringRangeMaximum

filteringRangeMaximum: number

The maximum length the vectors need to have to be visible when filtering is enabled. This will be undefined if filtering is disabled.

Readonly filteringRangeMinimum

filteringRangeMinimum: number

The minimum length the vectors need to have to be visible when filtering is enabled. This will be undefined if filtering is disabled.

Readonly isClampingEnabled

isClampingEnabled: boolean

Whether clamping of this vector result is enabled.

Readonly isFilteringEnabled

isFilteringEnabled: boolean

Whether filtering of this vector result is enabled.

Readonly resultId

resultId: number

The id (>=0) of the vector result. This id corresponds to the id in ModelDirectory.vectorResultArray.

scaleFactor

scaleFactor: number

The scaling factor to use for the vector arrows. This factor is interpreted as either absolute or relative based on scaleMode.

scaleMode

scaleMode: VectorScaleMode

The scaling mode to use for the vector arrows (absolute or relative).

singleVectorColor

singleVectorColor: Color3Like

The color to use for the vectors if colorMode is SINGLE.

vectorType

vectorType: VectorType

The visualization type for the vector result. Use the methods setVectorTypeArrow, setVectorTypeSymmetricArrow etc to set this property.

deprecated

This setter is deprecated and will be removed in a future version. Instead, use setVectorTypeArrow, setVectorTypeSymmetricArrow, setVectorTypeReverseSymmetricArrow or setVectorTypeDynamicSymmetricArrow.

Methods

disableClamping

  • disableClamping(): void
  • Disables any clamping of the vectors. They will be rendered with the length specified by the vector result and scaling.

    Returns void

disableFiltering

  • disableFiltering(): void
  • Disables any filtering of the vectors. They will be rendered with the length specified by the vector result and scaling.

    Returns void

getAsProperties

setClampingRange

  • setClampingRange(clampMinLength: number, clampMaxLength: number): void
  • Specifies to clamp all vectors between the given min and max length.

    When enabled, all vectors will be clamped into the given <clampMinLength, clampMaxLength> range. So if clampMinLength = clampMaxLength, all vectors will be drawn with the same length, regardless of the magnitude of the vector.

    Note: The clamping is done before any scaling.

    Parameters

    • clampMinLength: number
    • clampMaxLength: number

    Returns void

setFilteringRange

  • setFilteringRange(minLength: number, maxLength: number): void
  • Specifies to show only the vectors whose length lies within the given range.

    When enabled, only vectors whose length is within the given filter range <filterMinLength, filterMaxLength> will be drawn. All other vectors will be discarded and not drawn.

    Note: The filtering is done before any scaling.

    Parameters

    • minLength: number
    • maxLength: number

    Returns void

setFromProperties

  • Applies the settings in the given properties object to this vector settings

    Parameters

    Returns void

setVectorTypeArrow

  • setVectorTypeArrow(): void
  • Set the visualization type to ARROW - normal arrows.

    Returns void

setVectorTypeDynamicSymmetricArrow

  • setVectorTypeDynamicSymmetricArrow(scalarId: number): void
  • Set the visualization type to DYNAMIC_SYMMETRIC_ARROW - arrows centered on the node/vertex, with arrow head directions determined by the sign of the scalar value at that point.

    Note that for mapped vectors on cutting planes, isosurfaces and isovolumes, if dynamicSymmetricArrows scalar does not match the scalar mapped to the cutting plane/isosurface/isovolume, then the vectors will not be displayed.

    Parameters

    • scalarId: number

      The id of the scalar to use to determine arrow directions.

    Returns void

setVectorTypeReverseSymmetricArrow

  • setVectorTypeReverseSymmetricArrow(): void
  • Set the visualization type to REVERSE_SYMMETRIC_ARROW - arrows centered on the node/vertex, with arrow heads pointing inward in both directions

    Returns void

setVectorTypeSymmetricArrow

  • setVectorTypeSymmetricArrow(): void
  • Set the visualization type to SYMMETRIC_ARROW - arrows centered on the node/vertex, with arrow heads pointing outwards in both directions

    Returns void

Generated using TypeDoc