# IRsWidgetVisualizationCtrl Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | GetRenderAttributes ([in] GUID *pWidgetState,[out, retval]IRsDataObject **ppRenderAttributes)
HRESULT | GetMesh ([in] GUID *pWidgetState,[out, retval]IRdMesh **ppMesh)
HRESULT | GetMaterial ([in] GUID *pWidgetState,[out, retval]IRsDataObject **ppMaterial)
HRESULT | GetTransform ([in] GUID *pWidgetState,[out, retval] IRdMatrixf **ppTransform)
HRESULT | GetTransformNode ([in] GUID *pWidgetState,[out, retval]IRsBaseNode **ppTransformNode)
HRESULT | SetShapeRaycastParameters ([in]RtFloat fDistance,[in] RtUlong dwObjectId,[in] RtPoint *pptNearestPt)
HRESULT | GetResourcesTimestamp ([in] GUID *pWidgetState,[out] RtUlong *puMeshTimestamp,[out] RtUlong *puMaterialTimestamp,[out] RtUlong *puRenderAttribsTimestamp)

## Detailed Description

IRsWidgetVisualizationCtrl specifies base interface for widget visualisation nodes.

- Because the resources are required also outside read/write threads (during rendering) calls must be thread safe.
- Implemnetations can be sure, that they will NOT be released during procedure calls.

## Member Function Documentation

HRESULT IRsWidgetVisualizationCtrl::GetRenderAttributes | ( | [in] GUID * | pWidgetState,
|  | [out, retval] IRsDataObject ** | ppRenderAttributes |
| ) |  |  |

Return render attributes for selected state.

Parameters:

  | pWidgetState | [in] Widget state ID.

Returns:
  ppRenderAttributes [out,retval] Render attributes data object.

  standard HRESULT processing can be applied to returned value.

HRESULT IRsWidgetVisualizationCtrl::GetMesh | ( | [in] GUID * | pWidgetState,
|  | [out, retval] IRdMesh ** | ppMesh |
| ) |  |  |

Return mesh for selected state.

Parameters:

  | pWidgetState | [in] Widget state ID.

Returns:
  ppMesh [out,retval] Mesh data object.

  standard HRESULT processing can be applied to returned value.

HRESULT IRsWidgetVisualizationCtrl::GetMaterial | ( | [in] GUID * | pWidgetState,
|  | [out, retval] IRsDataObject ** | ppMaterial |
| ) |  |  |

Return material for selected state.

Parameters:

  | pWidgetState | [in] Widget state ID.

Returns:
  ppMaterial [out,retval] Material data object.

  standard HRESULT processing can be applied to returned value.

HRESULT IRsWidgetVisualizationCtrl::GetTransform | ( | [in] GUID * | pWidgetState,
|  | [out, retval] IRdMatrixf ** | ppTransform |
| ) |  |  |

Return transformation matrix for selected state.

Parameters:

  | pWidgetState | [in] Widget state ID.

Returns:
  ppTransform [out,retval] Transformation matrix.

  standard HRESULT processing can be applied to returned value.

HRESULT IRsWidgetVisualizationCtrl::GetTransformNode | ( | [in] GUID * | pWidgetState,
|  | [out, retval] IRsBaseNode ** | ppTransformNode |
| ) |  |  |

Return transformation node for selected state.

Parameters:

  | pWidgetState | [in] Widget state ID.

Returns:
  ppTransformNode [out,retval] Transformation node (node with transform mnatrix connectors which may be required by some tools).

  standard HRESULT processing can be applied to returned value.

HRESULT IRsWidgetVisualizationCtrl::SetShapeRaycastParameters | ( | [in] RtFloat | fDistance,
|  | [in] RtUlong | dwObjectId,
|  | [in] RtPoint * | pptNearestPt |
| ) |  |  |

Callback method to set onscreen distance between cursor and widget mesh

Parameters:

  | fDistance | [in] Distance.
  | dwObjectId | [in] Sub-Object ID.
  | pptNearestPt | [in] .

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRsWidgetVisualizationCtrl::GetResourcesTimestamp | ( | [in] GUID * | pWidgetState,
|  | [out] RtUlong * | puMeshTimestamp,
|  | [out] RtUlong * | puMaterialTimestamp,
|  | [out] RtUlong * | puRenderAttribsTimestamp |
| ) |  |  |

Return timestamps for specified widget state.

- Values are used for optimization and should start from 0.
- After resource changes, value should increment.

Parameters:

  | pWidgetState | [in] Widget state ID.
  | puMeshTimestamp | [out] Mesh timestamp.
  | puMaterialTimestamp | [out] Material timestamp.
  | puRenderAttribsTimestamp | [out] Render attributes timestamp.

Returns:
  standard HRESULT processing can be applied to returned value.