示例#1
0
 /// <summary>
 /// 자동 호흡 렌더링을 갱신합니다.
 /// BeginRender() 함수와 EndRender() 함수 사이에서 호출되어야 합니다.
 /// </summary>
 public void UpdateBreath()
 {
     if (Model != null && Model.UseBreath)
     {
         double t = (L2DUtility.GetUserTimeMSec() / 1000.0) * 2 * 3.14;
         Model.SetParamFloat("PARAM_BREATH", (float)(0.5f + 0.5f * Math.Sin(t / 3.2345)));
     }
 }
示例#2
0
        public override void Rendering()
        {
            double t     = (L2DUtility.GetUserTimeMSec() / 1000.0) * 2 * 3.14;
            double cycle = 1.0;
            double value = Math.Sin(t / cycle);

            Model.SetParamFloat("PARAM_ANGLE_X", (float)(30 * value));
        }
示例#3
0
 public L2DPhysics()
 {
     HRESULT.Check(NativeMethods.CreatePhysics(out _Handle));
     startTimeMSec = L2DUtility.GetUserTimeMSec();
     _IsLoaded     = true;
 }
示例#4
0
 public void UpdateParam(L2DModel model)
 {
     HRESULT.Check(NativeMethods.PhysicsUpdate(new IntPtr(Handle), new IntPtr(model.Handle), L2DUtility.GetUserTimeMSec() - startTimeMSec));
 }