Class Descriptions

The currently available classes are described in detail in this section.

CDPChangeNotifications

class CDPChangeNotifications

In addition to providing data for visualization, the data provider framework also allows the data provider to communicate updated data to the host.

The CDPChangeNotifications interface is used to communicate any change in the data provided by the data provider back to the host application. The host application will then process the change notification, and any new data needed by the app will trigger subsequent calls to the data provider (e.g. a getResults() call if notifyResultChanged was used).

Public Functions

virtual void notifyResultChanged(cdp_int_t resultId) = 0

Notifies the host application that a result has changed.

This notification will flag the specified result as stale in the host application and will trigger a getResult() call if the result is used by the current visualization.

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

Notifies the host application that a result has been added to the list of results available from the data provider.

This will update the ModelDirectory/DataSourceDirectory in the host app. It is up to the host application to decide what to do with the new result.

virtual void notifyResultDeleted(cdp_int_t resultId) = 0

Notifies the host application that a result has been deleted and is thus no longer available.

This will update the ModelDirectory/DataSourceDirectory in the host app. If the result is in use it will be removed from the ModelSpec or feature extraction item.

virtual void notifyRigidBodyTransformationsChanged() = 0

Notifies the host application that the rigid body transformations have changed.

This notification will flag the rigid body transformations as stale in the host application and will trigger a getRigidBodyTransformations() call if the transformations are used by the current visualization.

Since
3.0

virtual void notifyStateMetaDataChanged(cdp_int_t stateId, const CDPString &name, cdp_double_t referenceValue) = 0

Notifies the host application that the meta data for the given state has changed.

This will update the ModelDirectory/DataSourceDirectory in the host app, and if the state is in use the display of the state name and reference value will be updated in the view.

This notification is useful if you are using a single state to monitor a simulation of a digital twin, and would like to update the single state with the right meta data.

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

Notifies the host application that a state has been added to the list of available states from the data provider.

This will update the ModelDirectory/DataSourceDirectory in the host application, and it is up to the host application to decide if this new state should be shown or not.

virtual void notifyStateDeleted(cdp_int_t stateId) = 0

Notifies the host application that a state has been deleted and is thus no longer available.

This will update the ModelDirectory/DataSourceDirectory in the host application. If the state is currently being visualized, the ModelSpec will be updated and an existing state will be selected.

virtual void notifyGeometryChanged(cdp_size_t geometryIndex) = 0

Notifies the host application that a geometry has been changed.

Use this notification if the number of nodes or elements has changed in the geometry. The geometry will be flagged as stale in the host application, and if it is in use in the current visualization the app will trigger a getGeometry() call to update the visualization with the new geometry.

This notification will also mark any results currently in use by the geometry as stale, and will trigger a getResult() call if the result is in use by the current visualization.

Note

There is one limitation to updating the geometry: The meta data of the geometry cannot change, which means that the number of resulting parts needs to be constant. But number of nodes, number of elements, element types, etc. can change.

virtual void notifyTriggerNewGetMetaData() = 0

Notifies the host application that the meta data is stale and it needs to call CDPDataProvider::getMetaData() again.

If the meta data for the geometry has changed (a geometry was added, the number of part changed, etc) you must use this notification. This will trigger a new call to CDPDataProvider::getMetaData(). If the change is only number of nodes, number of elements, element types, etc. use the notifyGeometryChanged() method.

CDPClientRequest

class CDPClientRequest

Request from the client to be processed by the data provider.

The use of message and data is entirely up to the creator of the data provider and the user of it. EnvisionDesktop/EnvisionWeb will not intercept, change or interpret them in any way.

Public Functions

virtual const CDPString &message() const = 0

Returns the message part of the client request.

Might be a command, a token or something that identifies the request.

virtual const CDPString &data() const = 0

Returns any data pertinent to the given request.

CDPClientResponse

class CDPClientResponse

Response from the data provider to the client for the given request.

The use of return data is entirely up to the creator of the data provider and the user of it. EnvisionDesktop/EnvisionWeb will not intercept, change or interpret them in any way.

Public Functions

virtual void setStringData(const CDPString &data) = 0

Any response from the data provider to the host/client application.

CDPColor4

class CDPColor4

A simple helper class for colors.

Public Functions

inline CDPColor4()

Default constructor.

inline CDPColor4(const CDPColor4 &other)

Copy constructor.

inline CDPColor4(float r, float g, float b)

Construction from r, g, b components.

inline CDPColor4(float r, float g, float b, float a)

Construction from r, g, b, a components.

inline CDPColor4 &operator=(const CDPColor4 &rhs)

Assignment operator.

inline const float &r() const

R component of the color.

inline const float &g() const

G component of the color.

inline const float &b() const

B component of the color.

inline const float &a() const

A component of the color.

inline float &r()

R component of the color.

inline float &g()

G component of the color.

inline float &b()

B component of the color.

inline float &a()

A component of the color.

inline void set(float r, float g, float b, float a = 1.0f)

Sets r, g, b and a value.

inline void setAlpha(float a)

Sets a value.

CDPDataProviderFactory

class CDPDataProviderFactory

A Data Provider Plugin has two classes.

One CDPDataProviderFactory and one CDPDataProvider. The host will instantiate the factory once (usually at startup), and use the factory to determine if a given modelKey is supported by the plugin or not.

If the modelKey is supported, the host will use the factory to create a CDPDataProvider instance. Whenever the model/analysis is closed, the CDPDataProvider will be deleted.

The factory is only created once per process, and usually kept until the app/server closes.

The factory has two roles:

  1. Provide information about the associated data provider and check if a modelKey is supported by the provider.
  2. Create and destroy the associated data provider.

Public Functions

virtual bool getProviderInfo(CDPDataProviderInfo *info) = 0

Gets information about the provider produced by this factory.

Populate the info object with information relevant to your provider.

virtual bool isSupportedByProvider(const CDPString &modelKey) = 0

Checks if the given modelKey is supported by the data providers produced by this factory.

In this method you need to check if the incoming modelKey points to a resource that your provider can read.

Returns true if the modelKey is supported, false if it is not.

If you return true, the next action from the host will be to create a CDPDataProvider with the createProviderInstance() method, and then call init on this object with the given modelKey.

virtual CDPDataProvider *createProviderInstance() = 0

Creates and returns an instance of the data provider associated with this factory.

Creates and returns the new instance. The instance is managed by the host, but it will be deleted with the destroyProviderInstance() method to ensure that it is allocated and deleted with the same heap manager.

virtual void destroyProviderInstance(CDPDataProvider *instance) = 0

Destroys the given data provider.

This method will be called whenever the host is done with the use of the data provider. The provider passed to this method will always have been allocated with createProviderInstance() in the same factory. This is to ensure that it is allocated and deleted with the same heap manager.

CDPDataProviderInfo

class CDPDataProviderInfo

This class contains information about the data provider.

Public Functions

virtual void setFileDescription(const CDPString &description) = 0

Specifies the description of the files/content the provider supports.

Example: “ANSYS Binary Result File”

virtual void setFileMask(const CDPString &mask) = 0

Specifies (if applicable) the file mask of the files supported by this provider.

Example: *.rst;*.rth;*.rfl”

virtual void setHasDefaultColors(bool hasDefaultColors) = 0

Specifies if the provider will specify default colors or not.

This needs to be set to true if the provider will specify default colors for the model using the CDPElementGroupInfo::setPartColor() or CDPGeometryInfo::addElementGroupInfoWithColor() methods.

Default is false (no colors specified)

virtual void publishInitOptionBool(const CDPString &optionKey, const CDPString &optionDescription, bool defaultValue) = 0

Publishes information about a boolean initialization option for the data provider.

These settings will be available for the host program as ReaderSettings, and user defined values will be provided in the CDPInitOptions passed to init() in the DataProvider.

virtual void publishInitOptionDouble(const CDPString &optionKey, const CDPString &optionDescription, cdp_double_t defaultValue) = 0

Publishes information about a double initialization option for the data provider.

These settings will be available for the host program as ReaderSettings, and user defined values will be provided in the CDPInitOptions passed to init() in the DataProvider.

virtual void publishInitOptionString(const CDPString &optionKey, const CDPString &optionDescription, const CDPString &defaultValue) = 0

Publishes information about a string initialization option for the data provider.

These settings will be available for the host program as ReaderSettings, and user defined values will be provided in the CDPInitOptions passed to init() in the DataProvider.

CDPDataProvider

class CDPDataProvider

CDPDataProvider is the base class for data providers that can be used in both desktop and cloud products from Ceetron.

A data provider acts as a data source for a Ceetron cloud/desktop based host application. It allows for reading or otherwise providing data in an unified way. The host application does not need any special handling per data provider (or other built-in readers).

In addition to providing data for visualization, the data provider also supports communicating updated data to the host application. This is done via the pollForChanges() method and any change is communicated back to the host application via the CDPChangeNotifications interface.

Public Functions

virtual bool init(const CDPString &modelKey, const CDPInitOptions &initOptions, CDPError *error) = 0

Initializes the provider with the given model key and prepare to provide meta data.

The first call to the provider after it was created is init(). In this method you should prepare to return meta data and also validate if this is actually a supported model.

init is only called if the corresponding CDPDataProviderFactory responded positive to the CDPDataProviderFactory::isSupportedByProvider() call.

The initOptions contains the user defined options for this provider. You should at least support the options that are published in the CDPDataProviderInfo delivered from your factory.

The error object can be used to communicate an error message back to the host app

virtual void close() = 0

This method is called by the host when the data provider is no longer needed.

Release any resources allocated by this instance

virtual bool getMetaData(CDPMetaData *metaData) = 0

Provides the meta data (model/simulation content) for the current model.

The meta data is a description of the contents of the model/simulation. It contains information about the geometry (number of geometries, names and ids of each part), states, results (scalar, vector, tensor, displacement), rigid body results and sets.

The minimum requirement to provide is one state using the CDPMetaData::addStateInfo().

getMetaData() is always called once after init(). It will also be called if using pollForChanges() or handleClientRequest() and you call notifyTriggerNewGetMetaData().

virtual bool getGeometry(const CDPGeometrySpec &spec, CDPGeometry *geometry) = 0

Provides the geometry for the given spec (geometry index and state id).

A model can consist of 1 or more geometries per state. If the model is partly adaptive or there are other reason to split the model into multiple geometries then you can have any number of geometries per state.

If the model is remeshed/adaptive, you can provide a different geometry for each state.

The normal case is to have one geometry that is non-adaptive.

There are some restrictions regarding geometries:

  1. The number of geometries must be the same in all states. The number of geometries is specified by the number of geometry infos that are added to the CDPMetaData.
  2. A geometry is either constant for all states, or adaptive in all states. This is specified by the CDPGeometryInfo::setHasAdaptiveGeometry() method. Default is false.

The host will only call getGeometry() whenever a new geometry is needed. So in the normal case (non-adaptive, single geometry) this method will only be called once.

Note

Data providers support displacements, so there is no need to create adaptive geometries if the topology of the part is constant, and only the nodes are moved/displaced. You only need adaptive geometries when the number of elements changes between states.

virtual bool getSet(cdp_int_t setId, CDPSet *set) = 0

Provides the items of the set with the given id.

Populate the provided set with the contents of the given set.

The available sets are specified in CDPMetaData.

Note

Currently only element sets are supported.

virtual bool getResult(const CDPResultSpec &spec, CDPResult *result) = 0

Provides the result based on the given spec.

Populate the result with the results corresponding to the given spec. This can be scalar, vector, displacement, stress- and strain tensors results.

The type, id, name and result mapping is specified in the CDPMetaData in the CDPResultInfo object.

virtual bool getRigidBodyTransformations(cdp_size_t geometryIndex, cdp_int_t stateId, CDPTransformations *transformations) = 0

Provides the rigid body transformation result for the given geometry and state.

Rigid body transformation results are one transformation matrix (4*4) per element group.

virtual bool getElementVisibilityResult(cdp_size_t geometryIndex, cdp_int_t stateId, CDPVisibilityResult *result) = 0

Provides the element visibility result for the given geometry and state.

Visibility result is a result with a boolean per element per state specifying if the element is visible or not in the given state.

This is useful for analysis that have eroded or deleted elements as a cheap way of supporting remeshing. This is much more efficient that providing a new geometry per state.

virtual void pollForChanges(CDPChangeNotifications *changeNotifications) = 0

Allows the provider to communicate changes/updates to the host.

If polling is enable in the host application, this method will be called at regular intervals to allow the data provider to communicate any changes to the host. Any changes to what the data provider can deliver is communicated back to the host application via the CDPChangeNotifications interface. This interface allows for update of result and geometry and for addition or deletion of states and results.

The change notifications will be handled by the host app, and any new data needed by the app will trigger subsequent calls to the data provider (e.g. a getResults() call if notifyResultChanged was used).

There is one limitation to the updates that can happen. The setup of the geometry (number of geometries and the resulting number of parts per geometry) must be constant. However, the contents of the geometry might change, so the number of elements or number of nodes can change.

virtual bool handleClientRequest(const CDPClientRequest &request, CDPClientResponse *response, CDPChangeNotifications *changeNotifications) = 0

Processes a request from the client (EnvisionWeb client or EnvisionDesktop host application).

The client (web or desktop) can send a request to the data provider. The content of the request and the response is entirely up to the user and not used by EnvisionDesktop/EnvisionWeb in any way.

This request could be a query for information not passed through the DP API, it could be a command to modify the data or a command to do some other changes in the data provider. It is entirely up to the user of EnvisionDesktop/EnvisionWeb to define this behavior.

A request contains a message and some data (CDPClientRequest). Based on this request the data provider will respond with some data (CDPClientResponse) that will be sent to the client. There is also an option to notify the host (server) and client that the data provided have changed (CDPChangeNotifications). This is similar to pollForChanges().

CDPElementGroupInfo

class CDPElementGroupInfo

Contains information about one element group.

This class is used for describing the parts produced by one element group if using sub-group part splitting (see CDPGeometryInfo for more info on how parts are created).

All ids specified must be unique within the contained geometry, and parts cannot span element groups, so any id used in one element group (either per group or sub-group) cannot be used in another element group.

Public Functions

virtual void setPartName(cdp_int_t geometryGlobalPartId, const CDPString &partName) = 0

Sets the name of the part with the given geometryGlobalPartId in this group.

All the unique part ids specified in the CDPElementGroup::setElementPartIds() must be specified for the associated element group with this method.

virtual void setPartBoundaryCondition(cdp_int_t geometryGlobalPartId, bool isBoundaryCondition) = 0

Sets if the part with the given geometryGlobalPartId in this group is a boundary condition part or not.

All the unique part ids specified in the CDPElementGroup::setElementPartIds() must be specified for the associated element group with this method.

virtual void setParentPart(cdp_int_t geometryGlobalPartId, cdp_int_t geometryGlobalParentPartId) = 0

Sets the parent part id for the part with the given geometryGlobalPartId in this group.

All the unique part ids specified in the CDPElementGroup::setElementPartIds() must be specified for the associated element group with this method.

virtual void setPartColor(cdp_int_t geometryGlobalPartId, const CDPColor4 &partColor) = 0

Sets the default color for the part with the given geometryGlobalPartId in this group.

All the unique part ids specified in the CDPElementGroup::setElementPartIds() must be specified for the associated element group with this method.

Note

You need to specify that your provider is specifying default colors in your derived factory (implementation of CDPDataProviderFactory::getProviderInfo()) by using the CDPDataProviderInfo::setHasDefaultColors() method to tell the host to use the default colors.

virtual void addPartData(cdp_int_t geometryGlobalPartId, const CDPString &key, const CDPString &value) = 0

Adds additional data (key,value pairs) for a part in this geometry.

All the unique part ids specified in the CDPElementGroup::setElementPartIds() must be specified for the associated element group with this method.

CDPElementGroup

class CDPElementGroup

The element group defines a group of elements within one geometry.

This group will either result in one single part in the host or a number of parts if setElementPartIds() are used. See CDPGeometryInfo for information and limitations on how parts are generated.

Note

Make sure the meta data provided in CDPGeometryInfo or CDPElementGroupInfo matches what you populate in this method.

Public Functions

virtual void addSingleTypeElements(CDPElementType elementType, cdp_size_t elementCount, const cdp_int_t *elementNodeArr, cdp_size_t elementNodeCount, const cdp_int_t *elementIdArr) = 0

Adds elements with the same element type to this group.

Use this method to add elements to this group, all having the same element type. You provide the number of elements, the array of element nodes (zero based indices into the corresponding node group), number of element nodes and optionally an id per element.

Restrictions

  • elementNodeArr must have the size elementNodeCount
  • elementNodeArr must match element type and count. So if you specify 5 CDP_ELT_TETRAHEDRONS elements, elementNodeCount must be 20 (5*4).
  • elementIdArr must either be NULL or have the size elementCount

See also

CDPElementType

Note

For polyhedron elements (CDP_ELT_POLYHEDRONS) you have to specify the extra information about the polyhedrons with the addPolyhedronData method (element face info).

virtual void addMultipleTypeElements(const CDPElementType *elementTypeArr, cdp_size_t elementCount, const cdp_int_t *elementNodeArr, cdp_size_t elementNodeCount, const cdp_int_t *elementIdArr) = 0

Adds elements with different element types to this group.

Use this method to add an array of elements of different types to this group. You specify one element type per element using the elementTypeArr array. You then provide the number of elements, the array of element nodes (zero based indices into the corresponding node group), number of element nodes and optionally an id per element.

Restrictions

  • elementTypeArr must have the size elementCount
  • elementNodeArr must have the size elementNodeCount
  • elementNodeArr must match element type and count. So if you specify 5 CDP_ELT_TETRAHEDRONS elements, elementNodeCount must be 20 (5*4).
  • elementIdArr must either be NULL or have the size elementCount

See also

CDPElementType

Note

For polyhedron elements (CDP_ELT_POLYHEDRONS) you have to specify the extra information about the polyhedrons with the addPolyhedronData method (element face info).

virtual void addPolyhedronData(const cdp_ubyte_t *numNodesPerPolyhedronArr, const cdp_ubyte_t *numFacesPerPolyhedronArr, cdp_size_t polyhedronCount, const cdp_ubyte_t *numNodesPerFaceArr, cdp_size_t totalFaceCount, const cdp_int_t *faceNodeIndicesArr, cdp_size_t faceNodeIndicesCount) = 0

Adds information about polyhedrons in this element group.

Use this method (in addition to addSingleTypeElements or addMultipleTypeElements) to define all the polyhedron elements in the group.

Polyhedrons can have any shape: any number of surface and any number of nodes per surface. This method adds the topology of a set of polyhedrons in this group. The number of nodes per polyhedron is specified in numNodesPerPolyhedronArr array. The number of faces per polyhedron is specified in the numFacesPerPolyhedronArr array. The number of nodes per face for all faces are specified in the numNodesPerFaceArr array. Finally, the topology of each face is specified in faceNodeIndicesArr (which contains zero based node indices into the associated node group, same as the element nodes).

Restrictions

  • numNodesPerPolyhedronArr must have the size polyhedronCount
  • numFacesPerPolyhedronArr must have the size polyhedronCount
  • numNodesPerFaceArr must have the size totalFaceCount
  • faceNodeIndicesArr must have the size faceNodeIndicesCount

virtual void setElementPartIds(const cdp_int_t *partIdArr, cdp_size_t elementCount) = 0

Specifies part ids for the elements.

Use this method to create more than one part in the host from a group. Each element is assigned a part id, and the resulting number of parts is the set of unique part ids provided.

This is optional, and if not specified, all the elements in the group will become one part.

Note

The part ids provided here must match the ones specified in the meta data using CDPElementGroupInfo::addPartInfo. Some restrictions apply to part ids, see CDPGeometryInfo for more information.

virtual void setPrescribedElementOrdering(const cdp_int_t *elementTargetIndices, cdp_size_t elementCount) = 0

Specifies a custom ordering of the provided elements.

Use this method if you want the elements to get a custom ordering. This is optional, and if specified, the elements will be ordered as specified in the elementTargetIndices. Note that any per element index (e.g. per element results etc.) will use this custom order if specified.

elementCount must match the number of elements in the group, and the elementTargetIndices must contain values 0..elementCount - 1, and all array members must be unique. So no holes or duplicates are allowed.

CDPError

class CDPError

Error object to communicate an error message back to the host.

Public Functions

virtual void setErrorMessage(const CDPString &errorMessage) = 0

Sets the error message to send back to the host.

CDPGeometryInfo

class CDPGeometryInfo

Contains information about one geometry.

A geometry contains one or more element groups and one or more node groups. The element groups can have individual node groups, or many element groups can share the same node group.

There are two ways to define what becomes “parts” in the host application from a data provider:

  1. Each element group becomes one part
  2. Each element group is split into one or more parts based on a per element assignment inside @ the group.

In the first case, each group becomes a part and the id and the name specified in the CDPGeometryInfo::addElementGroupInfo() is used for the part.

In the second case, you can add the element group info with the addElementGroupInfo() method (without parameters). You then add information about all the parts produced by this group with the CDPElementGroupInfo::addPartInfo() method.

There are two restrictions regarding part ids:

  1. Part ids must be unique within one geometry
  2. Part ids cannot span multiple element groups. So in the case of per element part subdivision, each element group must produce unique parts.

See CDPDataProvider::getGeometry() for more information about how geometries are used.

Public Functions

virtual void addElementGroupInfo(cdp_int_t partId, const CDPString &name) = 0

Adds information about one element group.

By using this method, all the elements in the group will become one part in the host and it will have the given name and id.

virtual void addElementGroupInfoWithColor(cdp_int_t partId, const CDPString &name, const CDPColor4 &color) = 0

Adds information about one element group.

By using this method, all the elements in the group will become one part in the host and it will have the given name and id. In addition a default color is provided.

Note

You need to specify that your provider is specifying default colors in your derived factory (implementation of CDPDataProviderFactory::getProviderInfo()) by using the CDPDataProviderInfo::setHasDefaultColors() method to tell the host to use the default colors.

virtual CDPElementGroupInfo *addElementGroupInfo() = 0

Adds information about one element group with sub-group part splitting.

Use this method if you want to provide per element part assignment within this group. See description above for restrictions regarding use of part ids.

Use the CDPElementGroupInfo::addPartInfo() method to add meta data about each part produced from this group.

Per element part ids are provided with the CDPElementGroup::setElementPartIds() method.

virtual void setHasAdaptiveGeometry(bool hasAdaptiveGeo) = 0

Specifies if this geometry is adaptive or not.

If set to true, you will be asked to provide a CDPGeometry for each state in the analysis.

If set to false (default), the same geometry will be used for all states and you will only have to provide this once.

CDPGeometrySpec

class CDPGeometrySpec

An identifier of a geometry.

Public Functions

virtual cdp_size_t geometryIndex() const = 0

Returns the zero based index of the geometry to get.

For the normal case of only one geometry, this will be 0.

virtual cdp_int_t stateId() const = 0

Returns the id of the state to get the geometry for.

For non-adaptive geometries this can be ignored, as the geometry is the same for all states. See CDPGeometryInfo::setHasAdaptiveGeometry for more info on adaptive geometries.

CDPGeometry

class CDPGeometry

A geometry is defined by a number of element and node groups.

The element groups specify how many parts the geometry will end up having in the host app, either one part per group or any number of parts per group. See CDPGeometryInfo for more information about parts.

Each element group can have its own node group or share it with other element groups. The node group to use for an element group is specified in the call to addElementGroup. The normal case is either to have one node group to share between all element groups, or to have one node group per element group.

A geometry must have at least one node and one element group.

Public Functions

virtual CDPNodeGroup *addNodeGroup() = 0

Adds a node group to this geometry.

Use the returned CDPNodeGroup to populate the group with coordinates and optional ids.

virtual CDPElementGroup *addElementGroup(cdp_size_t nodeGroupIdx) = 0

Adds an element group to this geometry.

Use the returned CDPElementGroup to populate the elements of the group.

CDPInitOptions

class CDPInitOptions

Initialization option for the data provider.

Public Functions

virtual bool hasKey(const CDPString &optionKey) const = 0

Checks if the option with the given key exists.

virtual cdp_double_t doubleValue(const CDPString &optionKey) const = 0

Gets the double value of the option with the given key.

virtual bool boolValue(const CDPString &optionKey) const = 0

Gets the bool value of the option with the given key.

virtual const CDPString &stringValue(const CDPString &optionKey) const = 0

Gets the string value of the option with the given key.

CDPLogHelper

class CDPLogHelper

Helper class to do bind to the raw log func provided by the host.

Public Types

typedef void (*RawLogFunc)(int level, const char *message)

The logger function provided by the CDP_FrameworkServices.

This is used to allow the plugin to log into whatever logging system the host app uses.

Public Functions

inline CDPLogHelper(RawLogFunc rawLogFunc)

Create a helper by providing the rawLogFunc (as provided in the CDP_FrameworkServices)

inline void logError(const std::string &message)

Log error message.

inline void logWarning(const std::string &message)

Log warning message.

inline void logInfo(const std::string &message)

Log info message.

inline void logDebug(const std::string &message)

Log debug message.

CDPMetaData

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

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.

CDPNodeGroup

class CDPNodeGroup

A group of nodes that is used by one or more element groups.

The node group consists of node coordinates (x,y,z) and an optional id per node.

Public Functions

virtual void setNodes(const cdp_double_t *nodeArr, cdp_size_t nodeCount) = 0

Sets the nodes in this group.

The nodes are specified with an array of interleaved 3d coordinates, so the array contains: <x0, y0, z0, x1, y1, z1, …>.

nodeCount is the number of nodes, so the array must be 3*nodeCount long.

virtual void setNodeIds(const cdp_int_t *nodeIdArr, cdp_size_t nodeCount) = 0

Specifies an optional id per node in this group.

Use this method to set the id of the nodes. nodeIdArr must be of size nodeCount and the nodeCount must match the number of nodes in the group.

virtual cdp_size_t groupIndex() const = 0

Returns the zero based index of this node group.

Use this to set the node index when adding element groups with CDPGeometry::addElementGroup

CDPResultInfo

class CDPResultInfo

A class to provide additional information about a result.

The main result information is provided when adding the result with CDPMetaData::addResultInfo().

Public Functions

virtual void setIdString(const CDPString &idString) = 0

Sets the idString of the result.

The Result ID String is a persistent identifier for the result, and will stay constant between versions of Envision. This identifier will be found in the idString property of the result metadata (cee::ug::ResultInfo::idString() or cee.ug.ResultInfo.idString

If blank (default) a unique idString will be produced by combining the name and result mapping.

Make sure this is unique for each result provided by this plugin.

virtual void setUnit(const CDPString &unit) = 0

Sets the unit of the result.

If set, the unit will appear as text in the result info in the host app.

virtual void setNature(CDPResultNature nature) = 0

Sets the result nature.

The following result nature are supported:

  • CDP_RESULT_NATURE_POSITION.
  • CDP_RESULT_NATURE_DISPLACEMENT.
  • CDP_RESULT_NATURE_EXTERNAL_APPLIED_FORCE.
  • CDP_RESULT_NATURE_REACTION_FORCE.
  • CDP_RESULT_NATURE_VELOCITY.
  • CDP_RESULT_NATURE_ACCELERATION.
  • CDP_RESULT_NATURE_HEAT_FLUX.
  • CDP_RESULT_NATURE_VOLTAGE.
  • CDP_RESULT_NATURE_DENSITY.
  • CDP_RESULT_NATURE_VISCOSITY.
  • CDP_RESULT_NATURE_THERMAL_CONDUCTIVITY.
  • CDP_RESULT_NATURE_MACH_NUMBER.
  • CDP_RESULT_NATURE_STREAM_FUNCTION.
  • CDP_RESULT_NATURE_ENTROPY.
  • CDP_RESULT_NATURE_MASS_FLUX.
  • CDP_RESULT_NATURE_TEMPERATURE.
  • CDP_RESULT_NATURE_FILM_COEFFICIENT.
  • CDP_RESULT_NATURE_CURRENT.
  • CDP_RESULT_NATURE_TOTAL_RESIDUAL_FORCE.
  • CDP_RESULT_NATURE_PRESSURE.
  • CDP_RESULT_NATURE_DAMPING_MATRIX.
  • CDP_RESULT_NATURE_ELECTRIC_POTENTIAL.
  • CDP_RESULT_NATURE_ELECTRIC_CHARGE.
  • CDP_RESULT_NATURE_MAGNETIC_POTENTIAL.
  • CDP_RESULT_NATURE_REACTION_CURRENT.
  • CDP_RESULT_NATURE_MASS_FLOW.
  • CDP_RESULT_NATURE_VOLUME.
  • CDP_RESULT_NATURE_VOLUME_FLUX.
  • CDP_RESULT_NATURE_UNKNOWN.
  • CDP_RESULT_NATURE_VELOCITY_DIVERGENCE.
  • CDP_RESULT_NATURE_STRAIN.
  • CDP_RESULT_NATURE_ROTARY_INERTIA.
  • CDP_RESULT_NATURE_DENSITY_GRADIENT.
  • CDP_RESULT_NATURE_MOMENTUM.
  • CDP_RESULT_NATURE_TIME.
  • CDP_RESULT_NATURE_STRESS.
  • CDP_RESULT_NATURE_IDENTIFIER.
  • CDP_RESULT_NATURE_VELOCITY_GRADIENT.
  • CDP_RESULT_NATURE_USER_SELECTED_VARIABLE.
  • CDP_RESULT_NATURE_ELEMENT_THICKNESS.
  • CDP_RESULT_NATURE_STIFFNESS.
  • CDP_RESULT_NATURE_REACTION_CHARGE.
  • CDP_RESULT_NATURE_SCALARS.
  • CDP_RESULT_NATURE_HEAT_GRADIENT.
  • CDP_RESULT_NATURE_THERMAL_ENERGY_ERROR.
  • CDP_RESULT_NATURE_EXTERNAL_APPLIED_CHARGE.
  • CDP_RESULT_NATURE_ENERGY_DENSITY.
  • CDP_RESULT_NATURE_SOLUTION_DEPENDENT_VARIABLE.
  • CDP_RESULT_NATURE_VIEW_FACTOR.
  • CDP_RESULT_NATURE_DAMPIMP.
  • CDP_RESULT_NATURE_FREQUENCY.
  • CDP_RESULT_NATURE_STRAIN_ENERGY_DENSITY.
  • CDP_RESULT_NATURE_STIFFNESS_MATRIX.
  • CDP_RESULT_NATURE_MASS_MATRIX.
  • CDP_RESULT_NATURE_LOAD_VECTOR.
  • CDP_RESULT_NATURE_ORDER.
  • CDP_RESULT_NATURE_AREA.
  • CDP_RESULT_NATURE_LENGTH.
  • CDP_RESULT_NATURE_RADIUS.
  • CDP_RESULT_NATURE_NUMBER.
  • CDP_RESULT_NATURE_KINETIC_ENERGY_DENSITY.
  • CDP_RESULT_NATURE_DAMAGE.
  • CDP_RESULT_NATURE_DISTTANCE.
  • CDP_RESULT_NATURE_TEMPERATURE_DOT.
  • CDP_RESULT_NATURE_THERMAL_ENERGY.
  • CDP_RESULT_NATURE_THERMAL_CONDUCTIVITY_MATRIX.
  • CDP_RESULT_NATURE_CAPACITANCE_MATRIX.
  • CDP_RESULT_NATURE_FAILURE_INDEX.
  • CDP_RESULT_NATURE_VOID_RATIO.
  • CDP_RESULT_NATURE_TEMPERATURE_GRADIENT.
  • CDP_RESULT_NATURE_PRESSURE_COEFFICIENT.
  • CDP_RESULT_NATURE_LOAD_FACTOR.
  • CDP_RESULT_NATURE_PRESSURE_GRADIENT.
  • CDP_RESULT_NATURE_PRESSURE_DOT.
  • CDP_RESULT_NATURE_PRESSURE_DOTDOT.
  • CDP_RESULT_NATURE_MASS.
  • CDP_RESULT_NATURE_HEAT_GENERATED.
  • CDP_RESULT_NATURE_CRACK_DENSITY.
  • CDP_RESULT_NATURE_ELECTRIC_FIELD.
  • CDP_RESULT_NATURE_ELECTRIC_FLUX.
  • CDP_RESULT_NATURE_REACTION_HEAT_FLOW.
  • CDP_RESULT_NATURE_MAGNETIC_FLUX.
  • CDP_RESULT_NATURE_MAGNETIC_FIELD.
  • CDP_RESULT_NATURE_CURRENT_DENSITY.
  • CDP_RESULT_NATURE_TURBULENT_KENETIC_ENERGY.
  • CDP_RESULT_NATURE_TURBULENT_DISSIPATION_RATE.
  • CDP_RESULT_NATURE_CONCENTRATION.
  • CDP_RESULT_NATURE_ENTHALPY.
  • CDP_RESULT_NATURE_SPECIFIC_HEAT.
  • CDP_RESULT_NATURE_POROSITY.
  • CDP_RESULT_NATURE_ENTHALPY_RATE.
  • CDP_RESULT_NATURE_FACTOR.
  • CDP_RESULT_NATURE_HEAT_FLOW.
  • CDP_RESULT_NATURE_STRESS_AND_MOMENT_RESULTANT.
  • CDP_RESULT_NATURE_STRAIN_AND_CURVATURE.
  • CDP_RESULT_NATURE_WEIGHT.
  • CDP_RESULT_NATURE_KINETIC_ENERGY.
  • CDP_RESULT_NATURE_STRAIN_ENERGY.
  • CDP_RESULT_NATURE_DIRECTION_VECTOR.
  • CDP_RESULT_NATURE_ENERGY.
  • CDP_RESULT_NATURE_SEPARATION.
  • CDP_RESULT_NATURE_CLOSURE.
  • CDP_RESULT_NATURE_STATE.
  • CDP_RESULT_NATURE_STATUS.
  • CDP_RESULT_NATURE_REACTION_MASS_FLOW.
  • CDP_RESULT_NATURE_EXTERNAL_APPLIED_MASS_FLOW.
  • CDP_RESULT_NATURE_STRAIN_RATE.
  • CDP_RESULT_NATURE_STRAIN_ENERGY_ERROR.
  • CDP_RESULT_NATURE_EXTERNAL_APPLIED_HEAT_FLOW.
  • CDP_RESULT_NATURE_DIRECTION_COSINE_MATRIX.
  • CDP_RESULT_NATURE_ELEMENT_FORCE.
  • CDP_RESULT_NATURE_ELEMENT_DISPLACEMENT.
  • CDP_RESULT_NATURE_Y_PLUS.
  • CDP_RESULT_NATURE_U_TAU.
  • CDP_RESULT_NATURE_STRAIN_ENERGY_PERCENT.
  • CDP_RESULT_NATURE_KINETIC_ENERGY_PERCENT.
  • CDP_RESULT_NATURE_DOMINANT_FLUID_PHASE.
  • CDP_RESULT_NATURE_SOUND_MODEL.
  • CDP_RESULT_NATURE_PENETRATION_CONTACT.
  • CDP_RESULT_NATURE_SAFETY_FACTOR.
  • CDP_RESULT_NATURE_FATIGUE_DAMAGE.
  • CDP_RESULT_NATURE_FATIGUE_DAMAGE_DIRECTION.
  • CDP_RESULT_NATURE_FATIGUE_LIFE.
  • CDP_RESULT_NATURE_GAP.
  • CDP_RESULT_NATURE_ELEMENT_NODAL_FORCE.
  • CDP_RESULT_NATURE_ELEMENT_NODAL_FLUX.
  • CDP_RESULT_NATURE_STRENGTH_SAFETY_FACTOR.
  • CDP_RESULT_NATURE_FATIGUE_SAFETY_FACT.
  • CDP_RESULT_NATURE_PHASE_DIAMETER.
  • CDP_RESULT_NATURE_LAMINAR_VISCOSITY.
  • CDP_RESULT_NATURE_TURBULENT_VISCOSITY.
  • CDP_RESULT_NATURE_BODY_FORCE.
  • CDP_RESULT_NATURE_WALL_SHEAR.
  • CDP_RESULT_NATURE_VORTICITY.
  • CDP_RESULT_NATURE_REACTION_PROGRESS.
  • CDP_RESULT_NATURE_SOUND_LEVEL.
  • CDP_RESULT_NATURE_ROTATION_ANGLE_VECTOR.
  • CDP_RESULT_NATURE_VOLUME_OF_FLUID.
  • CDP_RESULT_NATURE_EDDY_VISCOSITY.
  • CDP_RESULT_NATURE_ROUGHNESS.
  • CDP_RESULT_NATURE_FRACTION.
  • CDP_RESULT_NATURE_CONVECTION_COEFFICIENT.
  • CDP_RESULT_NATURE_POWER.
  • CDP_RESULT_NATURE_INTENSITY.
  • CDP_RESULT_NATURE_TRACTION.
  • CDP_RESULT_NATURE_EXTERNAL_APPLIED_CURRENT.
  • CDP_RESULT_NATURE_PRANDTL_NUMBER.
  • CDP_RESULT_NATURE_TURBULENT_DISTANCE.
  • CDP_RESULT_NATURE_REYNOLDS_NUMBER.
  • CDP_RESULT_NATURE_RADIANCE.
  • CDP_RESULT_NATURE_FLUENCE.
  • CDP_RESULT_NATURE_RC_PRODUCT.
  • CDP_RESULT_NATURE_POWER_DENSITY.
  • CDP_RESULT_NATURE_WATER_ACCUMULATION.
  • CDP_RESULT_NATURE_TURBULENT_SPECIFIC_DISSIPATION.
  • CDP_RESULT_NATURE_THERMAL_ENERGY_DENSITY.
  • CDP_RESULT_NATURE_STRENGTH_RATIO.
  • CDP_RESULT_NATURE_DELETED_ENTITIES.
  • CDP_RESULT_NATURE_MARGIN_OF_SAFETY.
  • CDP_RESULT_NATURE_MOMENT.
  • CDP_RESULT_NATURE_ROTATION.
  • CDP_RESULT_NATURE_TRANSLATION.
  • CDP_RESULT_NATURE_FORCE.
  • CDP_RESULT_NATURE_DECIBEL.
  • CDP_RESULT_NATURE_PROBABILITY.
  • CDP_RESULT_NATURE_FORCE_MOMENT.
  • CDP_RESULT_NATURE_YOUNGS_MODULUS.
  • CDP_RESULT_NATURE_POISSONS_RATIO.
  • CDP_RESULT_NATURE_SHEAR_MODULUS.
  • CDP_RESULT_NATURE_THERMAL_EXPANSION_COEFFICIENT.
  • CDP_RESULT_NATURE_CHEMICAL_SHRINKAGE.
  • CDP_RESULT_NATURE_CONVERSION_TIME.
  • CDP_RESULT_NATURE_CONVERSION_STATUS.
  • CDP_RESULT_NATURE_MODAL_EFFECTIVE_MASS_SUMMARY.
  • CDP_RESULT_NATURE_MODAL_EFFECTIVE_MASS.
  • CDP_RESULT_NATURE_MODAL_PARTICIPATION_FACTOR.
  • CDP_RESULT_NATURE_MODAL_EFFECTIVE_MASS_FRACTION.

virtual void setAssociatedStateId(cdp_int_t associatedStateId) = 0

Specifies the stateId with which the result is associated.

If this associated stateId is not set, then the results are associated with all the states.

virtual void setDisplacementsContainAbsoluteNodePositions(bool containsAbsoluteNodePositions) = 0

Specifies if the displacement result is absolute or relative displacements.

If this is set to true, the provided displacements are absolute node position (new coordinates). If set to false (default), the displacements are relative displacements offsetting the node coordinate in the geometry.

virtual void setCreateDerivedResults(bool createDerivedResults) = 0

Specifies if the result (e.g.

vector or tensor) should also produce derived results or not (default is true)

Derived results are scalars produced from vectors (x,y,z,magnitude) and vectors and scalars produced by tensors (XX stress, vonMises, 1st principal, etc)

Call setCreateDerivedResults(false) to disable this feature and only add the native result to the host meta data.

Since
3.1

CDPResultSpec

class CDPResultSpec

An identifier of a result.

Public Functions

virtual cdp_size_t geometryIndex() const = 0

Return the zero based index of the geometry to get results for.

For the normal case of only one geometry, this will be 0.

virtual cdp_int_t resultId() const = 0

Returns the id of the result to get.

This will always be one of the results provided in the meta data with CDPMetaData::addResultInfo

virtual cdp_int_t stateId() const = 0

Returns the id of the state to get results for.

This will always be one of the states provided in the meta data with CDPMetaData::addStateInfo

CDPResultValueGroup

class CDPResultValueGroup

The results for either a node or element group.

For per node results, these are results for a corresponding node group.

For per element, per element node or per element surface results, these are results for a corresponding element group.

Public Functions

virtual void setResults(const cdp_double_t *resultValueArr, cdp_size_t valueDimension, cdp_size_t valueCount) = 0

Sets the results for this group.

Use this method to specify the results for the node/element group.

The size of resultValueArr is valueDimension * valueCount.

For per node (CDP_PER_NODE) results, you must specify one value (1 or more components per value depending on the dimension of the result) for each node in the associated node group.

For per element (CDP_PER_ELEMENT), element node (CDP_PER_ELEMENT_NODE) or element surface results (CDP_PER_ELEMENT_SURFACE), you must specify one value (1 or more components per value depending on the dimension of the result) for each element, element node or element surface in the associated element group.

CDPResult

class CDPResult

The result for a given geometry in a given state.

This class contains an array of groups. The groups are matched with the corresponding node group (for per node results) or element group (for per element, per element node or per element surface results).

The matching is done by index, so the result must have as many groups as there are element/node groups in the corresponding geometry.

Public Functions

virtual CDPResultValueGroup *addGroup() = 0

Adds a result value group to this result.

Use this method to add the group, and populate the results for the group in the returned CDPResultValueGroup object.

CDPSet

class CDPSet

This class defines the items of a set.

A set item is specified by:

  • geometry index
  • group index
  • item index
  • (optional) state id (for adaptive geometries)

If you are using adaptive geometries, you should use the addAdaptiveGeometryItem or addAdaptiveGeometryItems methods to add items to the set.

Note

Currently, only element sets are supported

Public Functions

virtual void addItem(cdp_size_t geometryIndex, cdp_size_t groupIndex, cdp_int_t itemIndex) = 0

Adds an item with the given geometry index, group index and item index to the set.

As only element sets are currently supported, item index is element index.

Note

Only use this method if you are referring to a non-adaptive geometry.

virtual void addItems(cdp_size_t geometryIndex, cdp_size_t groupIndex, const cdp_int_t *itemIndexArr, cdp_size_t itemCount) = 0

Adds items with the given geometry index, group index and item indices to the set.

This is useful for adding many items (elements) to the set from a given element group.

Note

Only use this method if you are referring to a non-adaptive geometry.

virtual void addAdaptiveGeometryItem(cdp_int_t stateId, cdp_size_t geometryIndex, cdp_size_t groupIndex, cdp_int_t itemIndex) = 0

Adds an item with the given state id, geometry index, group index and item index to the set.

As only element sets are currently supported, item index is element index.

Note

Only use this method if you are referring to an adaptive geometry.

virtual void addAdaptiveGeometryItems(cdp_int_t stateId, cdp_size_t geometryIndex, cdp_size_t groupIndex, const cdp_int_t *itemIndexArr, cdp_size_t itemCount) = 0

Adds items with the given state id, geometry index, group index and item indices to the set.

This is useful for adding many items (elements) to the set from a given element group.

Note

Only use this method if you are referring to an adaptive geometry.

CDPStateInfo

class CDPStateInfo

A class to provide additional information about a state.

The main state information is provided when adding the state with CDPMetaData::addStateInfo().

Public Functions

virtual void setParentStateGroupingId(cdp_int_t groupId) = 0

Specifies the state group this state belongs to.

If using state groups, use this method to specify the group id of the parent group of this state The id must refer to an existing group.

State groups are useful for e.g. Load Cases

CDPString

class CDPString

A simple class for handling strings.

CDP uses UTF-8 based strings. This class stores strings in UTF-8 format, and provides creation from ASCII char and UTF-8 strings.

Public Functions

inline CDPString()

Constructor.

inline CDPString(const CDPString &other)

Copy constructor.

inline ~CDPString()

Destructor.

inline CDPString &operator=(const CDPString &rhs)

Assignment operator.

inline const cdp_char_t *utf8() const

Returns a const ptr to the UTF-8 formatted string.

inline cdp_size_t byteCount() const

Returns the number of bytes (length) of the string.

Public Static Functions

static inline CDPString fromUtf8(const cdp_char_t *utf8Ptr)

Returns a string created from a UTF-8 array.

static inline CDPString fromChar(const cdp_char_t *charPtr)

Returns a string created from a ASCII (char) string.

Any ASCII value above 127 will be encoded to UTF-8

static inline const CDPString &emptyString()

Returns blank string.

CDPTransformations

class CDPTransformations

The rigid body transformation result for a given geometry in a given state.

You need to add one transformation matrix for each element group in the corresponding geometry. For parts without transformations, add an identity matrix.

The matching is done by index, so the result must have as many groups as there are element/node groups in the corresponding geometry.

Public Functions

virtual void addGroupTransformation(const cdp_double_t *groupTransformationMatrix) = 0

Adds a transformation matrix to the result.

groupTransformationMatrix should be an array with 16 elements specifying the 4*4 transformation matrix for the corresponding element group.

The matrix must be specified in column, then row order:

| v0  v4  v8  v12 |
| v1  v5  v9  v13 |
| v2  v6  v10 v14 |
| v3  v7  v11 v15 |

CDPUtils

class CDPUtils

CDP utilities.

Public Static Functions

static inline std::string compilerInfoString()

Returns a string identifying the current compiler.

template<typename T>
static std::string toStdString(const T &value)

Convert the given value to a std::string.

CDPVec3

class CDPVec3

A simple helper class for 3D vectors.

Public Functions

inline CDPVec3()

Default constructor.

inline CDPVec3(const CDPVec3 &other)

Copy constructor.

inline CDPVec3(double x, double y, double z)

Construction from x, y, z coordinates.

inline CDPVec3 &operator=(const CDPVec3 &rhs)

Assignment operator.

inline const CDPVec3 operator+(const CDPVec3 &rhs) const

Returns vector that is this vector added with rhs.

inline const CDPVec3 operator-(const CDPVec3 &rhs) const

Returns vector that is this vector subtracted with rhs.

inline double operator*(const CDPVec3 &rhs) const

Computes the dot product of this and rhs and return the result.

inline const CDPVec3 operator^(const CDPVec3 &rhs) const

Computes the cross product of this and rhs and return the result.

inline const double &x() const

X element of the vector.

inline const double &y() const

Y element of the vector.

inline const double &z() const

Z element of the vector.

inline double &x()

X element of the vector.

inline double &y()

Y element of the vector.

inline double &z()

Z element of the vector.

inline void set(double x, double y, double z)

Sets x, y and z value.

CDPVisibilityResultValueGroup

class CDPVisibilityResultValueGroup

Per element visibility result (boolean result).

Public Functions

virtual void setResults(const cdp_ubyte_t *resultValueArr, cdp_size_t valueCount) = 0

Sets the results for this group.

Use this method to specify the results for the element group.

You must specify one boolean value (true = visible, false = invisible) for each element in the associated element group.

CDPVisibilityResult

class CDPVisibilityResult

The visibility result for a given geometry in a given state.

This class contains an array of groups. The groups are matched with the corresponding element group.

The matching is done by index, so the result must have as many groups as there are element groups in the corresponding geometry.

Public Functions

virtual CDPVisibilityResultValueGroup *addGroup() = 0

Adds a visibility result value group to this result.

Use this method to add the group, and populate the results for the group in the returned CDPVisibilityResultValueGroup object.