public CFrustum(CCameraData cam) { mCamData = cam; mPlNear = new CPlane(); mPlFar = new CPlane(); mPlLeft = new CPlane(); mPlRight = new CPlane(); mPlTop = new CPlane(); mPlBottom = new CPlane(); }
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(); }