IRsHairParameterProvider Interface Reference

Inherits IUnknown.

List of all members.

Public Member Functions

HRESULT GetLength ([in] RtDWORD triangle,[in] const RtPoint *baryc_coords,[out, retval] RtFloat *pLength)
HRESULT GetNormal ([in] const RtMatrixf *control_matrix, RtDWORD triangle, const RtPoint *baryc_coords,[out, retval] RtPoint *pNormal)
HRESULT GetDirRandomization ([in] RtDWORD triangle,[in] const RtPoint *baryc_coords,[out, retval] RtFloat *pRandomization)
HRESULT GetDensity ([in] RtDWORD triangle,[out] RtPoint *local_densities,[out, retval] RtFloat *pDensity)
HRESULT GetSoftness ([in] RtDWORD triangle,[in] const RtPoint *baryc_coords,[out, retval] RtFloat *pSoftness)
HRESULT GetGravityVector (RtDWORD triangle,[in] const RtPoint *baryc_coords,[out, retval] RtPoint *pGravityVector)
HRESULT GetSurfacePosition (RtDWORD triangle,[in] const RtPoint *baryc_coords,[out, retval] RtPoint *pSurfacePos)
HRESULT GetBaseVectors ([in] const RtMatrixf *control_matrix,[in] RtDWORD triangle,[out] RtPoint *u_base,[out] RtPoint *v_base,[out] RtFloat *surface)
HRESULT LockMesh ()
HRESULT UnlockMesh ()
HRESULT SetSourceMesh ([in] IRdMesh *pMesh)
HRESULT Configure ([in] IRsNode *pNode)
HRESULT SetStreamData ([in] RtVertexHair *pData)
HRESULT GetBottomThickness ([in] RtDWORD triangle,[in] const RtPoint *baryc_coords,[out, retval] RtFloat *pThickness)
HRESULT GetTopThickness ([in] RtDWORD triangle,[in] const RtPoint *baryc_coords,[out, retval] RtFloat *pThickness)
HRESULT GetProfileType ([out, retval] RtDWORD *pProfile)
HRESULT GetProfileSegments ([out, retval] RtDWORD *pSegments)
HRESULT GetLengthRandomization ([out, retval] RtFloat *pRandomization)
HRESULT GenerateUV ([out, retval] RtBool *pGenerateUV)
HRESULT LockHairStream ()
HRESULT UnlockHairStream ()
HRESULT GetArea ([in] const RtMatrixf *control_matrix,[in] RtDWORD tri_index,[out, retval] RtFloat *pArea)
HRESULT GetRealtimeRatio ([out, retval] RtFloat *pRealtime)
HRESULT GetOfflineRatio ([out, retval] RtFloat *pOffline)
HRESULT GetCurliness ([out, retval] RtFloat *pCurliness)
HRESULT GetTextureSegments ([out, retval] RtDWORD *pTexSegments)
HRESULT GetCollisionsEnabled ([out, retval] RtBool *pEnabled)
HRESULT GetColorTexture ([out, retval] IRdBitmap **ppBitmap)


Detailed Description

Holds and provides parameters for hair generator. Parameters are either global (for whole mesh) or per-vertex. Parameter values can be blended for particular spot at face triangle using barycentric coordinates

Member Function Documentation

HRESULT IRsHairParameterProvider::GetLength ( [in] RtDWORD  triangle,
[in] const RtPoint baryc_coords,
[out, retval] RtFloat *  pLength 
)

Returns local strand length at given point in given face triangle.

Parameters:
triangle [in] Triangle index.
baryc_coords [in] Barycentric coordinates of point in triangle.
Returns:
pLength [out,retval] Output strand length.

HRESULT IRsHairParameterProvider::GetNormal ( [in] const RtMatrixf control_matrix,
RtDWORD  triangle,
const RtPoint baryc_coords,
[out, retval] RtPoint pNormal 
)

Returns local normal at given point in given face triangle.

Parameters:
control_matrix [in] .
triangle [in] Triangle index.
baryc_coords [in] Barycentric coordinates of point in triangle.
Returns:
pNormal [out,retval] Output local normal.

HRESULT IRsHairParameterProvider::GetDirRandomization ( [in] RtDWORD  triangle,
[in] const RtPoint baryc_coords,
[out, retval] RtFloat *  pRandomization 
)

Returns direction randimization ratio for specified mesh surface point.

Parameters:
triangle [in] Triangle index.
baryc_coords [in] Barycentric coordinates of point in triangle.
Returns:
pRandomization [out,retval] Value between 0..1 (0 means 0% randomization, 1 means 100%).

HRESULT IRsHairParameterProvider::GetDensity ( [in] RtDWORD  triangle,
[out] RtPoint local_densities,
[out, retval] RtFloat *  pDensity 
)

Returns hair density (number of strands per unit square) for specified surface point.

Parameters:
triangle [in] Triangle index.
local_densities [out] .
Returns:
pDensity [out,retval] Returned local density.

HRESULT IRsHairParameterProvider::GetSoftness ( [in] RtDWORD  triangle,
[in] const RtPoint baryc_coords,
[out, retval] RtFloat *  pSoftness 
)

Returns strand softness for specified mesh surface point.
Softness is expressed as number of radians the strand bends per unit length.

Parameters:
triangle [in] Triangle index.
baryc_coords [in] Barycentric coordinates of point in triangle.
Returns:
pSoftness [out,retval] Returned local softness.

HRESULT IRsHairParameterProvider::GetGravityVector ( RtDWORD  triangle,
[in] const RtPoint baryc_coords,
[out, retval] RtPoint pGravityVector 
)

Returns gravity vector for specified mesh surface point. Gravity vector is expressed in world space.

Parameters:
triangle [in] Triangle index.
baryc_coords [in] Barycentric coordinates of point in triangle.
Returns:
pGravityVector [out,retval] Returned gravity vector.

HRESULT IRsHairParameterProvider::GetSurfacePosition ( RtDWORD  triangle,
[in] const RtPoint baryc_coords,
[out, retval] RtPoint pSurfacePos 
)

Returns position of surface point.

Parameters:
triangle [in] Triangle index.
baryc_coords [in] Barycentric coordinates of point in triangle.
Returns:
pSurfacePos [out,retval] Position of surface point.

HRESULT IRsHairParameterProvider::GetBaseVectors ( [in] const RtMatrixf control_matrix,
[in] RtDWORD  triangle,
[out] RtPoint u_base,
[out] RtPoint v_base,
[out] RtFloat *  surface 
)

Returns base vectors for hair strand.
Base vectors are mutually perpendicular and are used to define space basis for hair strand.

Parameters:
control_matrix [in] Matrix used to transform the basis (i.e. for strand which is bent).
triangle [in] Face triangle index.
u_base [out] Returned U vector for base.
v_abse [out] Returned V vector for base.
surface [out] Returned calculated face surface.

HRESULT IRsHairParameterProvider::LockMesh (  ) 

Locks mesh streams needed for detemining the hair parameters.

HRESULT IRsHairParameterProvider::UnlockMesh (  ) 

Unlocks previously locked mesh streams.

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

Sets the mesh which will serve as source for parameters. This mesh needs to have hair stream attached.

Parameters:
pMesh [in] Mesh to set.

HRESULT IRsHairParameterProvider::Configure ( [in] IRsNode pNode  ) 

Reads all global parameters from specified hair node.

Parameters:
pNode [in] Node to read data from.

HRESULT IRsHairParameterProvider::SetStreamData ( [in] RtVertexHair *  pData  ) 

Sets the mesh vertex stream data.

Parameters:
pData [in] Hair stream data.

HRESULT IRsHairParameterProvider::GetBottomThickness ( [in] RtDWORD  triangle,
[in] const RtPoint baryc_coords,
[out, retval] RtFloat *  pThickness 
)

Gets the bottom thickness of strand at specified location.

Parameters:
triangle [in] Triangle index.
baryc_coords [in] Barycentric coordinates of point in triangle.
Returns:
pThickness [out,retval] Returned thickness at strand bottom.

HRESULT IRsHairParameterProvider::GetTopThickness ( [in] RtDWORD  triangle,
[in] const RtPoint baryc_coords,
[out, retval] RtFloat *  pThickness 
)

Gets the thickness of strand at tip at specified location.

Parameters:
triangle [in] Triangle index.
baryc_coords [in] Barycentric coordinates of point in triangle.
Returns:
pThickness [out,retval] Returned thickness at strand tip.

HRESULT IRsHairParameterProvider::GetProfileType ( [out, retval] RtDWORD *  pProfile  ) 

Gets current profile type which is one of value of RtHairProfileType.

Returns:
pProfile [out,retval] Current type of hair strand cross section.

HRESULT IRsHairParameterProvider::GetProfileSegments ( [out, retval] RtDWORD *  pSegments  ) 

Gets the number of segments per hair strand.

Returns:
pSegments [out,retval] Number of strand segments.

HRESULT IRsHairParameterProvider::GetLengthRandomization ( [out, retval] RtFloat *  pRandomization  ) 

Gets the length randomization ratio (0=0%, 1=100%).
1 means that hair strands can have zero length or can be twice as long as normal.

Returns:
pRandomization [out,retval] Randomization ratio (global).

HRESULT IRsHairParameterProvider::GenerateUV ( [out, retval] RtBool *  pGenerateUV  ) 

Returns the status flag of UV generator for hair strand.
If false returned, no UV for hair mesh are generated.

Returns:
pGenerateUV [out,retval] Returned status of UV generator.

HRESULT IRsHairParameterProvider::LockHairStream (  ) 

Locks only hair stream of input mesh.

HRESULT IRsHairParameterProvider::UnlockHairStream (  ) 

Unlocks hair stream of input mesh.

HRESULT IRsHairParameterProvider::GetArea ( [in] const RtMatrixf control_matrix,
[in] RtDWORD  tri_index,
[out, retval] RtFloat *  pArea 
)

Returns the area of specifed mesh triangle.

Parameters:
control_matrix [in] Mesh matrix.
tri_index [in] Index of triangle.
pArea [out,retval] Returned area of triangle.

HRESULT IRsHairParameterProvider::GetRealtimeRatio ( [out, retval] RtFloat *  pRealtime  ) 

Returns ratio of real-time amount of hair rendered (0.1 means that only 10% of strands is rendered in real time).

Returns:
pRealtime [out,retval] Returned ratio for real-time rendering.

HRESULT IRsHairParameterProvider::GetOfflineRatio ( [out, retval] RtFloat *  pOffline  ) 

Returns ration of offline amount of hair rendered.
Can possibly be greater than 1. This is used for offline renders such as VRay.

Returns:
pOffline [out,retval] Returned ratio for offline rendering.

HRESULT IRsHairParameterProvider::GetCurliness ( [out, retval] RtFloat *  pCurliness  ) 

Gets the global hair curliness. Curliness is specified in revolutions per length.

Returns:
pCurliness [out,retval] Returned curliness ratio.

HRESULT IRsHairParameterProvider::GetTextureSegments ( [out, retval] RtDWORD *  pTexSegments  ) 

Returns number of vertical slices of texture U coordinate used for color randomization.

Returns:
pTexSegments [out,retval] Number of segments.

HRESULT IRsHairParameterProvider::GetCollisionsEnabled ( [out, retval] RtBool *  pEnabled  ) 

Returns the status of collision flag.
Used to determine whether to calculate collisions of hair with control mesh.

Returns:
pEnabled [out,retval] Returned flag status.

HRESULT IRsHairParameterProvider::GetColorTexture ( [out, retval] IRdBitmap **  ppBitmap  ) 

Returns the texture used for hair coloring.

Returns:
ppBitmap [out,retval] Returned texture.


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