CameraTools.Detail.AABRectForOnScreenArea.Calculate C# (CSharp) 메소드

Calculate() 공개 메소드

public Calculate ( ) : void
리턴 void
        public void Calculate()
        {
            // Get current extreme points (points in floor in screen corners)
            Vector3 currentBottomLeft = CameraManager.GetPointInFloorFromScreenPoint(new Vector3(0, 0, 0));
            Vector3 currentBottomRight = CameraManager.GetPointInFloorFromScreenPoint(new Vector3(Screen.width, 0, 0));
            Vector3 currentTopLeft = CameraManager.GetPointInFloorFromScreenPoint(new Vector3(0, Screen.height, 0));
            Vector3 currentTopRight = CameraManager.GetPointInFloorFromScreenPoint(new Vector3(Screen.width, Screen.height, 0));

            // Get the AAB rect for the extreme points
            minX = Mathf.Min(currentBottomLeft.x, currentBottomRight.x, currentTopLeft.x, currentTopRight.x);
            maxX = Mathf.Max(currentBottomLeft.x, currentBottomRight.x, currentTopLeft.x, currentTopRight.x);
            minZ = Mathf.Min(currentBottomLeft.z, currentBottomRight.z, currentTopLeft.z, currentTopRight.z);
            maxZ = Mathf.Max(currentBottomLeft.z, currentBottomRight.z, currentTopLeft.z, currentTopRight.z);
        }