The columns of the input table should be time, three columns of position, followed by yaw, pitch, and roll. The output will be normally be a four-column file specifying time and position. If the -r option is used, the output is a seven-column file in which the last three columns are copies of the orientation information from the input file.
The position of the object relative to the rigid body should be given on the command line in the order x, y, z, with the -o # # # option. These offset values should be as measured from the centroid of the rigid body.
Suppose that truck.table contains the desired position of the center of the front axle of the truck as well as its orientation at each time. One row of the table might look like this:
35.2 12450 -140 600 90.0 0.0 0.0Thus 35.2 seconds into the animation, the center of the front axle will be at (12450, -140, 600), and the truck will be pointed in the positive y direction. (yaw = 90).
Now, suppose we want the camera to ride along in the cab, above and behind the front axle and somewhat to the left. To specify this offset, we use the coordinate frame of the truck, with the origin at the center of the front axle, the x-axis to the front, y to the left, and z pointing up. Let the exact offset from the axle to the desired camera position in this case be (-600, 900, 1200), in units of mm. Now we use the routine:
anim_offset -o -600 900 1200 < truck.table > camera.tableThe result is a four-column table giving the desired position of the virtual camera at each time. The row corresponding to the sample row above would be:
35.2 11550 -740 1800With the -r option, the output would have been:
35.2 11550 -740 1800 90.0 0.0 0.0Now tabsub and/or anim_script can be used to process these two animation tables into an animation script.