VectorSettings

class cee.ug.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, the color mapping from the object’s scalar fringes, or the color mapping from a provided scalar result ID. 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.

Accessors

cee.ug.VectorSettings.anisotropicScaleFactor()
get anisotropicScaleFactor(): Vec3Like

The anisotropic scaling factor to use for the vector arrows. The provided value will scale each vector result component by the respective scaling factor. This factor is interpreted as either absolute or relative based on scaleMode. Returns null if scaleFactor is set and in use (default).

Returns: Vec3Like

set anisotropicScaleFactor(anisotropicScaleFactor: Vec3Like): void

Parameters

anisotropicScaleFactor: Vec3Like

Returns: void

cee.ug.VectorSettings.arrowHeadRelativeLength()
get arrowHeadRelativeLength(): number

The length of the vector arrow head relative to the vector length.

Returns: number

set arrowHeadRelativeLength(headRelativeLength: number): void

Parameters

headRelativeLength: number

Returns: void

cee.ug.VectorSettings.arrowHeadRelativeRadius()
get arrowHeadRelativeRadius(): number

The radius of the vector arrow head relative to the vector length.

Returns: number

set arrowHeadRelativeRadius(headRelativeRadius: number): void

Parameters

headRelativeRadius: number

Returns: void

cee.ug.VectorSettings.arrowShaftRelativeRadius()
get arrowShaftRelativeRadius(): number

The radius of the vector arrow shaft relative to the vector length.

Returns: number

set arrowShaftRelativeRadius(shaftRelativeRadius: number): void

Parameters

shaftRelativeRadius: number

Returns: void

cee.ug.VectorSettings.clampingRangeMaximum()
get clampingRangeMaximum(): number

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

Returns: number

cee.ug.VectorSettings.clampingRangeMinimum()
get clampingRangeMinimum(): number

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

Returns: number

cee.ug.VectorSettings.colorMode()
get colorMode(): VectorColorMode

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

Returns: VectorColorMode

set colorMode(colorMode: VectorColorMode): void

Parameters

colorMode: VectorColorMode

Returns: void

cee.ug.VectorSettings.drawMaxCount()
get 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!

Returns: number

set drawMaxCount(skipBy: number): void

Parameters

skipBy: number

Returns: void

cee.ug.VectorSettings.drawMode()
get drawMode(): VectorDrawMode

The rendering mode for the vector result.

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

Returns: VectorDrawMode

set drawMode(drawMode: VectorDrawMode): void

Parameters

drawMode: VectorDrawMode

Returns: void

cee.ug.VectorSettings.drawSkipBy()
get 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.

Returns: number

set drawSkipBy(skipBy: number): void

Parameters

skipBy: number

Returns: void

cee.ug.VectorSettings.dynamicSymmetricArrowsScalarId()
get dynamicSymmetricArrowsScalarId(): number

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

Returns: number

cee.ug.VectorSettings.filteringRangeMaximum()
get 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.

Returns: number

cee.ug.VectorSettings.filteringRangeMinimum()
get 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.

Returns: number

cee.ug.VectorSettings.isClampingEnabled()
get isClampingEnabled(): boolean

Whether clamping of this vector result is enabled.

Returns: boolean

cee.ug.VectorSettings.isFilteringEnabled()
get isFilteringEnabled(): boolean

Whether filtering of this vector result is enabled.

Returns: boolean

cee.ug.VectorSettings.mapScalarResultId()
get mapScalarResultId(): number

The scalar results ID to reference for coloring vectors if colorMode is COLOR_BY_MAP_SCALAR.

Returns: number

set mapScalarResultId(scalarResultId: number): void

Parameters

scalarResultId: number

Returns: void

cee.ug.VectorSettings.nodeAveragedValues()
get nodeAveragedValues(): boolean

Specify if the vector result should be shown as a node averaged result or not.

If false (default) the result is shown as is computed. If true, a node averaged result will be shown that is derived from the original result.

Returns: boolean

set nodeAveragedValues(useNodeAveraging: boolean): void

Parameters

useNodeAveraging: boolean

Returns: void

cee.ug.VectorSettings.projectVectorsOnSurface()
get projectVectorsOnSurface(): boolean

Set if the vectors should be projected onto the model surface or not (default is false)

If set to true, all vectors are projected onto the surface using the surface normal in that point to define the plane to project onto.

This works in the similar way to the CuttingPlane::setProjectVectorsOnPlane() method.

NOTE: It is only in effect when having PER_NODE and PER_ELEMENT_NODE vector results

Returns: boolean

set projectVectorsOnSurface(project: boolean): void

Parameters

project: boolean

Returns: void

cee.ug.VectorSettings.resultId()
get resultId(): number

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

Returns: number

cee.ug.VectorSettings.scaleFactor()
get scaleFactor(): number

The scaling factor to use for the vector arrows. This factor is interpreted as either absolute or relative based on scaleMode. Returns undefined if anisotropicScaleFactor is set and in use.

Returns: number

set scaleFactor(scaleFactor: number): void

Parameters

scaleFactor: number

Returns: void

cee.ug.VectorSettings.scaleMode()
get scaleMode(): VectorScaleMode

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

Returns: VectorScaleMode

set scaleMode(scaleMode: VectorScaleMode): void

Parameters

scaleMode: VectorScaleMode

Returns: void

cee.ug.VectorSettings.singleVectorColor()
get singleVectorColor(): Color3Like

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

Returns: Color3Like

set singleVectorColor(singleColor: Color3Like): void

Parameters

singleColor: Color3Like

Returns: void

cee.ug.VectorSettings.vectorType()
get vectorType(): VectorType

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

Returns: VectorType

Methods

cee.ug.VectorSettings.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

cee.ug.VectorSettings.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

cee.ug.VectorSettings.getAsProperties()
getAsProperties(): VectorSettingsProperties

Gets the settings for this object as a Plain Old JavaScript Object (POJO).

Returns: VectorSettingsProperties

cee.ug.VectorSettings.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

cee.ug.VectorSettings.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

cee.ug.VectorSettings.setFromProperties()
setFromProperties(props: Partial): void

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

Parameters

props: Partial

Returns: void

cee.ug.VectorSettings.setVectorTypeArrow()
setVectorTypeArrow(): void

Set the visualization type to ARROW - normal arrows.

Returns: void

cee.ug.VectorSettings.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

cee.ug.VectorSettings.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

cee.ug.VectorSettings.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