# closed-chain-ik/three: Functions

## URDFUtils

### urdfRobotToIKRoot

```js
urdfRobotToIKRoot( robot: URDFRobot, trimUnused?: boolean ): Joint
```

Builds an IK tree from a `URDFRobot` and returns its root joint, which has all six degrees
of freedom set. Joint values on the robot are reflected in the tree.

- `robot`, `URDFRobot`
- `trimUnused`, `boolean`, optional, default `false`: Remove dangling links that do not lead to a movable joint.

### setIKFromUrdf

```js
setIKFromUrdf( ikRoot: Joint, robot: URDFRobot )
```

Copies the root transform and joint values from the robot onto the IK tree, matching joints
by name.

- `ikRoot`, `Joint`
- `robot`, `URDFRobot`

### setUrdfFromIK

```js
setUrdfFromIK( robot: URDFRobot, ikRoot: Joint )
```

Copies the root transform and joint values from the IK tree onto the robot, matching joints
by name.

- `robot`, `URDFRobot`
- `ikRoot`, `Joint`
