# IRsPrimitiveManager Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | SetGeneratorNode (IRsNode *pNode)
HRESULT | GetGeneratorNode (IRsNode **ppNode)
HRESULT | Prepare ()
HRESULT | SetParameters (IRdPrimitiveFactoryState *pState)
HRESULT | GetControlPointReference (RtPoint *pPosition, RtVector3f *pNormal, RtUlong *pDimension)
HRESULT | GetTimestamps (RtDWORD *pdwMeshTs, RtDWORD *pdwMatrixTs, RtDWORD *pdwMaterial)
HRESULT | GetMesh (IRdMesh **ppMesh)
HRESULT | GetMatrix (IRdMatrixf **ppMatrix)
HRESULT | GetMaterial (IRdMaterialList **ppMaterial)
HRESULT | SetDefaultState ([in] RtDWORD dwFlags)
HRESULT | SetUserParameters (BSTR szParams)
HRESULT | GetPrimitiveFinished ()

## Detailed Description

IRsPrimitiveManager provides support management for primitve creation.

## Member Function Documentation

HRESULT IRsPrimitiveManager::SetGeneratorNode | ( | IRsNode * | pNode | ) |

Tool factory calls this method to set properties panel/generator node for primitive factory.

Parameters:

  | pNode | contains node to use as property or generator.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::GetGeneratorNode | ( | IRsNode ** | ppNode | ) |

Get method for properties panel/generator node

Parameters:

  | ppNode | is filled with node provided by SetGeneratorNode method.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::Prepare | ( |  | ) |

Set manager to initial state. Method is called when tool begins to create new primitive

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::SetParameters | ( | IRdPrimitiveFactoryState * | pState | ) |

Set state vector for primitive creation.

Parameters:

  | pState | defines current primitive factory state

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::GetControlPointReference | ( | RtPoint * | pPosition,
|  | RtVector3f * | pNormal,
|  | RtUlong * | pDimension |
| ) |  |  |

Get reference position and normal current control point evaluation according to current state vector.

Parameters:

  | pPosition | defines requested reference position
  | pNormal | defines requested reference normal

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::GetTimestamps | ( | RtDWORD * | pdwMeshTs,
|  | RtDWORD * | pdwMatrixTs,
|  | RtDWORD * | pdwMaterial |
| ) |  |  |

Get mesh and matrix timestamps for mesh and matrix. Timestamps are used for caching; if value does not change between two calls than specified resource has not changed - and caller can assume that they have not changed.

Parameters:

  | pdwMeshTs | Mesh timestamp value. initial value is 0.
  | pdwMatrixTs. | Matrix timestamp value. Initial value is 0.
  | pdwMaterialTs. | Material timestamp value. Initial value is 0.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::GetMesh | ( | IRdMesh ** | ppMesh | ) |

Return preview mesh created using current primitive creation state vector.

Parameters:

  | ppMesh | is filled with preview mesh.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::GetMatrix | ( | IRdMatrixf ** | ppMatrix | ) |

Return preview matrix created using current primitive creation state vector.

Parameters:

  | ppMatrix | is filled with preview matrix.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::GetMaterial | ( | IRdMaterialList ** | ppMaterial | ) |

Return preview material created using current primitive creation state vector.

Parameters:

  | ppMaterial | is filled with preview matrix.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::SetDefaultState | ( | [in] RtDWORD | dwFlags | ) |

Set default state of primitive manager according to RePrimitiveManagerDefaultState flags. This method can assume that last creation parameters are set.

Parameters:

  | dwFlags | specifies requested default state.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::SetUserParameters | ( | BSTR | szParams | ) |

Set user parameters.

Parameters:

  | szParams | is set (if available) with user parameters.

Returns:
  standard HRESULT processing can be applied to returned value

HRESULT IRsPrimitiveManager::GetPrimitiveFinished | ( |  | ) |

Checks, whether provided state vector is sufficient to create a primitive.

Returns:
  standard HRESULT processing can be applied to returned value