State
- class cee.usg.State()
A state connects a geometry to the results (scalar, vector, displacement and transformations) for a given time, frequency, load case etc.
A model can have an arbitrary number of states, but only one can be shown at any given time.
To create an animation you can create multiple states, and then only change the
UnstructGridModel.currentStateIndex
property to advance the animation.A state must have one and only one geometry.
The state can also have a scalar, vector, displacement and transformation result.
For the results, you only have to specify the results for the parts that have results. Results are mapped to part via the zero based part index.
Accessors
Methods
Accessors
- State.geometry()
The one and only geometry in this state
- Return type:
Geometry
Methods
getBoundingBox
- State.getBoundingBox()
Returns the
BoundingBox
(in world coordinates) of the model.- Return type:
BoundingBox
getFringesResultRange
- State.getFringesResultRange()
Get the min/max value of the scalar result in this part.
- Return type:
Range
getPartDisplacementsAt
- State.getPartDisplacementsAt(partIndex)
- Arguments:
partIndex (
number
) – None
Get the displacement result at the given zero based index, otherwise null.
- Return type:
PartDisplacements
getPartFringesAt
- State.getPartFringesAt(partIndex)
- Arguments:
partIndex (
number
) – None
Returns the
PartScalars
defining the fringes result shown on the given part. Null when none is specified.- Return type:
PartScalars
getPartTransformationAt
- State.getPartTransformationAt(partIndex)
- Arguments:
partIndex (
number
) – None
Get the transformation matrix for the given part in this state, null if none is specified.
- Return type:
Mat4
getPartVectorsAt
- State.getPartVectorsAt(partIndex)
- Arguments:
partIndex (
number
) – None
Returns the
PartVectors
defining the vector result shown on the given part. Null if not specified.- Return type:
PartVectors
getVectorLengthRange
- State.getVectorLengthRange()
The range (min/max) of the vector lengths in all parts
- Return type:
Range
removeAllPartDisplacements
- State.removeAllPartDisplacements()
Remove all displacement results in this state
- Return type:
void
removeAllPartFringes
- State.removeAllPartFringes()
Remove all scalar fringes results from this state
- Return type:
void
removeAllPartTransformations
- State.removeAllPartTransformations()
Remove the transformation matrices for all parts in this state
- Return type:
void
removeAllPartVectors
- State.removeAllPartVectors()
Remove all vector results for all parts in this state
- Return type:
void
setPartDisplacementsAt
- State.setPartDisplacementsAt(partIndex, partDisplacements)
- Arguments:
partIndex (
number
) – NonepartDisplacements (
PartDisplacements
) – None
Set the displacement result for the given part in this state
Note: The
PartSettings.displacementVisible
property must be true to show the result (default true)- Return type:
void
setPartFringesAt
- State.setPartFringesAt(partIndex, partFringes)
- Arguments:
partIndex (
number
) – NonepartFringes (
PartScalars
) – None
Set the scalar result that should be shown as fringes for the given part in this state.
Note: The
PartSettings.fringesVisible
property must be true to show the result (default true)- Return type:
void
setPartTransformationAt
- State.setPartTransformationAt(partIndex, partTransformationMatrix)
- Arguments:
partIndex (
number
) – NonepartTransformationMatrix (
Mat4
) – None
Set the transformation result (matrix) for the given part in this state.
- Return type:
void
setPartVectorsAt
- State.setPartVectorsAt(partIndex, partVectors)
- Arguments:
partIndex (
number
) – NonepartVectors (
PartVectors
) – None
Set the vector result that should be shown as vector arrows for the given part in this state.
Note: The
PartSettings.vectorsVisible
property must be true to show the result (default true)- Return type:
void