/// <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))); } }
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)); }
public L2DPhysics() { HRESULT.Check(NativeMethods.CreatePhysics(out _Handle)); startTimeMSec = L2DUtility.GetUserTimeMSec(); _IsLoaded = true; }
public void UpdateParam(L2DModel model) { HRESULT.Check(NativeMethods.PhysicsUpdate(new IntPtr(Handle), new IntPtr(model.Handle), L2DUtility.GetUserTimeMSec() - startTimeMSec)); }