3ds Max C++ API Reference
|
Provides access to hair strand definitions for a modifier that generates hair. More...
#include <IHairModifier.h>
Classes | |
struct | ShadingParameters |
Defines the standard set of shading parameters for hair strands. More... | |
Public Member Functions | |
virtual bool | IsHairEnabled ()=0 |
Returns whether this hair modifier is enabled. | |
virtual ShadingParameters | GetShadingParameters (const TimeValue t, Interval &inout_validity)=0 |
Returns the shading parameters defined by this hair modifier. | |
virtual bool | GetHairDefinition (const TimeValue t, INode &node, MaxSDK::Array< unsigned int > &per_hair_vertex_count, MaxSDK::Array< Point3 > &vertices, MaxSDK::Array< float > &per_vertex_radius, MaxSDK::Array< Color > &per_vertex_color, MaxSDK::Array< Point3 > &per_vertex_normal, MaxSDK::Array< Point3 > &per_vertex_velocity, MaxSDK::Array< float > &per_vertex_opacity, MaxSDK::Array< Point2 > &per_vertex_uv)=0 |
Fetches the hair modifier's definition of hair strands. | |
Provides access to hair strand definitions for a modifier that generates hair.
The standard model for generating hair in 3ds Max is by applying a Hair Modifier to an existing geometry object. Renderer plugins that need the hair strand definition directly may use this interface to gather those definitions.
To retrieve a pointer to this interface, use EnumGeomPipeline() on a given node and perform a dynamic_cast<IHairModifier> on the pointer returned by IDerivedObject::GetModifier().
|
pure virtual |
Returns whether this hair modifier is enabled.
If this returns false, then this interface should be ignore altogether. This may happen, for example, if the hair modifier is set to generate geometry rather than hair primitives, in which case the Mesh evaluated for the node will contain the hair strands.
|
pure virtual |
Returns the shading parameters defined by this hair modifier.
These are the shading parameters that should be used when rendering the hair. The material assigned to the INode should be ignored in this case.
t | The time at which to fetch the shading parameters, which may be animated. | |
[in,out] | inout_validity | The validity of the returned value is intersected into the input value of this parameter. |
|
pure virtual |
Fetches the hair modifier's definition of hair strands.
The hair strands are defined as flat surfaces, facing the given normals. Each hair strand may have any number of vertices, the hair segments being linearly defined between the vertices.
t | The time at which to fetch the hair strands definition. | |
[out] | node | The hair strand node. |
[out] | per_hair_vertex_count | The number of vertices present in each hair strand, with one value for each hair strand. |
[out] | vertices | The position of each vertex. The number of vertices equals the sum of all values in per_hair_vertex_count. |
[out] | per_vertex_radius | The radius of the hair strand, at each vertex. |
[out] | per_vertex_color | The color of the hair strand, at each vertex. |
[out] | per_vertex_normal | The facing direction of the hair strand, at each vertex. |
[out] | per_vertex_velocity | The velocity of each vertex - that is, the vector defining the direction and amplitude of movement for one full frame of animation. |
[out] | per_vertex_opacity | The opacity of each vertex. |
[out] | per_vertex_uv | The UV coordinate at each vertex. |