com.supermap.ar.areffect

Class ARGltfElement



  • public class ARGltfElement
    extends AREffectElement
    AR special object - Gltf model
    • Constructor Detail

      • ARGltfElement

        public ARGltfElement(android.content.Context context)
        The constructor.
        Parameters:
        context -
    • Method Detail

      • getRenderable

        public Renderable getRenderable()
      • loadModel

        public void loadModel(java.lang.String resourceUri)
        Loads model

        Mobile phone local file path or online address

        Parameters:
        resourceUri -
      • loadModel

        public void loadModel(Gltf gltf)
        Loads model

        Instance built by Gltf

        Parameters:
        gltf -
      • loadModel

        public void loadModel(int resourceId)
        Loads model

        Resources need to be placed in the resource/raw/ directory

        Parameters:
        resourceId -
      • reLoadModel

        public void reLoadModel()
        Loads models again
      • getGltfModel

        public Gltf getGltfModel()
        Get the GLTF instance

        Only valid after #setGltfModel(Gltf) is set。

        Returns:
      • setGltfModel

        public void setGltfModel(Gltf gltfModel)
        Set up the GLTF instance
        Parameters:
        gltfModel -
      • setShadowCaster

        public void setShadowCaster(boolean flag)
        Sets whether shadows can be cast in the scene
        Overrides:
        setShadowCaster in class AREffectElement
        Parameters:
        flag -
      • setShadowReceiver

        public void setShadowReceiver(boolean flag)
        Sets whether shadows cast on this instance by other elements can be rendered
        Overrides:
        setShadowReceiver in class AREffectElement
        Parameters:
        flag -