# IRfEditableMeshSet Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | GetMaximalNeighborhood (IRsNode *pNode, IRsNode *pMeshModifier, RtUlong *pdwMaxNeighborhood)
HRESULT | ComputeOutputMesh ([in]IRsNode *pNode,[in]IRsNode *pMeshModifier,[in]IRdMeshSelection *pSelection,[in]IRdMesh *pMeshIn,[out, retval] IRdMesh **pMeshOut)
HRESULT | InjectSelectionStreams ([in]IRdMeshSelection *pSelection,[in, out]IRdMesh *pMesh)
HRESULT | GetEditableMesh ([in] IRsNode *pEncaps,[out, retval] IRsNode **ppEditableMeshNode)
HRESULT | ConvertToEditableMesh ([in] IRsNode *pEncaps,[out, retval] IRsNode **ppEditableMeshNode)
HRESULT | CheckProceduralMesh (IRsNode *pNode)
HRESULT | GetMeshControlNode ([in] IRsNode *pStartNode,[out, retval] IRsNode **ppMeshSource)
HRESULT | RemoveSelectionStreams ([in, out]IRdMesh *pMesh)

## Detailed Description

Helper function set for managing editable meshes.

## Member Function Documentation

HRESULT IRfEditableMeshSet::GetMaximalNeighborhood | ( | IRsNode * | pNode,
|  | IRsNode * | pMeshModifier,
|  | RtUlong * | pdwMaxNeighborhood |
| ) |  |  |

Calculate maximum neighborhood required to calculate correct mesh positions around a face.

Parameters:

  | pNode | [in] Defines outer encapsulator for mesh pipeline.
  | pMeshModifier | [out] Points to node that defines IRsEditableMesh interface.

HRESULT IRfEditableMeshSet::ComputeOutputMesh | ( | [in] IRsNode * | pNode,
|  | [in] IRsNode * | pMeshModifier,
|  | [in] IRdMeshSelection * | pSelection,
|  | [in] IRdMesh * | pMeshIn,
|  | [out, retval] IRdMesh ** | pMeshOut |
| ) |  |  |

Apply transformation defined by mesh pipeline to the mesh.

Parameters:

  | pNode | [in] Defines encapsulator that contains mesh modifier pipeline.
  | pMeshModifier | [in] Node that defines IRsEditableMesh interface.
  | pSelection | [in] Defines selection to transform. If selection is not NULL, mesh is cloned before it is passed through the pipeline.
  | pMeshIn | [in] Input mesh to convert.

Returns:
  ppmeshOut [out,retval] Calculated mesh.

  Standard HRESULT processing can be applied.

HRESULT IRfEditableMeshSet::InjectSelectionStreams | ( | [in] IRdMeshSelection * | pSelection,
|  | [in, out] IRdMesh * | pMesh |
| ) |  |  |

Inject selection streams to the mesh.

Parameters:

  | pSelection | [in] Defines Selection to inject to the mesh.
  | pMesh | [in,out] Defines mesh to modify.

Returns:
  Standard HRESULT processing can be applied.

HRESULT IRfEditableMeshSet::GetEditableMesh | ( | [in] IRsNode * | pEncaps,
|  | [out, retval] IRsNode ** | ppEditableMeshNode |
| ) |  |  |

Get editable mesh node (if found) for specified mesh node. Return NULL if not an editable mesh.

Parameters:

  | pEncaps | [in] Node that contains CON_MESH connector.

Returns:
  ppEditableMeshNode [out,retval] Editable mesh interface.

  E_FAIL if mesh pipeline is corrupted, S_FALSE if mesh not editable, S_OK if succeeded.

HRESULT IRfEditableMeshSet::ConvertToEditableMesh | ( | [in] IRsNode * | pEncaps,
|  | [out, retval] IRsNode ** | ppEditableMeshNode |
| ) |  |  |

Convert node to editable mesh node (if not already editable).

Parameters:

  | pEncaps | [in] Node that contains CON_MESH connector.

Returns:
  ppEditableMeshNode [out,retval] Editable mesh interface.

  S_OK if succeeded, S_FALSE if already editable, E_FAIL on error (user refuses conversion).

HRESULT IRfEditableMeshSet::CheckProceduralMesh | ( | IRsNode * | pNode | ) |

Check if any meshes within encapsulator is procedural and requires conversion warning and user approval for changing to editable.

Parameters:

  | pNode | [in] Node that contains CON_MESH connector.

Returns:
  S_OK if mesh is procedural, S_FALSE if editable, E_FAIL on error.

HRESULT IRfEditableMeshSet::GetMeshControlNode | ( | [in] IRsNode * | pStartNode,
|  | [out, retval] IRsNode ** | ppMeshSource |
| ) |  |  |

Get node with control mesh for specified pipeline node.

- Return NULL if no control mesh can be tracked.

Parameters:

  | pStartNode | [in] Node that contains CON_MESH connector.

Returns:
  ppMeshSource [out,retval] Mesh pipeline starting modifier/container.

  E_FAIL if mesh pipeline is corrupted, S_FALSE if mesh not editable, S_OK if succeeded.

HRESULT IRfEditableMeshSet::RemoveSelectionStreams | ( | [in, out] IRdMesh * | pMesh | ) |

Remove selection streams from mesh.

Parameters:

  | pMesh | [in,out] Defines mesh to modify.

Returns:
  Standard HRESULT processing can be applied.