Example #1
0
		public void RotateAround(double angleZ, double angleY, double miliseconds, CameraTransformHandler callback, CameraTransformHandler stepCallback)
		{
			ParamTimer tmr = new ParamTimer(Interval);
			tmr.DictParams["timer"] = tmr;
			tmr.DictParams["timeremains"] = miliseconds;
			tmr.DictParams["stepy"] = angleY / miliseconds * Interval;
			tmr.DictParams["stepz"] = angleZ / miliseconds * Interval;
			tmr.DictParams["stepcallback"] = stepCallback;
			tmr.DictParams["callback"] = callback;
			tmr.DictParams["$proceed"] = new ThreadViewport3D.VoidDictInvokes(ProceedRotate);
			tmr.Elapsed += new ElapsedEventHandler(tmr_Elapsed);
			tmr.Start();
		}
Example #2
0
		public void Offset(Vector3D targetPos, Point3D? lookAt, double millisecond, CameraTransformHandler callback, CameraTransformHandler stepCallback)
		{
			double ratio = Interval / millisecond;
			ParamTimer tmr = new ParamTimer(Interval);

			tmr.DictParams["step"] = new Vector3D(targetPos.X*ratio, targetPos.Y*ratio, targetPos.Z*ratio);
			tmr.DictParams["timer"] = tmr;
			tmr.DictParams["timeremains"] = millisecond;
			tmr.DictParams["lookat"] = lookAt;
			tmr.DictParams["callback"] = callback;
			tmr.DictParams["stepcallback"] = stepCallback;
			tmr.DictParams["$proceed"] = new ThreadViewport3D.VoidDictInvokes(ProceedOffset);
			tmr.Elapsed += new ElapsedEventHandler(tmr_Elapsed);
			tmr.Start();
		}
Example #3
0
		public FrequentMessage(ElapsedEventHandler processor, DictParams paramlist, int priority, bool parallel) : base(null, paramlist, priority, parallel)
		{
			elapsedProcessor = processor;
			msgTimer = new ParamTimer(vInterval);
			msgTimer.Param = this;
			msgTimer.DictParams = paramlist;
			msgTimer.Enabled = false;
		}