IRfMeshRetargetSet Struct Reference

Inherits IUnknown.

List of all members.

Public Member Functions

HRESULT SetSourceMesh ([in] IRdMesh *pMesh)
HRESULT SetTargetMesh ([in] IRdMesh *pMesh)
HRESULT RetargetDisplacement ([in] IRdVertexStream *pStreamIn,[out] IRdVertexStream **ppStreamOut)
HRESULT RetargetVertices ([in] IRdVertexStream *pStreamIn,[out] IRdVertexStream **ppStreamOut)
HRESULT RetargetFloatArray ([in] RtFloat *pfWeightsIn,[in] RtFloat *pfWeightsOut)
HRESULT CheckRetarget ()


Detailed Description

Mesh retargeting set is used for retargetting mesh properties when mesh topology changes.

Member Function Documentation

HRESULT IRfMeshRetargetSet::SetSourceMesh ( [in] IRdMesh pMesh  ) 

Set source mesh for re-targeting (mesh which is valid for streams that you wish to retarget).

Parameters:
pMesh [in] Mesh to be changed.
Returns:
standard HRESULT processing can be applied to returned value.

HRESULT IRfMeshRetargetSet::SetTargetMesh ( [in] IRdMesh pMesh  ) 

Set target mesh for re-targeting (mesh for which you want to calculate stream).

Parameters:
pMesh [in] Mesh to be changed.
Returns:
standard HRESULT processing can be applied to returned value.

HRESULT IRfMeshRetargetSet::RetargetDisplacement ( [in] IRdVertexStream pStreamIn,
[out] IRdVertexStream **  ppStreamOut 
)

Retarget displacement.

  • Specify vertices displacement with ordering defined by source mesh.
  • Function calculates vertex displacement in target mesh ordering.
  • Displacement for new vertices is interpolated using reference mesh.
Parameters:
pStreamIn [in] Vertex stream with vertex indexes corresponding with source mesh.
ppStreamOut [out] Calculated vertex stream with vertexes corresponding with target mesh:
  • New vertices added.
  • Old vertices discarded.
Returns:
standard HRESULT processing can be applied to returned value.

HRESULT IRfMeshRetargetSet::RetargetVertices ( [in] IRdVertexStream pStreamIn,
[out] IRdVertexStream **  ppStreamOut 
)

Retarget vertex positions.

  • Specify vertices with ordering defined by source mesh.
  • Function calculates vertices in target mesh ordering.
  • Positions for new vertices is interpolated using reference mesh.
Parameters:
pStreamIn [in] Vertex stream with vertex indexes corresponding with source mesh.
ppStreamOut [out] Calculated vertex stream with vertexes corresponding with target mesh:
  • New vertices added.
  • Old vertices discarded.
Returns:
standard HRESULT processing can be applied to returned value.

HRESULT IRfMeshRetargetSet::RetargetFloatArray ( [in] RtFloat *  pfWeightsIn,
[in] RtFloat *  pfWeightsOut 
)

Retarget float array.

  • Specify vertices with ordering defined by source mesh.
  • Function calculates float weights in target mesh ordering.
  • Weights for new vertex indices is interpolated using reference mesh.
Remarks:
NOTE: caller must make sure that in and out weights have correct size.
Parameters:
pfWeightsIn [in] Float array with indexes corresponding with source mesh.
pfWeightsOut [out] Calculated float array with ordering corresponding to target mesh:
  • New vertexes added.
  • Old vertexes discarded.
Returns:
standard HRESULT processing can be applied to returned value.

HRESULT IRfMeshRetargetSet::CheckRetarget (  ) 

Check if retargetting is needed. Retargetting is not needed if retargetting streams are equal.

Returns:
S_OK if retarget is required, S_FALSE if retargetting is not needed, E_FAIL if error occurs.


Generated on Wed May 20 21:32:11 2009 for trueSpace7.6 SDK by  doxygen 1.5.5