public void Reset(CCameraDiscription disc) { if (disc == null) { disc = new CCameraDiscription(); } Position = new Vector3(disc.Position); LookAt = new Vector3(disc.LookAt); mCamData = new CCameraData(); mCamData.FOV = disc.FOV; mCamData.Up = Vector3.UnitZ; mCamData.Far = disc.Far; mCamData.Near = disc.Near; mDefaultPos2LookAt = (Position - LookAt).Length; mFrustum = new CFrustum(mCamData); CalcViewMatrix(); }
public CCamera(CCameraDiscription disc) { Reset(disc); }