예제 #1
0
 public CFrustum(CCameraData cam)
 {
     mCamData  = cam;
     mPlNear   = new CPlane();
     mPlFar    = new CPlane();
     mPlLeft   = new CPlane();
     mPlRight  = new CPlane();
     mPlTop    = new CPlane();
     mPlBottom = new CPlane();
 }
예제 #2
0
파일: Camera.cs 프로젝트: sty1822/FbxViewer
        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();
        }