Class Renderable

    • Method Detail

      • getMaterial

        public Material getMaterial()
        Returns the material bound to the first submesh.
      • getMaterial

        public Material getMaterial​(int submeshIndex)
        Returns the material bound to the specified submesh.
      • setMaterial

        public void setMaterial​(Material material)
        Sets the material bound to the first submesh.
      • setMaterial

        public void setMaterial​(int submeshIndex,
                                Material material)
        Sets the material bound to the specified submesh.
      • getSubmeshName

        public java.lang.String getSubmeshName​(int submeshIndex)
        Returns the name associated with the specified submesh.
        Throws:
        java.lang.IllegalArgumentException - if the index is out of range
      • getRenderPriority

        public int getRenderPriority()
        Get the render priority that controls the order of rendering. The priority is between a range of 0 (rendered first) and 7 (rendered last). The default value is 4.
      • setRenderPriority

        public void setRenderPriority​(@IntRange(from=0L,to=7L)
                                      int renderPriority)
        Set the render priority to control the order of rendering. The priority is between a range of 0 (rendered first) and 7 (rendered last). The default value is 4.
      • isShadowCaster

        public boolean isShadowCaster()
        Returns true if configured to cast shadows on other renderables.
      • setShadowCaster

        public void setShadowCaster​(boolean isShadowCaster)
        Sets whether the renderable casts shadow on other renderables in the scene.
      • isShadowReceiver

        public boolean isShadowReceiver()
        Returns true if configured to receive shadows cast by other renderables.
      • setShadowReceiver

        public void setShadowReceiver​(boolean isShadowReceiver)
        Sets whether the renderable receives shadows cast by other renderables in the scene.
      • getAnimationFrameRate

        public int getAnimationFrameRate()
        Gets the number of frames per seconds defined in the asset animation.
      • getSubmeshCount

        public int getSubmeshCount()
        Returns the number of submeshes that this renderable has. All Renderables have at least one.
      • makeCopy

        public abstract Renderable makeCopy()
        Creates a new instance of this Renderable.

        The new renderable will have unique copy of all mutable state. All materials referenced by the Renderable will also be instanced. Immutable data will be shared between the instances.

      • getFinalModelMatrix

        public Matrix getFinalModelMatrix​(Matrix originalMatrix)
        Gets the final model matrix to use for rendering this Renderable based on the matrix passed in. Default implementation simply passes through the original matrix. WARNING: Do not modify the originalMatrix! If the final matrix isn't the same as the original matrix, then a new instance must be returned.