Constructor
new KinematicsHierachy()
Create a Kinematics Hierachy Object.
Classes
Methods
applyToModel(nodeid)
Apply current hierachy to node
Parameters:
Name | Type | Description |
---|---|---|
nodeid |
number | Nodeid |
createComponent(parentcomponent, nodeids, isReferenceIn, infront) → {KinematicsComponent}
Create a new component
Parameters:
Name | Type | Description |
---|---|---|
parentcomponent |
KinematicsComponent | Parent Component |
nodeids |
number | Array of Nodeids associated with new component |
isReferenceIn |
bool | Optional, if true, this component is a reference component (Default:True) |
infront |
bool | Optional, if true, the new component will be inserted as a parent of the provided parentcomponent (Default:false) |
Returns:
Component
- Type
- KinematicsComponent
createComponentFromSelection(parentcomponent, isReferenceIn, infront) → {KinematicsComponent}
Create a new component from the current selection and handle parameters
Parameters:
Name | Type | Description |
---|---|---|
parentcomponent |
KinematicsComponent | Parent Component |
isReferenceIn |
bool | Optional, if true, this component is a reference component (Default:True) |
infront |
bool | Optional, if true, the new component will be inserted as a parent of the provided parentcomponent (Default:false) |
Returns:
Component
- Type
- KinematicsComponent
fromJson(def)
Populate Hierachy from provided JSON object
Parameters:
Name | Type | Description |
---|---|---|
def |
object | JSON Object |
generateTemplate()
Generate or Update Template for this Hierachy
getComponentById(id) → {KinematicsComponent}
Retrieves component associated with this hierachy from its id
Parameters:
Name | Type | Description |
---|---|---|
id |
number | Component ID |
Returns:
Component
- Type
- KinematicsComponent
getComponentHash() → {hash}
Retrieve Component Hash
Returns:
Component Hash
- Type
- hash
getEnforceLimits() → {bool}
Retrieves if limits/constraints of model should be enforced
Returns:
If true, limits/constraints of model should be enforced
- Type
- bool
getIkLearningRate() → {number}
Retrieve Learning Rate for Inverse Kinematics
Returns:
IK Learning Rate
- Type
- number
getIkSamplingDistance() → {number}
Retrieve Sampling Distance for Inverse Kinematics
Returns:
IK Sampling Distance
- Type
- number
getIkSpeed() → {number}
Retrieve Speed for Inverse Kinematics
Returns:
IK Speed
- Type
- number
getIkThreshold() → {number}
Retrieve Threshold for Inverse Kinematics
Returns:
IK Threshold
- Type
- number
getIkTip() → {Point3}
Retrieve Tip Location for Inverse Kinematics
Returns:
IK Tip Location
- Type
- Point3
getRootComponent() → {KinematicsComponent}
Retrieve Root Component
Returns:
Component
- Type
- KinematicsComponent
getTemplateId() → {uuid}
Retrieves ID of template associated with this hierachy
Returns:
Template ID
- Type
- uuid
insertIKHandle()
Insert Handle from Inverse Kinematics Target Point
isIKActive() → {bool}
Retrieves if Inverse Kinematics is currently activer
Returns:
IK Active
- Type
- bool
(async) rebuildComponentTree()
Rebuild internal node hierachy
removeAnimationFromComponents(animationTemplateId)
Remove Animations from All Components
Parameters:
Name | Type | Description |
---|---|---|
animationTemplateId |
uuid | Animation Template ID |
resetComponents()
Reset All Components in Hierachy
(async) resetPivotSystems()
Rebuild pivotsystem
setEnforceLimits(enforceLimits)
Sets if limits/constraints of model should be enforced
Parameters:
Name | Type | Description |
---|---|---|
enforceLimits |
bool | If true, limits/constraints of model should be enforced |
setIKHandleToTip(insertHandle)
Set Handle to Inverse Kinematics Tip
Parameters:
Name | Type | Description |
---|---|---|
insertHandle |
bool | Insert Handle |
setIkLearningRate(ikLearningRate)
Set Learning Rate for Inverse Kinematics
Parameters:
Name | Type | Description |
---|---|---|
ikLearningRate |
number | IK Learning Rate |
setIkSamplingDistance(ikSamplingDistance)
Set Minimum Sampling Distance for Inverse Kinematics
Parameters:
Name | Type | Description |
---|---|---|
ikSamplingDistance |
number | IK Sampling Distance |
setIkSpeed(ikSpeed)
Set Speed for Inverse Kinematics
Parameters:
Name | Type | Description |
---|---|---|
ikSpeed |
number | IK Speed |
setIkThreshold(ikThreshold)
Set Threshold for Inverse Kinematics
Parameters:
Name | Type | Description |
---|---|---|
ikThreshold |
number | IK Threshold |
setIkTip(tip)
Set Tip Position for Inverse Kinematics
Parameters:
Name | Type | Description |
---|---|---|
tip |
Point3 | IK Tip Location |
setTipToHandlePosition()
Set Inverse Kinematics Tip to Handle Position
startIKFromHandle()
Activate Inverse Kinematics and set Kinematics Tip to currently active handle position
stopIK()
Stop any Inverse Kinematics calculation
toJson() → {object}
Generate JSON object for this Hierarchy
Returns:
JSON object
- Type
- object
(async) updateComponents()
Update all components