fabrik3d_solve_primitive
Functions
- fabrik3d_solve_primitive(size, positions, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z, [max_iterations], [distance_tolerance])
Implementation of FABRIK algorithm, "Forward And Backward Reaching Inverse Kinematics" This implementation deals with single chain at a time, without support for multiple effectors see "FABRIK: a fast, iterative solver for inverse kinematics"
- reach_out(size, positions, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z)
- is_reachable(size, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z)
- compute_direction(result, result_offset, positions, offsetA, offsetB)
Produced vector normalize(B-A)
- solve_forward(size, positions, lengths, origin_x, origin_y, origin_z)
- solve_backward(size, positions, lengths, target_x, target_y, target_z)
fabrik3d_solve_primitive(size, positions, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z, [max_iterations], [distance_tolerance])
Implementation of FABRIK algorithm, "Forward And Backward Reaching Inverse Kinematics" This implementation deals with single chain at a time, without support for multiple effectors see "FABRIK: a fast, iterative solver for inverse kinematics"
Kind: global function
Param | Type | Description |
---|---|---|
size | number | number of points in the chain |
positions | Float32Array | Array.<number> | |
lengths | Float32Array | Array.<number> | |
origin_x | number | |
origin_y | number | |
origin_z | number | |
target_x | number | |
target_y | number | |
target_z | number | |
[max_iterations] | number | More steps will lead to higher accuracy, but at the cost of computation. Generally solution will be reached in just a few iteration so this is just a ceiling |
[distance_tolerance] | number | Minimum squared distance to be achieved to the target, used to terminate earlier before maximum number of iterations is reached |
reach_out(size, positions, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z)
Kind: global function
Param | Type | Description |
---|---|---|
size | number | number of points in the chain |
positions | Float32Array | Array.<number> | |
lengths | Float32Array | Array.<number> | |
origin_x | number | |
origin_y | number | |
origin_z | number | |
target_x | number | |
target_y | number | |
target_z | number |
is_reachable(size, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z)
Kind: global function
Param | Type |
---|---|
size | number |
lengths | Array.<number> |
origin_x | number |
origin_y | number |
origin_z | number |
target_x | number |
target_y | number |
target_z | number |
compute_direction(result, result_offset, positions, offsetA, offsetB)
Produced vector normalize(B-A)
Kind: global function
Param |
---|
result |
result_offset |
positions |
offsetA |
offsetB |
solve_forward(size, positions, lengths, origin_x, origin_y, origin_z)
Kind: global function
Param | Type |
---|---|
size | number |
positions | Float32Array |
lengths | Float32Array | Array.<number> |
origin_x | number |
origin_y | number |
origin_z | number |
solve_backward(size, positions, lengths, target_x, target_y, target_z)
Kind: global function
Param | Type |
---|---|
size | number |
positions | Float32Array |
lengths | Float32Array | Array.<number> |
target_x | number |
target_y | number |
target_z | number |