| 112 | } |
| 113 | |
| 114 | @Documentation("returns the position of point `pointNum` at time `time` where time goes from 0 to 1 over the course of the clip") |
| 115 | fun positionAtTime(time: Double, pointNum: Int): Vec3 { |
| 116 | if (pointNum >= splines.size) throw IllegalArgumentException(" no such point $pointNum, there are only ${splines.size} points in this file") |
| 117 | return splines[pointNum].evaluate(time * file.frames.size, Vec3()) |
| 118 | } |
| 119 | |
| 120 | @Documentation("returns the velocity of point `pointNum` at time `time` where time goes from 0 to 1 over the course of the clip") |
| 121 | fun velocityAtTime(time: Double, pointNum: Int): Vec3 { |