# CDPMetaData

## Functions

| `~CDPMetaData`
void | `setSimulationInfo`
CDPGeometryInfo * | `addGeometryInfo`
CDPStateInfo * | `addStateInfo`
bool | `addStateGroupingInfo`
bool | `addSetInfo`
CDPResultInfo * | `addResultInfo`
void | `setHasRigidBodyTransformations`
void | `setHasElementVisibilityResults`

## Detailed Description

class `CDPMetaData`

  The meta data functions as a table of contents for the given analysis.

  It is used to inform the host application about what the current simulation can provide of data. The meta data is usually used by the host to populate a UI. The data provider will only be asked for data that has been reported in the meta data returned in this class.

  The meta data consists of information about:

  - Geometries. The number of geometries, the name and id of each part in each geometry
  - States. A list of all states with id, name, reference value etc.
  - State Groups. A list of state groups (if applicable). Used to group the states in the host UI.
  - Sets. A list of available pre defined sets in the analysis.
  - Result Info. A list of all the results (scalar, vector, tensor, displacements) in the analysis.
  - Rigid body transformations. A bool specifying if this analysis has rigid body transformations or not.
  - Visibility results. A bool specifying if the analysis has a visibility results (per element visibility flag for all states).

  Public Functions

  inline virtual `~CDPMetaData`()
  virtual void `setSimulationInfo`(const CDPString &title, const CDPString &description, CDPSimulationType simulationType, CDPSolutionType solutionType) = 0

    Specifies information about the simulation.

    This information will be available as meta data in the client app. It is only used for information purposes.

  virtual CDPGeometryInfo *`addGeometryInfo`() = 0

    Adds information about a geometry.

    All simulations need at least one geometry. Use this method to add the CDPGeometryInfo to the meta data and use the returned object to fill in information about the geometry.

    See also

    CDPGeometryInfo

  virtual CDPStateInfo *`addStateInfo`(cdp_int_t stateId, const CDPString &name, cdp_double_t referenceValue) = 0

    Adds information about a state.

    All simulations need at least one state. A state is a collection of geometry and results for a given time step, frequency, etc.

    All state ids must be unique. A name should be provided, and optionally a reference value.

    A state could be part of a state group. If so, use the returned object to specify the parent state group with the CDPStateInfo::setParentStateGroupingId() method.

  virtual bool `addStateGroupingInfo`(cdp_int_t groupId, const CDPString &name) = 0

    Adds information about a state group.

    State groups are an optional way to group states. This information could be used by the host app to build a UI where the states are organized into groups. This is purely for UI and state groups will not be used when the provider is asked for geometry or results.

  virtual bool `addSetInfo`(CDPSetType setType, cdp_int_t setId, const CDPString &name) = 0

    Adds information of a predefined set.

    Use this method to specify each pre defined set in the simulation. All sets needs to have a unique id.

    Note

    Currently, only Element sets are supported.

  virtual CDPResultInfo *`addResultInfo`(CDPResultType resultType, cdp_int_t resultId, const CDPString &name, CDPResultMappingType mapping) = 0

    Adds information about a result in the analysis.

    Use this method to add information about a result in the simulation.

    Results are defined per item (node, element, element node, element surface) according to the result mapping. Each item must be assigned a result value. A result value consists of one or more components depending on the result type.

    The following result mappings are supported:

    - CDP_PER_NODE. One result value per node
    - CDP_PER_ELEMENT. One result value per element
    - CDP_PER_ELEMENT_NODE. One result value per element node.
    - CDP_PER_ELEMENT_SURFACE- One result value per element surface.

    The following result types are supported:

    - CDP_RESTYPE_SCALAR. Scalar result with one component per item.
    - CDP_RESTYPE_VECTOR. Vector result with three components per item.
    - CDP_RESTYPE_DISPLACEMENT. Displacement result with three components per item (node). Displacements can be relative (default) or absolute.
    - CDP_RESTYPE_STRESS_TENSOR. Stress tensor result with six components per item.
    - CDP_RESTYPE_STRAIN_TENSOR. Strain tensor result with six components per item.

    For displacement results, we support both absolute and relative displacements (default). To specify to use absolute displacements, use the returned CDPResultInfo object and call CDPResultInfo::setDisplacementsContainAbsoluteNodePositions(true).

    Results need to have unique ids

  virtual void `setHasRigidBodyTransformations`(bool hasTransformations) = 0

    Specifies if this simulation has a rigid body transformation result.

    If set to true, the host will query for transformation results for each state using the CDPDataProvider::getRigidBodyTransformations(). This allows for efficient movement of element groups (only one 4*4 matrix per group) without having to provide displacements for each node.

  virtual void `setHasElementVisibilityResults`(bool hasVisibilityResults) = 0

    Specifies if this simulation has a per element visibility result.

    If set to true, the host will query for visibility results for each state using the CDPDataProvider::getVisibilityResult(). This allows for efficient removal of elements in some states without having to provide a full new geometry for each state.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

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

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
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...