Class PolygonMesh


  • public final class PolygonMesh
    extends java.lang.Object
    3D polygon mesh that consists of vertex, edge, and face data; texture information, and animations. Meshes are typically loaded from model files created using 3D modeling software, though it is also possible to generate simple meshes programmatically.

    A mesh cannot directly be added to the stage, it only contains the data. However, the mesh can be used to create models, which are instances that use the mesh data and can be displayed.

    A mesh can be identified by ID or by name. The ID is unique and used by the renderer to identify the mesh. The name is the mesh's human readable name, and does not necessarily have to be unique.

    • Constructor Detail

      • PolygonMesh

        public PolygonMesh​(java.util.UUID id,
                           java.lang.String name,
                           java.util.List<AnimationInfo> animations)
      • PolygonMesh

        public PolygonMesh​(java.lang.String name,
                           java.util.List<AnimationInfo> animations)
    • Method Detail

      • getId

        public java.util.UUID getId()
      • getName

        public java.lang.String getName()
      • addAnimation

        public void addAnimation​(AnimationInfo anim)
      • getAnimation

        public AnimationInfo getAnimation​(java.lang.String name)
      • getAnimations

        public java.util.Set<AnimationInfo> getAnimations()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object