[Papervision3D] ok, hey, let's play in 3D space, shall we?
Tim Knip
tim.knip at gmail.com
Fri Feb 9 15:32:41 EST 2007
John:
interpolating: check the method below. pAlpha is a number between 0 and 1...
Got it from Phillipe Ajoux's Md2 class.
public static function interpolatePoint( pA:Point3D, pB:Point3D,
pAlpha:Number ):Point3D
{
var dst:Point3D = new Point3D();
dst.x = pA.x + pAlpha * (pB.x - pA.x);
dst.y = pA.y + pAlpha * (pB.y - pA.y);
dst.z = pA.z + pAlpha * (pB.z - pA.z);
return dst;
}
hope this helps,
Tim
More information about the Papervision3D
mailing list