Class PolygonMesh
- java.lang.Object
-
- nl.colorize.multimedialib.graphics.PolygonMesh
-
public final class PolygonMesh extends java.lang.Object3D 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 Summary
Constructors Constructor Description PolygonMesh(java.lang.String name, java.util.List<AnimationInfo> animations)PolygonMesh(java.util.UUID id, java.lang.String name, java.util.List<AnimationInfo> animations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnimation(AnimationInfo anim)PolygonModelcreateModel()booleanequals(java.lang.Object o)AnimationInfogetAnimation(java.lang.String name)java.util.Set<AnimationInfo>getAnimations()java.util.UUIDgetId()java.lang.StringgetName()inthashCode()java.lang.StringtoString()
-
-
-
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()
-
createModel
public PolygonModel createModel()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-