APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.graphics.g3d.model

public Class NodePart

extends Object
Class Inheritance
Imports
com.badlogic.gdx.graphics.g3d.Material, .Model, .ModelInstance, .Renderable, com.badlogic.gdx.math.Matrix4, com.badlogic.gdx.utils.ArrayMap

A combination of MeshPart and Material, used to represent a Node's graphical properties. A NodePart is the smallest visible part of a Model, each NodePart implies a render call.
Author
badlogic, Xoppa

Field Summary

Modifier and TypeField and Description
public Matrix4[]
bones

The current transformation (relative to the bind pose) of each bone, may be null.

public boolean
enabled

true by default.

public ArrayMap<Node, Matrix4>
invBoneBindTransforms

Mapping to each bone (node) and the inverse transform of the bind pose.

public Material
material

The Material used to render the meshPart.

public MeshPart
meshPart

The MeshPart (shape) to render.

Constructor Summary

AccessConstructor and Description
public
NodePart()

Construct a new NodePart with null values.

public
NodePart(final MeshPart
The MeshPart to reference.
meshPart
,
final Material
The Material to reference.
material
)

Construct a new NodePart referencing the provided MeshPart and Material.

Method Summary

Modifier and TypeMethod and Description
public NodePart
copy()

protected NodePart
set(NodePart other)

public Renderable
setRenderable(final Renderable
The Renderable of which to set the members to the values of this NodePart.
out
)

Convenience method to set the material, mesh, meshPartOffset, meshPartSize, primitiveType and bones members of the specified Renderable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bonesback to summary
public 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 ModelInstance#calculateTransforms(). Do not set or change this value manually.

enabledback to summary
public boolean enabled

true by default. If set to false, this part will not participate in rendering and bounding box calculation.

invBoneBindTransformsback to summary
public ArrayMap<Node, 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.

materialback to summary
public Material material

The Material used to render the meshPart. Must not be null.

meshPartback to summary
public MeshPart meshPart

The MeshPart (shape) to render. Must not be null.

Constructor Detail

NodePartback to summary
public NodePart()

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.

NodePartback to summary
public NodePart(final MeshPart meshPart, final Material material)

Construct a new NodePart referencing the provided MeshPart and Material.

Parameters
meshPart:MeshPart

The MeshPart to reference.

material:Material

The Material to reference.

Method Detail

copyback to summary
public NodePart copy()
setback to summary
protected NodePart set(NodePart other)
setRenderableback to summary
public Renderable setRenderable(final Renderable out)

Convenience method to set the material, mesh, meshPartOffset, meshPartSize, primitiveType and bones members of the specified Renderable. The other member of the provided Renderable 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:Renderable

The Renderable of which to set the members to the values of this NodePart.