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

cee.usg.State.geometry

The one and only geometry in this state

cee.usg.State.name

The user defined name of the state

cee.usg.State.referenceValue

The user defined reference value of the state (time, frequency, load case index, etc)

Methods

getBoundingBox

cee.usg.State.getBoundingBox()

Returns the BoundingBox (in world coordinates) of the model.

Return type

cee.BoundingBox

getFringesResultRange

cee.usg.State.getFringesResultRange()

Get the min/max value of the scalar result in this part.

Return type

cee.Range

getPartDisplacementsAt

cee.usg.State.getPartDisplacementsAt(partIndex)

Get the displacement result at the given zero based index

Arguments
  • partIndex (number) –

Return type

cee.usg.PartDisplacements

getPartFringesAt

cee.usg.State.getPartFringesAt(partIndex)

Returns the PartScalars defining the fringes result shown on the given part

Arguments
  • partIndex (number) –

Return type

cee.usg.PartScalars

getPartTransformationAt

cee.usg.State.getPartTransformationAt(partIndex)

Get the transformation matrix for the given part in this state

Arguments
  • partIndex (number) –

Return type

cee.Mat4

getPartVectorsAt

cee.usg.State.getPartVectorsAt(partIndex)

Returns the PartVectors defining the vector result shown on the given part

Arguments
  • partIndex (number) –

Return type

cee.usg.PartVectors

getVectorLengthRange

cee.usg.State.getVectorLengthRange()

The range (min/max) of the vector lengths in all parts

Return type

cee.Range

removeAllPartDisplacements

cee.usg.State.removeAllPartDisplacements()

Remove all displacement results in this state

Return type

void

removeAllPartFringes

cee.usg.State.removeAllPartFringes()

Remove all scalar fringes results from this state

Return type

void

removeAllPartTransformations

cee.usg.State.removeAllPartTransformations()

Remove the transformation matrices for all parts in this state

Return type

void

removeAllPartVectors

cee.usg.State.removeAllPartVectors()

Remove all vector results for all parts in this state

Return type

void

setPartDisplacementsAt

cee.usg.State.setPartDisplacementsAt(partIndex, partDisplacements)

Set the displacement result for the given part in this state

Arguments
Return type

void

Note: The PartSettings.displacementVisible property must be true to show the result (default true)

setPartFringesAt

cee.usg.State.setPartFringesAt(partIndex, partFringes)

Set the scalar result that should be shown as fringes for the given part in this state.

Arguments
Return type

void

Note: The PartSettings.fringesVisible property must be true to show the result (default true)

setPartTransformationAt

cee.usg.State.setPartTransformationAt(partIndex, partTransformationMatrix)

Set the transformation result (matrix) for the given part in this state.

Arguments
  • partIndex (number) –

  • partTransformationMatrix (cee.Mat4) –

Return type

void

setPartVectorsAt

cee.usg.State.setPartVectorsAt(partIndex, partVectors)

Set the vector result that should be shown as vector arrows for the given part in this state.

Arguments
Return type

void

Note: The PartSettings.vectorsVisible property must be true to show the result (default true)