HairInterpolationMap Class Reference

#include <lib_hair.h>

Public Member Functions

 HairInterpolationMap ()
 
 ~HairInterpolationMap ()
 
void Free ()
 
HairGuideWeight * GetMap ()
 
HairGuideWeight * GetGuides (Int32 index)
 
Int32 GetHairCount ()
 
Int32 GetGuideCount ()
 
Int32 GetWeightCount ()
 
Float64 GetTotalWeight (Int32 index)
 
Float64 GetTotalInvWeight (Int32 index)
 
Float32 GetInterpolateReal (Int32 index, Float32 *v)
 
Float64 GetInterpolateReal (Int32 index, Float64 *v)
 
Vector32 GetInterpolatedVector (Int32 index, Vector32 *v)
 
Vector64 GetInterpolatedVector (Int32 index, Vector64 *v)
 

Private Attributes

HairGuideWeight * m_pMap
 
Int32 m_WeightCount
 
Int32 m_GuideCount
 
Int32 m_Count
 

Friends

class ::ChainBase
 
class ::HairManager
 

Constructor & Destructor Documentation

◆ HairInterpolationMap()

Constructor.

◆ ~HairInterpolationMap()

Destructor.

Member Function Documentation

◆ Free()

void Free ( )

Frees the allocated memory. Called by the destructor.

◆ GetMap()

HairGuideWeight* GetMap ( )

Gets the hair interpolation map with GetWeightCount() instances of HairGuideWeight for each of the GetHairCount() hairs.

Note
Not all of these have HairGuideWeight::m_Index set to not NOTOK, so check for that.
Returns
The hair interpolation map.

◆ GetGuides()

HairGuideWeight* GetGuides ( Int32  index)

Retrieves a pointer into the hair interpolation map at the offset for the specified hair index.

Parameters
[in]indexA hair index: 0 <= index < GetHairCount()
Returns
An offset into the hair interpolation map with GetWeightCount() instances for the specified hair.

◆ GetHairCount()

Int32 GetHairCount ( )

Gets the number of hairs.

Returns
The hair count.

◆ GetGuideCount()

Int32 GetGuideCount ( )

Gets the number of guides.

Returns
The guide count.

◆ GetWeightCount()

Int32 GetWeightCount ( )

Gets the maximum number of weights per hair in the interpolation map array, not necessarily used all of them.

Returns
The maximum number of weights per hair.

◆ GetTotalWeight()

Float64 GetTotalWeight ( Int32  index)

Gets the total weight for the specified hair index.

Parameters
[in]indexA hair index: 0 <= index < GetHairCount()
Returns
The sum of all active weights for the specified hair.

◆ GetTotalInvWeight()

Float64 GetTotalInvWeight ( Int32  index)

Gets the total inverse weight for the specified hair index.

Parameters
[in]indexA hair index: 0 <= index < GetHairCount()
Returns
The sum of the inverse of all active weights for the specified hair.

◆ GetInterpolateReal() [1/2]

Float32 GetInterpolateReal ( Int32  index,
Float32 *  v 
)

Interpolates Float32 values for the specified hair index using the information in the hair interpolation map.

Parameters
[in]indexA hair index: 0 <= index < GetHairCount()
[in]vAn array with GetWeightCount() elements for each of the possible guides of the specified hair.
Returns
The interpolation result.

◆ GetInterpolateReal() [2/2]

Float64 GetInterpolateReal ( Int32  index,
Float64 *  v 
)

Interpolates Float64 values for the specified hair index using the information in the hair interpolation map.

Parameters
[in]indexA hair index: 0 <= index < GetHairCount()
[in]vAn array with GetWeightCount() elements for each of the possible guides of the specified hair.
Returns
The interpolation result.

◆ GetInterpolatedVector() [1/2]

Vector32 GetInterpolatedVector ( Int32  index,
Vector32 *  v 
)

Interpolates Vector32 values for the specified hair index using the information in the hair interpolation map.

Parameters
[in]indexA hair index: 0 <= index < GetHairCount()
[in]vAn array with GetWeightCount() elements for each of the possible guides of the specified hair.
Returns
The interpolation result.

◆ GetInterpolatedVector() [2/2]

Vector64 GetInterpolatedVector ( Int32  index,
Vector64 *  v 
)

Interpolates Vector64 values for the specified hair index using the information in the hair interpolation map.

Parameters
[in]indexA hair index: 0 <= index < GetHairCount()
[in]vAn array with GetWeightCount() elements for each of the possible guides of the specified hair.
Returns
The interpolation result.

Friends And Related Function Documentation

◆ ::ChainBase

friend class ::ChainBase
friend

◆ ::HairManager

friend class ::HairManager
friend

Member Data Documentation

◆ m_pMap

HairGuideWeight* m_pMap
private

◆ m_WeightCount

Int32 m_WeightCount
private

◆ m_GuideCount

Int32 m_GuideCount
private

◆ m_Count

Int32 m_Count
private