IRsHairStrandGeneratorAlg Interface Reference
Inherits IUnknown.
List of all members.
Detailed Description
Algorithm for generating hair strands. It uses control mesh to generate list of strands and nodes It can convert them to hair mesh geometry, but also provides them for further processing
Member Function Documentation
| HRESULT IRsHairStrandGeneratorAlg::SetInputMesh |
( |
[in] IRdMesh * |
pMesh |
) |
|
Sets the input (control) mesh on which strands have to be generated.
- Parameters:
-
| HRESULT IRsHairStrandGeneratorAlg::LockMesh |
( |
|
) |
|
Locks the neccessary mesh streams used for generating strands.
| HRESULT IRsHairStrandGeneratorAlg::UnlockMesh |
( |
|
) |
|
Unlocks control mesh streams.
| HRESULT IRsHairStrandGeneratorAlg::Process |
( |
|
) |
|
| HRESULT IRsHairStrandGeneratorAlg::Configure |
( |
[in] IRsNode * |
pNode |
) |
|
Sets the parameters contained in specified hair node connectors.
- Parameters:
-
| pNode | [in] RnHair node instance. |
| HRESULT IRsHairStrandGeneratorAlg::SetStreamData |
( |
[in] RtVertexHair * |
pData |
) |
|
Overrides current hair data stream with specified one.
- Parameters:
-
| pData | [in] Hair vertex stream data. |
| HRESULT IRsHairStrandGeneratorAlg::EnableCacheMode |
( |
[in] RtBool |
enable |
) |
|
Enables hair strand caching.
- Parameters:
-
| enable | [in] Desired status of caching . |
| HRESULT IRsHairStrandGeneratorAlg::SetCachingStrategy |
( |
[in] RtDWORD |
strategy |
) |
|
| HRESULT IRsHairStrandGeneratorAlg::SetControlMatrix |
( |
[in] const RtMatrixf * |
matrix |
) |
|
Sets the mesh control matrix (world transform of control mesh). matrix [in] Control matrix to set.
| HRESULT IRsHairStrandGeneratorAlg::SetHash |
( |
[in] RtDWORD |
hash |
) |
|
Sets generator hash which is used as a part of random generator seed.
- Parameters:
-
| HRESULT IRsHairStrandGeneratorAlg::GenerateStrands |
( |
|
) |
|
| HRESULT IRsHairStrandGeneratorAlg::GetOutputMesh |
( |
[out, retval] IRdMesh ** |
ppMesh |
) |
|
Gets the generated hair mesh.
- Returns:
- ppMesh [out,retval] Output hair mesh.
| HRESULT IRsHairStrandGeneratorAlg::SetPreviewMode |
( |
[in] RtBool |
preview_mode |
) |
|
Sets the preview mode flag. In preview mode, hair strands are rendered as single lines.
- Parameters:
-
| preview_mode | [in] Desired preview mode. |
Sets the parameter provider for generator.
- Parameters:
-
| pParamProvider | [in] Parameter provider to set. |
| HRESULT IRsHairStrandGeneratorAlg::SetOfflineMode |
( |
[in] RtBool |
offline_mode |
) |
|
Sets the flag specifying that generator is used for offline rendering.
- Parameters:
-
| offline_mode | [in] Desired status of offline rendering flag. |
| HRESULT IRsHairStrandGeneratorAlg::GetStrandCount |
( |
[out] RtDWORD * |
pStrandCount, |
|
|
[out] RtDWORD * |
pNodeCount | |
|
) |
| | |
Gets generated strand and node count.
- Parameters:
-
| pStrandCount | [out] Returned number of generated strands. |
| pNodeCount | [out] Returned number of generated nodes. |
Fills the strand and node arrays with currently generated strands and nodes.
- Parameters:
-
| pStrands | [in,out] Array to fill with generated strands. |
| pNodes | [in,out] Array to fill with generated strand nodes. |
| HRESULT IRsHairStrandGeneratorAlg::ProjectTips |
( |
const RtMatrixf * |
pMatrix |
) |
|
Calculates positions of strand tips in screen space using specified projection matrix.
- Parameters:
-
| pMatrix | [in] View * projection matrix. |
| HRESULT IRsHairStrandGeneratorAlg::GetTipsProjections |
( |
[in] RtVector2f * |
pProjections |
) |
|
Fills specified array with strand tip projections in screen space.
- Parameters:
-
| pProjections | [in] Array to fill strand projections. |
| HRESULT IRsHairStrandGeneratorAlg::GenerateMeshForTriangle |
( |
[in] RtDWORD |
index, |
|
|
[in, out] RtFloat * |
residual_count, |
|
|
[out, retval] IRdMesh ** |
ppMesh | |
|
) |
| | |
Generates hair mesh for specified triangle of control mesh.
- Parameters:
-
| index | [in] Triangle index. |
| residual_count | [in,out] Input/output parameter used to maintain specified density on very small triangles.
Specify 0 at the beginning and then just pass returned value to subsequent calls. |
- Returns:
- ppMesh [out,retval] Generated mesh.