java.lang.Object
nl.colorize.multimedialib.renderer.libgdx.GDXModel
All Implemented Interfaces:
Mesh, StageNode3D

public class GDXModel extends Object implements Mesh
  • Constructor Details

    • GDXModel

      protected GDXModel(com.badlogic.gdx.graphics.g3d.ModelInstance modelInstance)
    • GDXModel

      protected GDXModel(com.badlogic.gdx.graphics.g3d.Model model)
  • Method Details

    • animate

      public void animate(Timer animationTimer)
      Description copied from interface: StageNode3D
      Called by the renderer at the end of frame updates, while rendering the stage. animationTimer contains the elapsed time since the currently active scene was started. This allows animations to display correctly, without the need to update every single node during each frame update.
      Specified by:
      animate in interface StageNode3D
    • applyColor

      public void applyColor(ColorRGB color)
      Specified by:
      applyColor in interface Mesh
    • applyTexture

      public void applyTexture(Image texture)
      Specified by:
      applyTexture in interface Mesh
    • applyDynamicTexture

      public void applyDynamicTexture(Sprite sprite)
      Specified by:
      applyDynamicTexture in interface Mesh
    • copy

      public Mesh copy()
      Description copied from interface: Mesh
      Creates a copy of this mesh, which will use the same geometry, materials, textures, and animations as this mesh. The copy is not yet added to the stage.
      Specified by:
      copy in interface Mesh
    • getModelInstance

      protected com.badlogic.gdx.graphics.g3d.ModelInstance getModelInstance()
    • getTransform

      public Transform3D getTransform()
      Description copied from interface: StageNode3D
      Returns this node's local transform, which is interpreted relative to its parent node. The local transform can be modified by application code to modify how and where the node is displayed.
      Specified by:
      getTransform in interface StageNode3D
    • getGlobalTransform

      public Transform3D getGlobalTransform()
      Description copied from interface: StageNode3D
      Returns this node's global transform, which is interpreted relative to the stage. The global transform is updated by the renderer when drawing the stage at the end of frame updates. Recalculating the global transform is relatively expensive, and is therefore only done once per frame. This means that any changes made to a node's local transform since the last frame update may not yet been reflected in the current state of its global transform.
      Specified by:
      getGlobalTransform in interface StageNode3D
    • getDynamicTexture

      public Sprite getDynamicTexture()
      Description copied from interface: Mesh
      If this mesh is currently using a dynamic texture, returns the sprite that is used as its source. Returns null if this mesh is not using a dynamic texture.
      Specified by:
      getDynamicTexture in interface Mesh