public abstract class Model extends TreeNode<Model> implements java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
int |
blendDFactor |
int |
blendSFactor |
MatrixStack |
matrix
The transformation matrix.
|
java.lang.String |
name
The name of the model
|
| Constructor and Description |
|---|
Model()
Creates unnamed model.
|
Model(java.lang.String name)
Creates named model.
|
| Modifier and Type | Method and Description |
|---|---|
Model |
clone() |
Model |
combineChildren(java.lang.String newModelName,
java.util.function.Predicate<Model> predicate)
Combines child models with names into one model with its children being the children selected.
|
Model |
combineChildren(java.lang.String newModelName,
java.lang.String... names)
Combines child models with names into one model with its children being the children selected.
|
java.util.Set<Model> |
flatten() |
abstract java.util.Set<Model> |
flatten(MatrixStack matrixStack)
Flattens the model into a set of models with no additional transformations,
applying all the transformations into the individual vertices.
|
protected abstract Model |
newModel(java.lang.String name) |
java.lang.String |
toString() |
addChild, children, descendants, exists, getParent, hierarchy, iterator, removeChild, setParent, spliterator, streampublic final java.lang.String name
public MatrixStack matrix
public int blendSFactor
public int blendDFactor
public Model(java.lang.String name)
name - to be used.public Model()
public java.util.Set<Model> flatten()
public abstract java.util.Set<Model> flatten(MatrixStack matrixStack)
matrixStack - transformation matrix.public Model combineChildren(java.lang.String newModelName, java.lang.String... names)
newModelName - The new name for the modelnames - The names of the child modelspublic Model combineChildren(java.lang.String newModelName, java.util.function.Predicate<Model> predicate)
newModelName - The new name for the modelpredicate - The condition to select childrenprotected abstract Model newModel(java.lang.String name)
public Model clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object