예제 #1
0
    // Update is called once per frame
    void Update()
    {
        if (_menu.activeSelf)
        {
            _skyColorImage.color = _lightingManager.GetSkyColor();
            _sunColorImage.color = _lightingManager.GetSunColor();

            Vector3 skyIrr = _lightingManager.GetSkyIrradiance();
            Vector3 sunIrr = _lightingManager.GetSunIrradiance();


            _skyIrrRText.text = skyIrr.x.ToString("00.00");
            _skyIrrGText.text = skyIrr.y.ToString("00.00");
            _skyIrrBText.text = skyIrr.z.ToString("00.00");
            _sunIrrRText.text = sunIrr.x.ToString("00.00");
            _sunIrrGText.text = sunIrr.y.ToString("00.00");
            _sunIrrBText.text = sunIrr.z.ToString("00.00");

            SunPos sunPos = _lightingManager.GetSunPos();
            _sunDirAz.text  = sunPos.az.ToString("000.0");
            _sunDirZen.text = sunPos.zen.ToString("000.0");

            _skyNbrLightsText.text = _lightingManager.GetNbrSkyDomeLights().ToString();


            _arKitLightEstText.text   = _arkitLightEstimation.GetARKitLightEstimationIntensity().ToString();
            _arKitLightEstImage.color = _arkitLightEstimation.GetARKitLightEstimationColor();
        }
    }
예제 #2
0
 private void Start()
 {
     if (_automaticSunDirection)
     {
         _sunPosition = ReadSunPositionValues();
         Debug.Log("Zenith: " + _sunPosition.zen.ToString() + "\nAzimuth:" + _sunPosition.az.ToString());
         SetSunDirectionZenith(_sunPosition.zen, _sunPosition.az);
     }
 }
예제 #3
0
    public Vector3 ComputeS(SunPos sunPos)
    {
        Vector3 s = Vector3.zero;

        s.z = Mathf.Cos(sunPos.az * Mathf.Deg2Rad);
        s.x = Mathf.Sin(sunPos.az * Mathf.Deg2Rad);

        s.y = Mathf.Cos(sunPos.zen * Mathf.Deg2Rad);

        s.Normalize();

        return(s);
    }
예제 #4
0
    private Vector3 ComputeS()
    {
        SunPos sunPos = _sunManager.GetSunPosition();

        return(ComputeS(sunPos));
    }