public class LXModelBuilder extends Object
LXModel
in the amount of functionality exported, with only the components needed
for construction. It is mutable up until the moment it has been converted
into a model, at which point no further modifications are allowed.Constructor and Description |
---|
LXModelBuilder()
Construct a model-builder with the default model key
|
LXModelBuilder(String... keys)
Construct a model-builder with the given set of model keys
|
Modifier and Type | Method and Description |
---|---|
LXModelBuilder |
addChild(LXModelBuilder child)
Add a child builder to this model.
|
LXModelBuilder |
addKey(String key)
Add a key to the list of this model's key types
|
LXModelBuilder |
addOutput(LXOutput output)
Add a output to this model
|
LXModelBuilder |
addPoint(LXPoint p)
Add a point to the model
|
LXModelBuilder |
addPoints(LXPoint... points)
Add a list of points to the model
|
LXModelBuilder |
setKeys(String... keys)
Set the model type keys array
|
int[] |
toIndexBuffer()
Converts this builder into an index buffer of all its points
|
LXModel |
toModel()
Converts the builder into an immutable model
|
public LXModelBuilder()
public LXModelBuilder(String... keys)
keys
- Model type keyspublic LXModelBuilder addKey(String key)
key
- Model key typepublic LXModelBuilder setKeys(String... keys)
keys
- Key typespublic LXModelBuilder addPoint(LXPoint p)
p
- Pointpublic LXModelBuilder addPoints(LXPoint... points)
points
- Pointspublic LXModelBuilder addChild(LXModelBuilder child)
child
- Childpublic LXModelBuilder addOutput(LXOutput output)
output
- Output objectpublic int[] toIndexBuffer()
public LXModel toModel()
LX library by Mark C. Slee. © 2012-2020