Record Class CachedMorphMesh

java.lang.Object
java.lang.Record
dev.gothickit.zenkit.mmb.CachedMorphMesh
All Implemented Interfaces:
CacheableObject<CachedMorphMesh>, MorphMesh

public record CachedMorphMesh(@NotNull String name, @Nullable MultiResolutionMesh mesh, @NotNull Vec3f @NotNull [] morphPositions, @NotNull List<@NotNull MorphAnimation> animations, @NotNull List<@NotNull MorphSource> sources) extends Record implements MorphMesh
  • Constructor Details

    • CachedMorphMesh

      public CachedMorphMesh(@NotNull @NotNull String name, @Nullable @Nullable MultiResolutionMesh mesh, @NotNull @NotNull Vec3f @NotNull [] morphPositions, @NotNull @NotNull List<@NotNull MorphAnimation> animations, @NotNull @NotNull List<@NotNull MorphSource> sources)
      Creates an instance of a CachedMorphMesh record class.
      Parameters:
      name - the value for the name record component
      mesh - the value for the mesh record component
      morphPositions - the value for the morphPositions record component
      animations - the value for the animations record component
      sources - the value for the sources record component
  • Method Details

    • animationCount

      public long animationCount()
      Specified by:
      animationCount in interface MorphMesh
    • animation

      @Nullable public @Nullable MorphAnimation animation(long i)
      Specified by:
      animation in interface MorphMesh
    • sourceCount

      public long sourceCount()
      Specified by:
      sourceCount in interface MorphMesh
    • source

      @Nullable public @Nullable MorphSource source(long i)
      Specified by:
      source in interface MorphMesh
    • cache

      @NotNull public @NotNull CachedMorphMesh cache()
      Specified by:
      cache in interface CacheableObject<CachedMorphMesh>
    • isCached

      public boolean isCached()
      Specified by:
      isCached in interface CacheableObject<CachedMorphMesh>
    • 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.
    • name

      @NotNull public @NotNull String name()
      Returns the value of the name record component.
      Specified by:
      name in interface MorphMesh
      Returns:
      the value of the name record component
    • mesh

      @Nullable public @Nullable MultiResolutionMesh mesh()
      Returns the value of the mesh record component.
      Specified by:
      mesh in interface MorphMesh
      Returns:
      the value of the mesh record component
    • morphPositions

      @NotNull public @NotNull Vec3f @NotNull [] morphPositions()
      Returns the value of the morphPositions record component.
      Specified by:
      morphPositions in interface MorphMesh
      Returns:
      the value of the morphPositions record component
    • animations

      @NotNull public @NotNull List<@NotNull MorphAnimation> animations()
      Returns the value of the animations record component.
      Specified by:
      animations in interface MorphMesh
      Returns:
      the value of the animations record component
    • sources

      @NotNull public @NotNull List<@NotNull MorphSource> sources()
      Returns the value of the sources record component.
      Specified by:
      sources in interface MorphMesh
      Returns:
      the value of the sources record component