# 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

- `geometry`
- `name`
- `referenceValue`

Methods

- `getBoundingBox`
- `getFringesResultRange`
- `getPartDisplacementsAt`
- `getPartFringesAt`
- `getPartTransformationAt`
- `getPartVectorsAt`
- `getVectorLengthRange`
- `removeAllPartDisplacements`
- `removeAllPartFringes`
- `removeAllPartTransformations`
- `removeAllPartVectors`
- `setPartDisplacementsAt`
- `setPartFringesAt`
- `setPartTransformationAt`
- `setPartVectorsAt`

## Accessors

`State.``geometry`()

  The one and only geometry in this state

  Return type: | Geometry

`State.``geometry`(geometry)

  Arguments: | geometry (`Geometry`) – None
  Return type: | void

`State.``name`()

  The user defined name of the state

  Return type: | string

`State.``name`(name)

  Arguments: | name (`string`) – None
  Return type: | void

`State.``referenceValue`()

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

  Return type: | number

`State.``referenceValue`(value)

  Arguments: | value (`number`) – None
  Return type: | void

## 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`) – None partDisplacements (`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`) – None partFringes (`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`) – None partTransformationMatrix (`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`) – None partVectors (`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

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Envision for Web or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...