CubicStep() public static method

public static CubicStep ( Double pFirstPoint, Double pFirstSlope, Double pSecondPoint, Double pSecondSlope, Double pPercent ) : Double
pFirstPoint Double
pFirstSlope Double
pSecondPoint Double
pSecondSlope Double
pPercent Double
return Double
Ejemplo n.º 1
0
 public virtual void Draw(Double pPercent)
 {
     Node.Position    = new Vector3(Methods.CubicStep(ox, odx, x, dx, pPercent), Methods.CubicStep(oy, ody, y, dy, pPercent), 0);
     Node.Orientation =
         Quaternion.FromAngleAxis(Methods.CubicStep(oa, oda, a, da, pPercent) * Constants.DegreesToRadians, Vector3.UnitZ) *
         Quaternion.FromEulerAnglesInDegrees(-16 * Methods.LinearStep(oda, da, pPercent), 0.0, 0.0);
 }
Ejemplo n.º 2
0
 public void Draw(Double pPercent)
 {
     Node.Position = new Vector3(
         cameraOffset.x + Methods.CubicStep(x[framesBehind], dx[framesBehind], x[framesBehind - 1], dx[framesBehind - 1], pPercent),
         cameraOffset.y + Methods.CubicStep(y[framesBehind], dy[framesBehind], y[framesBehind - 1], dy[framesBehind - 1], pPercent),
         cameraOffset.z + 32 * Methods.LinearStep(target.OldVelocity.LengthSquared, target.Velocity.LengthSquared, pPercent));
     Node.LookAt(new Vector3(
                     Methods.CubicStep(x[framesBehind / 2 + 1], dx[framesBehind / 2 + 1], x[framesBehind / 2], dx[framesBehind / 2], pPercent),
                     Methods.CubicStep(y[framesBehind / 2 + 1], dy[framesBehind / 2 + 1], y[framesBehind / 2], dy[framesBehind / 2], pPercent),
                     0), TransformSpace.Parent);
 }