# NewtonUserJointAddLinearRow

## NewtonUserJointAddLinearRow

void NewtonUserJointAddLinearRow( const NewtonJoint* joint, const dFloat *pivot0, const dFloat *pivot1, const dFloat *dir)

## Usage

Add a linear restricted degree of freedom. This basically tells the simulator to make points "pivot0" and "pivot1" come together along the vector "dir".

Another way of thinking of this is that pivot0 is the position relative to where the child is now, pivot 1 is where that position on the child should be, and dir is the vector pivot0 should travel along to reach pivot 1.

## Parameters

- const NewtonJoint *joint - pointer to the joint.
- const dFloat *pivot0 - pointer of a vector in global space fixed on body zero.
- const dFloat *pivot1 - pointer of a vector in global space fixed on body one.
- const dFloat *pin - pointer of a unit vector in global space along which the relative position, velocity and acceleration between the bodies will be driven to zero.

## Remarks

- A linear contraint row calculates the Jacobian derivatives and relative acceleration required to enforce the constraint condition at the attachment point and the pin direction considered fixed to both bodies.

- The acceleration is calculated such that the relative linear motion between the two points is zero, the application can afterward override this value to create motors.

- after this function is call and internal DOF index will point to the current row entry in the constraint matrix.

- This function call only be called from inside a NewtonUserBilateralCallBack callback.