Record Class CachedSoftSkinMesh

java.lang.Object
java.lang.Record
dev.gothickit.zenkit.ssm.CachedSoftSkinMesh
All Implemented Interfaces:
CacheableObject<CachedSoftSkinMesh>, SoftSkinMesh

public record CachedSoftSkinMesh(@Nullable MultiResolutionMesh mesh, @NotNull List<@NotNull OrientedBoundingBox> boundingBoxes, @NotNull List<@NotNull SoftSkinWeightEntry[]> weights, @NotNull SoftSkinWedgeNormal @NotNull [] wedgeNormals, int[] nodes) extends Record implements SoftSkinMesh
  • Constructor Details

    • CachedSoftSkinMesh

      public CachedSoftSkinMesh(@Nullable @Nullable MultiResolutionMesh mesh, @NotNull @NotNull List<@NotNull OrientedBoundingBox> boundingBoxes, @NotNull @NotNull List<@NotNull SoftSkinWeightEntry[]> weights, @NotNull @NotNull SoftSkinWedgeNormal @NotNull [] wedgeNormals, int[] nodes)
      Creates an instance of a CachedSoftSkinMesh record class.
      Parameters:
      mesh - the value for the mesh record component
      boundingBoxes - the value for the boundingBoxes record component
      weights - the value for the weights record component
      wedgeNormals - the value for the wedgeNormals record component
      nodes - the value for the nodes record component
  • Method Details

    • nodeCount

      public long nodeCount()
      Specified by:
      nodeCount in interface SoftSkinMesh
    • bbox

      @Nullable public @Nullable OrientedBoundingBox bbox(long node)
      Specified by:
      bbox in interface SoftSkinMesh
    • weights

      @NotNull public @NotNull SoftSkinWeightEntry @Nullable [] weights(long node)
      Specified by:
      weights in interface SoftSkinMesh
    • cache

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

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

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

      @NotNull public @NotNull List<@NotNull OrientedBoundingBox> boundingBoxes()
      Returns the value of the boundingBoxes record component.
      Specified by:
      boundingBoxes in interface SoftSkinMesh
      Returns:
      the value of the boundingBoxes record component
    • weights

      @NotNull public @NotNull List<@NotNull SoftSkinWeightEntry[]> weights()
      Returns the value of the weights record component.
      Specified by:
      weights in interface SoftSkinMesh
      Returns:
      the value of the weights record component
    • wedgeNormals

      @NotNull public @NotNull SoftSkinWedgeNormal @NotNull [] wedgeNormals()
      Returns the value of the wedgeNormals record component.
      Specified by:
      wedgeNormals in interface SoftSkinMesh
      Returns:
      the value of the wedgeNormals record component
    • nodes

      public int[] nodes()
      Returns the value of the nodes record component.
      Specified by:
      nodes in interface SoftSkinMesh
      Returns:
      the value of the nodes record component