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 asingleVectorColor
, 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 withscaleMode
and perform filtering and clamping of the vector magnitudes (lengths), withsetFilteringRange
andsetClampingRange
respectively.
Accessors
arrowHeadRelativeLength
arrowHeadRelativeRadius
arrowShaftRelativeRadius
clampingRangeMaximum
clampingRangeMinimum
colorMode
drawMaxCount
drawMode
drawSkipBy
dynamicSymmetricArrowsScalarId
filteringRangeMaximum
filteringRangeMinimum
isClampingEnabled
isFilteringEnabled
mapScalarResultId
projectVectorsOnSurface
resultId
scaleFactor
scaleMode
singleVectorColor
vectorType
Methods
Accessors
- cee.ug.arrowHeadRelativeLength()
The length of the vector arrow head relative to the vector length.
- Return type:
number
- cee.ug.arrowHeadRelativeLength(headRelativeLength)
- Arguments:
headRelativeLength (
number
) – None
- Return type:
void
- cee.ug.arrowHeadRelativeRadius()
The radius of the vector arrow head relative to the vector length.
- Return type:
number
- cee.ug.arrowHeadRelativeRadius(headRelativeRadius)
- Arguments:
headRelativeRadius (
number
) – None
- Return type:
void
- cee.ug.arrowShaftRelativeRadius()
The radius of the vector arrow shaft relative to the vector length.
- Return type:
number
- cee.ug.arrowShaftRelativeRadius(shaftRelativeRadius)
- Arguments:
shaftRelativeRadius (
number
) – None
- Return type:
void
- cee.ug.clampingRangeMaximum()
The maximum length the vectors will have if clamping is enabled. This will be undefined if clamping is disabled.
- Return type:
number
- cee.ug.clampingRangeMinimum()
The minimum length the vectors will have if clamping is enabled. This will be undefined if clamping is disabled.
- Return type:
number
- cee.ug.colorMode()
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 bymapScalarResultId
.- Return type:
VectorColorMode
- cee.ug.colorMode(colorMode)
- Arguments:
colorMode (
VectorColorMode
) – None
- Return type:
void
- cee.ug.drawMaxCount()
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!
- Return type:
number
- cee.ug.drawMaxCount(skipBy)
- Arguments:
skipBy (
number
) – None
- Return type:
void
- cee.ug.drawMode()
The rendering mode for the vector result.
Vectors can either be drawn as 3D arrows (default) or a simplified version
- Return type:
VectorDrawMode
- cee.ug.drawMode(drawMode)
- Arguments:
drawMode (
VectorDrawMode
) – None
- Return type:
void
- cee.ug.drawSkipBy()
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.
- Return type:
number
- cee.ug.drawSkipBy(skipBy)
- Arguments:
skipBy (
number
) – None
- Return type:
void
- cee.ug.dynamicSymmetricArrowsScalarId()
The id of the scalar result used to determine directions of dynamic symmetric arrows. Use
setVectorTypeDynamicSymmetricArrow
to set this value.- Return type:
number
- cee.ug.filteringRangeMaximum()
The maximum length the vectors need to have to be visible when filtering is enabled. This will be undefined if filtering is disabled.
- Return type:
number
- cee.ug.filteringRangeMinimum()
The minimum length the vectors need to have to be visible when filtering is enabled. This will be undefined if filtering is disabled.
- Return type:
number
- cee.ug.isClampingEnabled()
Whether clamping of this vector result is enabled.
- Return type:
boolean
- cee.ug.isFilteringEnabled()
Whether filtering of this vector result is enabled.
- Return type:
boolean
- cee.ug.mapScalarResultId()
The scalar results ID to reference for coloring vectors if
colorMode
is COLOR_BY_MAP_SCALAR.- Return type:
number
- cee.ug.mapScalarResultId(scalarResultId)
- Arguments:
scalarResultId (
number
) – None
- Return type:
void
- cee.ug.projectVectorsOnSurface()
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
- Return type:
boolean
- cee.ug.projectVectorsOnSurface(project)
- Arguments:
project (
boolean
) – None
- Return type:
void
- cee.ug.resultId()
The id (>=0) of the vector result. This id corresponds to the id in
ModelDirectory.vectorResultArray
.- Return type:
number
- cee.ug.scaleFactor()
The scaling factor to use for the vector arrows. This factor is interpreted as either absolute or relative based on
scaleMode
.- Return type:
number
- cee.ug.scaleFactor(scaleFactor)
- Arguments:
scaleFactor (
number
) – None
- Return type:
void
- cee.ug.scaleMode()
The scaling mode to use for the vector arrows (absolute or relative).
- Return type:
VectorScaleMode
- cee.ug.scaleMode(scaleMode)
- Arguments:
scaleMode (
VectorScaleMode
) – None
- Return type:
void
- cee.ug.singleVectorColor()
The color to use for the vectors if
colorMode
is SINGLE.- Return type:
Color3Like
- cee.ug.singleVectorColor(singleColor)
- Arguments:
singleColor (
Color3Like
) – None
- Return type:
void
- cee.ug.vectorType()
The visualization type for the vector result. Use the methods
setVectorTypeArrow
,setVectorTypeSymmetricArrow
etc to set this property.- Return type:
VectorType
Methods
disableClamping
- VectorSettings.disableClamping()
Disables any clamping of the vectors. They will be rendered with the length specified by the vector result and scaling.
- Return type:
void
disableFiltering
- VectorSettings.disableFiltering()
Disables any filtering of the vectors. They will be rendered with the length specified by the vector result and scaling.
- Return type:
void
getAsProperties
- VectorSettings.getAsProperties()
Gets the settings for this object as a Plain Old JavaScript Object (POJO).
- Return type:
VectorSettingsProperties
setClampingRange
- VectorSettings.setClampingRange(clampMinLength, clampMaxLength)
- Arguments:
clampMinLength (
number
) – NoneclampMaxLength (
number
) – None
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.
- Return type:
void
setFilteringRange
- VectorSettings.setFilteringRange(minLength, maxLength)
- Arguments:
minLength (
number
) – NonemaxLength (
number
) – None
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.
- Return type:
void
setFromProperties
setVectorTypeArrow
- VectorSettings.setVectorTypeArrow()
Set the visualization type to ARROW - normal arrows.
- Return type:
void
setVectorTypeDynamicSymmetricArrow
- VectorSettings.setVectorTypeDynamicSymmetricArrow(scalarId)
- Arguments:
scalarId (
number
) – The id of the scalar to use to determine arrow directions.
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.
- Return type:
void
setVectorTypeReverseSymmetricArrow
- VectorSettings.setVectorTypeReverseSymmetricArrow()
Set the visualization type to REVERSE_SYMMETRIC_ARROW - arrows centered on the node/vertex, with arrow heads pointing inward in both directions
- Return type:
void
setVectorTypeSymmetricArrow
- VectorSettings.setVectorTypeSymmetricArrow()
Set the visualization type to SYMMETRIC_ARROW - arrows centered on the node/vertex, with arrow heads pointing outwards in both directions
- Return type:
void