# IRdMeshSelection Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | ClearSelection ()
HRESULT | SelectVertex ([in]RtUlong uVertexIndex,[in] RtFloat fWeight)
HRESULT | DeselectVertex ([in]RtUlong uVertexIndex)
HRESULT | AddVertex ([in]RtUlong uVertexIndex)
HRESULT | GetNumSelectedVertices ([out, retval]RtUlong *pCount)
HRESULT | GetSelectedVertex ([in] RtUlong uIndex,[out]RtVertexSelection *pSel)
HRESULT | DeselectVertices ()
HRESULT | SelectEdge ([in]RtUlong uTriangleIndex,[in] RtUlong uEdgeIndex)
HRESULT | DeselectEdge ([in]RtUlong uTriangleIndex,[in] RtUlong uEdgeIndex)
HRESULT | GetNumSelectedEdges ([out, retval]RtUlong *pCount)
HRESULT | GetSelectedEdge ([in] RtUlong uIndex,[out]RtEdgeSelection *pSel)
HRESULT | DeselectEdges ()
HRESULT | SelectTriangle ([in]RtUlong uTriangleIndex)
HRESULT | DeselectTriangle ([in]RtUlong uTriangleIndex)
HRESULT | GetNumSelectedTriangles ([out, retval]RtUlong *pCount)
HRESULT | GetSelectedTriangle ([in] RtUlong uIndex,[out]RtTriangleSelection *pSel)
HRESULT | DeselectTriangles ()
HRESULT | SelectFaceTriangle ([in]RtUlong uTriangleIndex)
HRESULT | DeselectFaceTriangle ([in]RtUlong uTriangleIndex)
HRESULT | GetNumSelectedFaceTriangles ([out, retval]RtUlong *pCount)
HRESULT | GetSelectedFaceTriangle ([in] RtUlong uIndex,[out]RtFaceTriangleSelection *pSel)
HRESULT | DeselectFaceTriangles ()
HRESULT | ToggleSelection ([in] IRdMeshSelection *pSelection)
HRESULT | AddSelection ([in] IRdMeshSelection *pSelection)
HRESULT | UpdateContextSelection ([in] IRdMeshSelection *pSelection)
HRESULT | FilterContextSelection ([in] IRdMeshSelection *pSelection)
HRESULT | RemoveSelection ([in] IRdMeshSelection *pSelection)
HRESULT | SelectionsEqual ([in] IRdMeshSelection *pSelection)
HRESULT | TranslateToInput ([in] IRdMesh *pInputMesh,[in] IRdMesh *pOutputMesh)
HRESULT | ExtendSelection ([in] IRdMesh *pInputMesh,[in] IRdMesh *pOutputMesh)
HRESULT | TranslateToOutput ([in] IRdMesh *pInputMesh,[in] IRdMesh *pOutputMesh)
HRESULT | Sort ()
HRESULT | FillEdges (IRdMesh *pMesh)

## Detailed Description

IRdMeshSelection data object holds information about object's selected elements, during point edit.

## Member Function Documentation

HRESULT IRdMeshSelection::ClearSelection | ( |  | ) |

Clear selection object.

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

HRESULT IRdMeshSelection::SelectVertex | ( | [in] RtUlong | uVertexIndex,
|  | [in] RtFloat | fWeight |
| ) |  |  |

Use to add vertex to selection with specified weight.

Parameters:

  | uVertexIndex | [in] Vertex to select.
  | fWeight | [in] Vertex selection weight.

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

HRESULT IRdMeshSelection::DeselectVertex | ( | [in] RtUlong | uVertexIndex | ) |

Remove vertex from selection.

Parameters:

  | uVertexIndex | [in] Vertex to de-select.

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

HRESULT IRdMeshSelection::AddVertex | ( | [in] RtUlong | uVertexIndex | ) |

Add vertex to selection. Selection weight is set to 1.

Parameters:

  | uVertexIndex | [in] Vertex to select.

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

HRESULT IRdMeshSelection::GetNumSelectedVertices | ( | [out, retval] RtUlong * | pCount | ) |

Return number of selected vertices.

Returns:
  pCount [out, retval] Number of selected vertices.

  standard HRESULT processing can be applied to returned value.

HRESULT IRdMeshSelection::GetSelectedVertex | ( | [in] RtUlong | uIndex,
|  | [out] RtVertexSelection * | pSel |
| ) |  |  |

Get selected vertex by index.

Parameters:

  | uIndex | [in] Selected vertex index.
  | pSel | [out] Vertex selection structure.

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

HRESULT IRdMeshSelection::DeselectVertices | ( |  | ) |

De-select all vertices.

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

HRESULT IRdMeshSelection::SelectEdge | ( | [in] RtUlong | uTriangleIndex,
|  | [in] RtUlong | uEdgeIndex |
| ) |  |  |

Add edge to selection. Edge weight is set to 1.

Parameters:

  | uTriangleIndex | triangle index.
  | uEdgeIndex | edge index. 0=edge 1,2 1=edge 2,3 2 = edge 3,1

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

HRESULT IRdMeshSelection::DeselectEdge | ( | [in] RtUlong | uTriangleIndex,
|  | [in] RtUlong | uEdgeIndex |
| ) |  |  |

Remove edge from selection

Parameters:

  | uTriangleIndex | Triangle index
  | uEdgeIndex | Edge index

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::GetNumSelectedEdges | ( | [out, retval] RtUlong * | pCount | ) |

Return number of selected edges

Parameters:

  | pCount | Number of selected edges

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::GetSelectedEdge | ( | [in] RtUlong | uIndex,
|  | [out] RtEdgeSelection * | pSel |
| ) |  |  |

Return selected edge

Parameters:

  | uIndex | Selected edge index
  | pSel | Selected edge structure

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::DeselectEdges | ( |  | ) |

De-select all edges

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::SelectTriangle | ( | [in] RtUlong | uTriangleIndex | ) |

Add triangle to selection.

Parameters:

  | uTriangleIndex | triangle to select
  | fWeight | triangle weight

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::DeselectTriangle | ( | [in] RtUlong | uTriangleIndex | ) |

De-select triangle.

Parameters:

  | uTriangleIndex | triangle to de-select

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::GetNumSelectedTriangles | ( | [out, retval] RtUlong * | pCount | ) |

Return number of selected triangles

Parameters:

  | pCount | triangle count

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::GetSelectedTriangle | ( | [in] RtUlong | uIndex,
|  | [out] RtTriangleSelection * | pSel |
| ) |  |  |

Get selected triangle

Parameters:

  | uTriangleIndex | selected triangle index
  | pSel | Triangle selection structure

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::DeselectTriangles | ( |  | ) |

De-select all triangles

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::SelectFaceTriangle | ( | [in] RtUlong | uTriangleIndex | ) |

Add triangle to selection.

Parameters:

  | uTriangleIndex | triangle to select

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::DeselectFaceTriangle | ( | [in] RtUlong | uTriangleIndex | ) |

Remove face triangle from selection

Parameters:

  | uTriangleIndex | face triangle index

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::GetNumSelectedFaceTriangles | ( | [out, retval] RtUlong * | pCount | ) |

Return number of selected face triangles

Parameters:

  | pCount | Number of selected face triangles

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::GetSelectedFaceTriangle | ( | [in] RtUlong | uIndex,
|  | [out] RtFaceTriangleSelection * | pSel |
| ) |  |  |

Get selected face triangle

Parameters:

  | uIndex | face triangle index
  | pSel | Structure describing face triangle selection

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::DeselectFaceTriangles | ( |  | ) |

De-select all selected face triangles

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::ToggleSelection | ( | [in] IRdMeshSelection * | pSelection | ) |

Xor selection with other selection. Both selections must be sorted.

Parameters:

  | pSelection | The other selection

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::AddSelection | ( | [in] IRdMeshSelection * | pSelection | ) |

Merge selection to current. Both selections must be sorted.

Parameters:

  | pSelection | The other selection

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::UpdateContextSelection | ( | [in] IRdMeshSelection * | pSelection | ) |

Merge selection, use selection type to remove lower types of selections (ordering is vertex, edge, triangle, face). Both selections must be sorted.

Parameters:

  | pSelection | The other selection

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::FilterContextSelection | ( | [in] IRdMeshSelection * | pSelection | ) |

Remove lower types of selections as the ones that are present in the other selection

Parameters:

  | pSelection | The other selection

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::RemoveSelection | ( | [in] IRdMeshSelection * | pSelection | ) |

Subtract selection from current selection. Both selections must be sorted.

Parameters:

  | pSelection | The other selection

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::SelectionsEqual | ( | [in] IRdMeshSelection * | pSelection | ) |

Check, if selection is equal to the other selection. Both selections must be sorted.

Parameters:

  | pSelection | The other selection

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::TranslateToInput | ( | [in] IRdMesh * | pInputMesh,
|  | [in] IRdMesh * | pOutputMesh |
| ) |  |  |

Translate selection from output mesh to input mesh use internal mesh lookup streams.

Parameters:

  | pInputMesh | mesh on input of mesh modifier node
  | pOutputMesh | mesh dependent on input mesh

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::ExtendSelection | ( | [in] IRdMesh * | pInputMesh,
|  | [in] IRdMesh * | pOutputMesh |
| ) |  |  |

Extend selection to all elements when only one part is selected

Parameters:

  | pInputMesh | mesh on input of mesh modifier node
  | pOutputMesh | mesh dependent on input mesh

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::TranslateToOutput | ( | [in] IRdMesh * | pInputMesh,
|  | [in] IRdMesh * | pOutputMesh |
| ) |  |  |

Translate selection defined for input mesh to selection defined for output mesh

Parameters:

  | pInputMesh | mesh on input of mesh modifier node
  | pOutputMesh | mesh dependent on input mesh

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::Sort | ( |  | ) |

Sort selection. Use when adding selection elements out of order.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRdMeshSelection::FillEdges | ( | IRdMesh * | pMesh | ) |

Extend selection, to edges in opposite direction if they are not present.

Parameters:

  | pMesh | Mesh this selection.

Returns:
  standard HRESULT processing can be applied to returned value