public static RenderMover GenerateHopMover(Vector3 la, Vector3 lb, Vector3 lc, float time, RenderMover next) { float ti = 1.0f/time; float t2i2 = 2.0f*ti*ti; return new HopMover( t2i2*(la.X+lc.X-2.0f*lb.X), t2i2*(la.Y+lc.Y-2.0f*lb.Y), t2i2*(la.Z+lc.Z-2.0f*lb.Z), ti*(4.0f*lb.X-3.0f*la.X-lc.X), ti*(4.0f*lb.Y-3.0f*la.Y-lc.Y), ti*(4.0f*lb.Z-3.0f*la.Z-lc.Z), la.X, la.Y, la.Z, time, getNext(next,lc)).RenderMover; }
public static RenderMover GenerateHopMover(Vector3 la, Vector3 lb, float time, RenderMover next) { float t2i2 = 1.0f/time; t2i2 *= t2i2; return new HopMover( t2i2*(lb.X-la.X), t2i2*(lb.Y-la.Y-time), t2i2*(lb.Z-la.Z), 0.0f, 1.0f, 0.0f, la.X, la.Y, la.Z, time, getNext(next,lb)).RenderMover; }
public static RenderMover GenerateWaitMover(float time, Vector3 loc, RenderMover next) { return new WaitMover(loc,getNext(next,loc),time).RenderMover; }
public static RenderMover GenerateMoveMover(Vector3 la, Vector3 lb, float speed, RenderMover next) { return new MoveMover(la.X,la.Y,la.Z,lb.X,lb.Y,lb.Z,speed/(lb-la).Length,getNext(next,lb)).RenderMover; }
public static RenderMover GenerateEventWaitMover(Vector3 loc, EventHandler e, RenderMover next) { return new EventWaitMover(loc,e,getNext(next,loc)).RenderMover; }
public WaitMover(Vector3 loc, RenderMover next, float time) { this.v = loc; this.time = time; this.next = next; }
public MoveMover(float xa, float ya, float za, float xb, float yb, float zb, float factor, RenderMover next) { this.xa = xa; this.ya = ya; this.za = za; this.xb = xb; this.yb = yb; this.zb = zb; this.factor = factor; this.next = next; }
public HopMover(float ax_2, float ay_2, float az_2, float vx, float vy, float vz, float x, float y, float z, float dt, RenderMover next, float ft, float ot) : this(ax_2,ay_2,az_2,vx,vy,vz,x,y,z,dt,next) { this.ft = ft; this.ot = ot; }
public HopMover(float ax_2, float ay_2, float az_2, float vx, float vy, float vz, float x, float y, float z, float dt, RenderMover next) { this.ax_2 = ax_2; this.ay_2 = ay_2; this.az_2 = az_2; this.vx = vx; this.vy = vy; this.vz = vz; this.x = x; this.y = y; this.z = z; this.dt = dt; this.ft = 1.0f; this.ot = 0.0f; this.next = next; }
public EventWaitMover(Vector3 loc, EventHandler e, RenderMover next) { this.loc = loc; e += new EventHandler(event_activated); this.next = next; }
private static RenderMover getNext(RenderMover next, Vector3 v) { if(next == null) { return new StaticMover(v).RenderMover; } else { return next; } }