Beispiel #1
0
        public static MatrixD BSpline(MatrixD a, MatrixD b, float t)
        {
            var up  = Vector3D.Lerp(a.Up, b.Up, t);
            var bez = new CubicCurve(a, b);

            var x   = bez.Sample(t);
            var fwd = bez.SampleDerivative(t);

            return(MatrixD.CreateWorld(x, Vector3D.Normalize(fwd), Vector3D.Normalize(up)));
        }
 public Vector3D SampleDerivative(float t)
 {
     return(Vector3D.TransformNormal(
                SphericalExtensions.DifferentialFromSpherical(_curve.Sample(t), _curve.SampleDerivative(t)), _matrix));
 }