HairGuideDynamics Class Reference

#include <lib_hair.h>

Detailed Description

Contains hair dynamics information. Cannot be allocated.

Public Member Functions

HairGuidesGetGuides ()
 
Vector GetPosition (Int32 i)
 
void SetPosition (Int32 i, const Vector &p)
 
Vector GetLastPosition (Int32 i)
 
void SetLastPosition (Int32 i, const Vector &p)
 
Vector GetVelocity (Int32 i)
 
void SetVelocity (Int32 i, const Vector &v)
 
Float GetMass (Int32 i)
 
void SetMass (Int32 i, Float m)
 
Vector GetForce (Int32 i)
 
void AddForce (Int32 i, const Vector &f)
 
Int32 GetPolygonIntersections (HairPolygonHit **hits)
 

Private Member Functions

 HairGuideDynamics ()
 
 ~HairGuideDynamics ()
 

Constructor & Destructor Documentation

◆ HairGuideDynamics()

HairGuideDynamics ( )
private

◆ ~HairGuideDynamics()

~HairGuideDynamics ( )
private

Member Function Documentation

◆ GetGuides()

HairGuides* GetGuides ( )

Gets the corresponding hair guide data.

Returns
The hair guide data.

◆ GetPosition()

Vector GetPosition ( Int32  i)

Gets the position of the specified guide i.

Parameters
[in]iThe guide index.
Returns
The position.

◆ SetPosition()

void SetPosition ( Int32  i,
const Vector p 
)

Sets the position of the specified guide i.

Parameters
[in]iThe guide index.
[in]pThe new position.

◆ GetLastPosition()

Vector GetLastPosition ( Int32  i)

Gets the last position of the specified guide i.

Parameters
[in]iThe guide index.
Returns
The last position.

◆ SetLastPosition()

void SetLastPosition ( Int32  i,
const Vector p 
)

Sets the last position of the specified guide i.

Parameters
[in]iThe guide index.
[in]pThe new last position.

◆ GetVelocity()

Vector GetVelocity ( Int32  i)

Gets the velocity of the specified guide i.

Parameters
[in]iThe guide index.
Returns
The velocity.

◆ SetVelocity()

void SetVelocity ( Int32  i,
const Vector v 
)

Sets the velocity of the specified guide i.

Parameters
[in]iThe guide index.
[in]vThe new velocity.

◆ GetMass()

Float GetMass ( Int32  i)

Gets the mass of the specified guide i.

Parameters
[in]iThe guide index.
Returns
The mass.

◆ SetMass()

void SetMass ( Int32  i,
Float  m 
)

Sets the mass of the specified guide i.

Parameters
[in]iThe guide index.
[in]mThe new mass.

◆ GetForce()

Vector GetForce ( Int32  i)

Gets the force of the specified guide i.

Parameters
[in]iThe guide index.
Returns
The force.

◆ AddForce()

void AddForce ( Int32  i,
const Vector f 
)

Adds the force of the specified guide i.

Parameters
[in]iThe guide index.
[in]fThe force to add.

◆ GetPolygonIntersections()

Int32 GetPolygonIntersections ( HairPolygonHit **  hits)

Gets the polygon intersection data.

Parameters
[out]hitsFilled with a pointer to an array of polygon hits. Need to be freed with DeleteMem() by the caller.
Returns
The number of hits or NOTOK if an error occurred.