Class LightProbe


  • public class LightProbe
    extends java.lang.Object
    Loads "light probe" data needed for Image Based Lighting. This includes a cubemap with mip maps generated to match the lighting model used by Sceneform and Spherical Harmonics coefficients for diffuse image based lighting.
    • Method Detail

      • builder

        public static LightProbe.Builder builder()
        Constructs a default LightProbe, if nothing else is set
      • setIntensity

        public void setIntensity​(float intensity)
        Set the overall intensity of the indirect light.
        Parameters:
        intensity - the intensity of indirect lighting, the default is 220.0
      • getIntensity

        public float getIntensity()
        Get the overall intensity of the indirect light.
      • setRotation

        public void setRotation​(@Nullable
                                Quaternion rotation)
        Sets the rotation of the indirect light.
        Parameters:
        rotation - the rotation of the indirect light, identity when null
      • getRotation

        @Nullable
        public Quaternion getRotation()
        Gets the rotation of the indirect light, identity if null.
      • isReady

        public boolean isReady()
        Returns true if the LightProbe is ready to be used for rendering.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • dispose

        public void dispose()
      • setEnvironmentalHdrSphericalHarmonics

        public void setEnvironmentalHdrSphericalHarmonics​(float[] sphericalHarmonics,
                                                          float exposure,
                                                          EnvironmentalHdrParameters environmentalHdrParameters)
        Updates spherical harmonics with values not premultiplied by the SH basis.
      • setLightEstimate

        public void setLightEstimate​(Color colorCorrection,
                                     float estimate)
        Modify light intensity using ArCore light estimation. ArCore light estimation is not compatible with Environmental HDR, only one may be used.
      • setCubeMap

        public void setCubeMap​(android.media.Image[] cubemapImageArray)