Class IntNodePart

java.lang.Object
gaiasky.util.gdx.model.IntNodePart

public class IntNodePart
extends java.lang.Object
A combination of IntMeshPart and Material, used to represent a IntNode's graphical properties. A NodePart is the smallest visible part of a IntModel, each NodePart implies a render call.
  • Field Summary

    Fields
    Modifier and Type Field Description
    com.badlogic.gdx.math.Matrix4[] bones
    The current transformation (relative to the bind pose) of each bone, may be null.
    boolean enabled
    true by default.
    com.badlogic.gdx.utils.ArrayMap<IntNode,​com.badlogic.gdx.math.Matrix4> invBoneBindTransforms
    Mapping to each bone (node) and the inverse transform of the bind pose.
    com.badlogic.gdx.graphics.g3d.Material material
    The Material used to render the meshPart.
    IntMeshPart meshPart
    The MeshPart (shape) to render.
  • Constructor Summary

    Constructors
    Constructor Description
    IntNodePart()
    Construct a new NodePart with null values.
    IntNodePart​(IntMeshPart meshPart, com.badlogic.gdx.graphics.g3d.Material material)
    Construct a new NodePart referencing the provided IntMeshPart and Material.
  • Method Summary

    Modifier and Type Method Description
    IntNodePart copy()  
    protected IntNodePart set​(IntNodePart other)  
    IntRenderable setRenderable​(IntRenderable out)
    Convenience method to set the material, mesh, meshPartOffset, meshPartSize, primitiveType and bones members of the specified Renderable.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • meshPart

      public IntMeshPart meshPart
      The MeshPart (shape) to render. Must not be null.
    • material

      public com.badlogic.gdx.graphics.g3d.Material material
      The Material used to render the meshPart. Must not be null.
    • invBoneBindTransforms

      public com.badlogic.gdx.utils.ArrayMap<IntNode,​com.badlogic.gdx.math.Matrix4> invBoneBindTransforms
      Mapping to each bone (node) and the inverse transform of the bind pose. Will be used to fill the bones array. May be null.
    • bones

      public com.badlogic.gdx.math.Matrix4[] bones
      The current transformation (relative to the bind pose) of each bone, may be null. When the part is skinned, this will be updated by a call to IntModelInstance.calculateTransforms(). Do not set or change this value manually.
    • enabled

      public boolean enabled
      true by default. If set to false, this part will not participate in rendering and bounding box calculation.
  • Constructor Details

    • IntNodePart

      public IntNodePart()
      Construct a new NodePart with null values. At least the meshPart and material member must be set before the newly created part can be used.
    • IntNodePart

      public IntNodePart​(IntMeshPart meshPart, com.badlogic.gdx.graphics.g3d.Material material)
      Construct a new NodePart referencing the provided IntMeshPart and Material.
      Parameters:
      meshPart - The MeshPart to reference.
      material - The Material to reference.
  • Method Details

    • setRenderable

      public IntRenderable setRenderable​(IntRenderable out)
      Convenience method to set the material, mesh, meshPartOffset, meshPartSize, primitiveType and bones members of the specified Renderable. The other member of the provided IntRenderable remain untouched. Note that the material, mesh and bones members are referenced, not copied. Any changes made to those objects will be reflected in both the NodePart and Renderable object.
      Parameters:
      out - The Renderable of which to set the members to the values of this NodePart.
    • copy

      public IntNodePart copy()
    • set

      protected IntNodePart set​(IntNodePart other)