HairMaterialData Class Reference Library » 头发

#include <lib_hair.h>

详细描述

Contains information about hair materials. Cannot be allocated.

公共成员函数

Int32   GetCount ()
Int32   GetGuideMaterial ( Int32 i, Int32 prev= NOTOK )
BaseTag GetMaterialTag ( Int32 i)
Bool   ApplyMaterial ( Int32 i, HairGuides *guides, VolumeData *vd=nullptr, Int32 vindex=0)
Bool   ApplyMaterials ( HairGuides *guides, VolumeData *vd=nullptr, Int32 vindex=0)
Float   GetThickness ( Int32 guide, Float t, Int32 i= NOTOK )
向量   GetColor ( Int32 guide, Float t, const 向量 &r, const 向量 &wp, const 向量 &p, const 向量 &n, VolumeData *vd, const RayHitID &plyid, Int32 i= NOTOK )
向量   GetBackColor ( Int32 guide, Float t, const 向量 &col, const 向量 &r, const 向量 &wp, const 向量 &p, const 向量 &n, VolumeData *vd, const RayHitID &plyid, Int32 i= NOTOK )
Bool   GetSpecularColor ( Int32 guide, Float t, const 向量 &wp, const 向量 &p, const 向量 &n, VolumeData *vd, const RayHitID &plyid, 向量 &speccol, 向量 &ispeccol)
Float   GetTransparency ( Int32 guide, Float t, const 向量 &p, const 向量 &n, VolumeData *vd, Int32 i= NOTOK )
Bool   GetTagSelection ( Int32 i, BaseSelect *bs)
Bool   GetMaterialData ( Int32 guide, Float &shadows, Float &selfshadows, Float &backshadows, Float &transparency, Float &diffuse, Float &reflect, Float &transmit, Bool &roughenable, Float &roughvar, Float &roughness, Bool &specularenable, Float &specular, Float &specularpower, Float &specularback, Bool &ispecularenable, Bool &ispecularshader, Float &ispecular, Float &ispecularpower, Float &ispecularmix, Float &ispecularblend)
Bool   GetGIData ( Int32 guide, Bool &receive, Float &strength)
Bool   AdjustHUV ( Int32 guide, 向量 &huv, Float tline)

私有成员函数

  HairMaterialData ()
  ~HairMaterialData ()

构造函数 & 析构函数文档编制

◆  HairMaterialData()

HairMaterialData () private

◆  ~HairMaterialData()

~ HairMaterialData () private

成员函数文档编制

◆  GetCount()

Int32 GetCount ( )

Gets the number of hair material tags.

返回
The hair material count.

◆  GetGuideMaterial()

Int32 GetGuideMaterial ( Int32   i ,
Int32   prev = NOTOK  
)

Gets the material index for the specified hair index i , optionally looking for more materials by specifying prev .

参数
[in] i The hair index.
[in] prev The index of the previous material of the hair.
返回
The material index, or NOTOK if there are no more materials for the hair.

◆  GetMaterialTag()

BaseTag * GetMaterialTag ( Int32   i )

Gets the material tag corresponding to the specified hair index i .

参数
[in] i The hair index.
返回
The material tag.

◆  ApplyMaterial()

Bool ApplyMaterial ( Int32   i ,
HairGuides guides ,
VolumeData vd = nullptr ,
Int32   vindex = 0  
)

Applies a single material to the specified hair index i .

参数
[in] i The hair index.
[in] guides The hair guide data.
[in] vd The optional volume data.
[in] vindex The material index.
返回
true if successful, otherwise false .

◆  ApplyMaterials()

Bool ApplyMaterials ( HairGuides guides ,
VolumeData vd = nullptr ,
Int32   vindex = 0  
)

Applies a material to all hairs.

参数
[in] guides The hair guide data.
[in] vd The optional volume data.
[in] vindex The material index.
返回
true if successful, otherwise false .

◆  GetThickness()

Float GetThickness ( Int32   guide ,
Float   t ,
Int32   i = NOTOK  
)

Gets the thickness at position t along the specified guide .

参数
[in] guide The guide/hair index.
[in] t The position along guide/hair: 0 <= t <= 1
[in] i Pass NOTOK to use all materials, or a specific material index.
返回
The thickness.

◆  GetColor()

向量 GetColor ( Int32   guide ,
Float   t ,
const 向量 r ,
const 向量 wp ,
const 向量 p ,
const 向量 n ,
VolumeData vd ,
const RayHitID plyid ,
Int32   i = NOTOK  
)

Gets the color at position t along the specified guide .

参数
[in] guide The guide/hair index.
[in] t The position along guide/hair: 0 <= t <= 1
[in] r The root world coordinate.
[in] wp The world coordinate of the sampling point.
[in] p The UV coordinate.
[in] n The surface normal at the root.
[in] vd The volume data. Can be nullptr .
[in] plyid The global RayHitID for the root.
[in] i Pass NOTOK to use all materials, or a specific material index.
返回
The color.

◆  GetBackColor()

向量 GetBackColor ( Int32   guide ,
Float   t ,
const 向量 col ,
const 向量 r ,
const 向量 wp ,
const 向量 p ,
const 向量 n ,
VolumeData vd ,
const RayHitID plyid ,
Int32   i = NOTOK  
)

Gets the back color at position t along the specified guide .

参数
[in] guide The guide/hair index.
[in] t The position along guide/hair: 0 <= t <= 1
[in] col The color.
[in] r The root world coordinate.
[in] wp The world coordinate of the sampling point.
[in] p The UV coordinate.
[in] n The surface normal at the root.
[in] vd The volume data. Can be nullptr .
[in] plyid The global RayHitID for the root.
[in] i Pass NOTOK to use all materials, or a specific material index.
返回
The back color.

◆  GetSpecularColor()

Bool GetSpecularColor ( Int32   guide ,
Float   t ,
const 向量 wp ,
const 向量 p ,
const 向量 n ,
VolumeData vd ,
const RayHitID plyid ,
向量 speccol ,
向量 ispeccol  
)

Gets the specular color at position t along the specified guide .

参数
[in] guide The guide/hair index.
[in] t The position along guide/hair: 0 <= t <= 1
[in] wp The world coordinate of the sampling point.
[in] p The UV coordinate.
[in] n The surface normal at the root.
[in] vd The volume data. Can be nullptr .
[in] plyid The global RayHitID for the root.
[out] speccol Assigned the primary specular color.
[out] ispeccol Assigned the secondary specular color.
返回
true if successful, otherwise false .

◆  GetTransparency()

Float GetTransparency ( Int32   guide ,
Float   t ,
const 向量 p ,
const 向量 n ,
VolumeData vd ,
Int32   i = NOTOK  
)

Gets the transparency at position t along the specified guide .

参数
[in] guide The guide/hair index.
[in] t The position along guide/hair: 0 <= t <= 1
[in] p The UV coordinate.
[in] n The surface normal at the root.
[in] vd The volume data. Can be nullptr .
[in] i Pass NOTOK to use all materials, or a specific material index.
返回
The transparency.

◆  GetTagSelection()

Bool GetTagSelection ( Int32   i ,
BaseSelect bs  
)

Finds out which guides the specified material index i is applied to.

参数
[in] i The material index.
[out] bs Filled with the guide indices the material is applied to.
返回
true if successful, otherwise false .

◆  GetMaterialData()

Bool GetMaterialData ( Int32   guide ,
Float shadows ,
Float selfshadows ,
Float backshadows ,
Float transparency ,
Float diffuse ,
Float reflect ,
Float transmit ,
Bool roughenable ,
Float roughvar ,
Float roughness ,
Bool specularenable ,
Float specular ,
Float specularpower ,
Float specularback ,
Bool ispecularenable ,
Bool ispecularshader ,
Float ispecular ,
Float ispecularpower ,
Float ispecularmix ,
Float ispecularblend  
)

Gets the settings of the hair material.

参数
[in] guide The guide/hair index.
[out] shadows Assigned the shadows strength.
[out] selfshadows Assigned the self shadows strength.
[out] backshadows Assigned the back shadows strength.
[out] transparency Assigned the transparency strength.
[out] diffuse Assigned the diffuse value.
[out] reflect Assigned the reflectiveness strength.
[out] transmit Assigned the translucence strength.
[out] roughenable Assigned roughness on/off state.
[out] roughvar Assigned the roughness variation strength.
[out] roughness Assigned the roughness strength.
[out] specularenable Assigned the primary specular on/off state.
[out] specular Assigned the primary specular strength.
[out] specularpower Assigned the primary specular sharpness strength.
[out] specularback Assigned the back specular strength.
[out] ispecularenable Assigned the secondary specular on/off state.
[out] ispecularshader Assigned the secondary specular shader on/off state.
[out] ispecular Assigned the secondary specular strength.
[out] ispecularpower Assigned the secondary specular sharpness strength.
[out] ispecularmix Assigned the secondary specular mix strength.
[out] ispecularblend Assigned the secondary specular blend strength.
返回
true if successful, otherwise false .

◆  GetGIData()

Bool GetGIData ( Int32   guide ,
Bool receive ,
Float strength  
)

Gets the Global Illumination (GI) settings of the hair material.

参数
[in] guide The guide/hair index.
[out] receive Assigned the receive GI on/off state.
[out] strength Assigned the receive GI strength.
返回
true if successful, otherwise false .

◆  AdjustHUV()

Bool AdjustHUV ( Int32   guide ,
向量 huv ,
Float   tline  
)

Gets the hair UVs for a specified Hair guide and position along the guide.

参数
[in] guide The guide/hair index.
[out] huv Assigned the Hair UV coordinates.
[in] tline The position along the hair: 0 <= tline <= 1 .
返回
true if successful, otherwise false .