java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.client.render.entity.renderers.assimp.Scene

public record Scene(Node rootNode, List<Material> materials, List<Mesh> meshes, List<Animation> animations) extends Record
  • Constructor Details

    • Scene

      public Scene(Node rootNode, List<Material> materials, List<Mesh> meshes, List<Animation> animations)
      Creates an instance of a Scene record class.
      Parameters:
      rootNode - the value for the rootNode record component
      materials - the value for the materials record component
      meshes - the value for the meshes record component
      animations - the value for the animations record component
  • Method Details

    • getAnimationOrDefault

      public Animation getAnimationOrDefault(String name, String defaultName)
    • getAnimation

      public Animation getAnimation(String name)
    • getGlobalTransform

      public org.joml.Matrix4f getGlobalTransform(String node)
    • getNode

      public Node getNode(String name)
    • createBoneWorldTransform

      public org.joml.Matrix4f createBoneWorldTransform(RenderContext context, Scene scene, Mesh mesh, Animation animation, Node currentNode, org.joml.Matrix4f parentTransform, Node targetNode)
    • fromAssimp

      public static Scene fromAssimp(org.lwjgl.assimp.AIScene scene)
    • fromAssimp

      public static Scene fromAssimp(org.lwjgl.assimp.AIScene scene, net.minecraft.resources.ResourceLocation backupTexture)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • rootNode

      public Node rootNode()
      Returns the value of the rootNode record component.
      Returns:
      the value of the rootNode record component
    • materials

      public List<Material> materials()
      Returns the value of the materials record component.
      Returns:
      the value of the materials record component
    • meshes

      public List<Mesh> meshes()
      Returns the value of the meshes record component.
      Returns:
      the value of the meshes record component
    • animations

      public List<Animation> animations()
      Returns the value of the animations record component.
      Returns:
      the value of the animations record component