I need to write a function to interpolate between two Bezier position keys. Each key is defined like so:
struct bpkey {
Point3D ptPos;
Vector3D vTanIn;
Vector3D vTanOut;
float fTime;
};
Point3D TweenKeys( bpkey& pI,bpkey& pT,float fTime );
I think it would go something like this, but I’m not sure:
float fT=fTime/(pI.fTime+pT.fTime);
float fMagIn=pT.vTanIn.mag();
float fMagOut=pI.vTanOut.mag();
return (pT.ptPos*(fT*(fMagIn+fMagOut)));
Does anyone know if that is anything close to correct? Thanks in advance.