public double curvePoint ( XYZ vec , float t ) { double tmp = 0 ; switch ( vec ) { case X : tmp = catmullRom ( points [ 0 ] , points [ 3 ] , points [ 6 ] , points [ 9 ] , t ) ; break ; case Y : tmp = catmullRom ( points [ 1 ] , points [ 4 ] , points [ 7 ] , points [ 10 ] , t ) ; break ; default : break ; } return tmp ; }
Evaluates the curve at point t .