User Tools

Site Tools


DzLegacyIKChain

A container that stores the IK chain information for an imported Poser figure.

More...

Inherits :

Constructors

DAZ Script
DzLegacyIKChain ( String name=“” )

Methods

DAZ Script
voidaddLink ( DzNode node, Number weight=1.0, Number index=-1 )
voidclearLinks ()
BooleangetActive ()
DzNodegetGoal ()
StringgetLabel ()
DzNodegetLink ( Number index )
NumbergetLinkWeight ( Number index )
NumbergetNumLinks ()
voidremoveLink ( Number index )
voidsetActive ( Boolean onOff )
voidsetGoal ( DzNode node )
voidsetLabel ( String label )
BooleansetLinkWeight ( Number index, Number weight )

Detailed Description

This is only intended to be used in conjunction with DzLegacyIKChains. It stores all the information from a single “inkyChain” section of a Poser CR2 file.

See Also:

Constructors


DzLegacyIKChain( String name=“” )

Default Constructor.

Parameter(s):

  • name - The name of this IK chain.

Attention:

  • It is the developer's responsibility to manage the lifetime of this object. This can be accomplished most easily by adding it to the list of IK chains owned by a DzLegacyIKChains.

See Also:

Methods


void : addLink( DzNode node, Number weight=1.0, Number index=-1 )

Adds a link to the chain, with the given weight and at the given index. If index is less than 0 or greater than the current link count, the link will be appended.

Parameter(s):

  • node - The node to add as a link.
  • weight - The weight to use for the added link. This parameter is optional and defaults to 1.0.
  • index - The index where the link should be added. This parameter is optional and defaults to -1.

void : clearLinks()

Removes all links from the chain.


Boolean : getActive()

Return Value:

  • Whether or not the IK chain is set to be active by default.

DzNode : getGoal()

Return Value:

  • The goal node of the chain.

String : getLabel()

Return Value:

  • The label for the IK chain.

DzNode : getLink( Number index )

Parameter(s):

  • index - The index of the link to retrieve.

Return Value:

  • The node at the specified index (if any), otherwise null.

Number : getLinkWeight( Number index )

Parameter(s):

  • index - The index of the link weight to get.

Return Value:

  • The weight of the link at the given index (if any), otherwise 1.0.

Number : getNumLinks()

Return Value:

  • The number of links defined in the chain.

void : removeLink( Number index )

Removes the link at the given index from the chain.

Parameter(s):

  • index - The index of the link which should be removed.

void : setActive( Boolean onOff )

Sets whether or not the IK chain is set to active by default.

Parameter(s):

  • onOff - If true, the chain will be set to be active by default, otherwise it will be set to be inactive.

void : setGoal( DzNode node )

Sets the goal node of the chain.

Parameter(s):

  • node - The new goal node.

void : setLabel( String label )

Sets the label for the IK chain.

Parameter(s):

  • label - The label to use for the chain.

Boolean : setLinkWeight( Number index, Number weight )

Sets the weight of the link at the given index to the given weight.

Parameter(s):

  • index - The index of the link whose weight should be changed.
  • weight - The new weight for the link.