# IRdWidgetVisualization Interface Reference

Inherits IRsObject.

List of all members.

## Public Member Functions
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 | SetWidgetVisualization ([in] IRsWidgetVisualizationCtrl *pWidgetVis)
HRESULT | GetRenderAttributes ([in] GUID *pWidgetState,[out, retval]IRsDataObject **ppRenderAttributes)
HRESULT | SetShapeRaycastParameters ([in] RtFloat fDistance,[in] RtUlong dwObjectIndex,[in] RtPoint *pptNearestPt)
HRESULT | GetResourcesTimestamp ([in] GUID *pWidgetState,[out] RtUlong *puMeshTimestamp,[out] RtUlong *puMaterialTimestamp,[out] RtUlong *puRenderAttribsTimestamp)

## Detailed Description

Widget visualisation position data object is used to specify visual representation of the widget.

- But because these resources need to be accessible during rendering of widgets (not just read threads), its evaluation must be done out of kernel.
- Callback mechanism is used to perform the task.

## Member Function Documentation

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

Return mesh according to widget state.

- Evaluation is not cached.
- This method can be called from any thread.
- Caller must take care that object is not destroyed before return.

Parameters:

  | pWidgetState | [in] Specifies widget state

Returns:
  ppMesh [out,retval] Returned mesh for selected state.

  standard HRESULT processing can be applied to returned value.

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

Return material according to widget state.

- Evaluation is not cached.
- This method can be called from any thread.
- Caller must take care that object is not destroyed before return.

Parameters:

  | pWidgetState | [in] Specifies widget state.

Returns:
  ppMaterial [out,retval] Returned material for selected state.

  standard HRESULT processing can be applied to returned value.

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

Return transform matrix according to widget state.

- Evaluation is not cached.
- This method can be called from any thread.
- Caller must take care that object is not destroyed before return.

Parameters:

  | pWidgetState | [in] Specifies widget state.

Returns:
  ppTransform [out,retval] Returned transform matrix for selected state.

  standard HRESULT processing can be applied to returned value

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

Return transform node according to widget state.

- Evaluation is not cached.
- This method can be called from any thread.
- Caller must take care that object is not destroyed before return.

Parameters:

  | pWidgetState | [in] Specifies widget state.

Returns:
  ppTransformNode [out,retval] Returned transform node for selected state.

  standard HRESULT processing can be applied to returned value.

HRESULT IRdWidgetVisualization::SetWidgetVisualization | ( | [in] IRsWidgetVisualizationCtrl * | pWidgetVis | ) |

Set widget visualization node.

Parameters:

  | pWidgetVis | [in] Widget visualization object to set.

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

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

Return render attributes according to widget state.

- Evaluation is not cached.
- This method can be called from any thread.
- Caller must take care that object is not destroyed before return.

Parameters:

  | pWidgetState | [in] Specifies widget state.

Returns:
  ppRenderAttributes [out,retval] Returned render attributes data object for selected state.

  standard HRESULT processing can be applied to returned value.

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

Call to set shape raycast parameters.

- Set must be called from master thread.

Parameters:

  | fDistance | [in] Distance to set to visualization node.
  | dwTriangleIndex | [in] Triangle index for procedural shapes.
  | dwObjectIndex | [in] Object index for procedural shapes.

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

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

Return resources timestamps according to widget state.

- Timestamps start at 0 and are incremented each time when they are changed.
- This method can be called from any thread.
- Caller must take care that object is not destroyed before return.

Parameters:

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

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