public class GltfModelBuilder
extends java.lang.Object
GltfModel instances.create() method. Note that this
builder assumes that the model instances that are added are the
default implementation, e.g. a DefaultNodeModel.NodeModel with
addNodeModel(NodeModel), then all child nodes will be added
as well. So it is possible to manually construct a complete
DefaultSceneModel, and then only call
addSceneModel(SceneModel), and all required model elements
will be added internally.build() method will then collect the AccessorModel
objects from all scene elements and create the required
BufferViewModel and BufferModel instances. The exact
strategy of how these models are created is not yet specified or
configurable.buildV1() will
probably be refactored soon.| Modifier and Type | Method and Description |
|---|---|
void |
addAccessorModel(AccessorModel accessorModel)
Add the given
AccessorModel that will be added to the
final model manually. |
void |
addAccessorModels(java.util.Collection<? extends AccessorModel> accessorModels)
Add the given
AccessorModel instances that will be added
to the final model manually. |
void |
addAnimationModel(AnimationModel animationModel)
Add the given
AnimationModel |
void |
addAnimationModels(java.util.Collection<? extends AnimationModel> animationModels)
Add the given
AnimationModel instances |
void |
addBufferModel(BufferModel bufferModel)
Add the given
BufferModel that will be added to the
final model manually. |
void |
addBufferModels(java.util.Collection<? extends BufferModel> bufferModels)
Add the given
BufferModel instances that will be added
to the final model manually. |
void |
addBufferViewModel(BufferViewModel bufferViewModel)
Add the given
BufferViewModel that will be added to the
final model manually. |
void |
addBufferViewModels(java.util.Collection<? extends BufferViewModel> bufferViewModels)
Add the given
BufferViewModel instances that will be added
to the final model manually. |
void |
addCameraModel(CameraModel cameraModel)
Add the given
CameraModel |
void |
addCameraModels(java.util.Collection<? extends CameraModel> cameraModels)
Add the given
CameraModel instances |
void |
addImageModel(ImageModel imageModel)
Add the given
ImageModel |
void |
addImageModels(java.util.Collection<? extends ImageModel> imageModels)
Add the given
ImageModel instances |
void |
addMaterialModel(MaterialModel materialModel)
Add the given
MaterialModel |
void |
addMaterialModels(java.util.Collection<? extends MaterialModel> materialModels)
Add the given
MaterialModel instances |
void |
addMeshModel(MeshModel meshModel)
Add the given
MeshModel |
void |
addMeshModels(java.util.Collection<? extends MeshModel> meshModels)
Add the given
MeshModel instances |
void |
addNodeModel(NodeModel nodeModel)
Add the given
NodeModel |
void |
addNodeModels(java.util.Collection<? extends NodeModel> nodeModels)
Add the given
NodeModel instances |
void |
addProgramModel(ProgramModel programModel)
Add the given
ProgramModel |
void |
addProgramModels(java.util.Collection<? extends ProgramModel> programModels)
Add the given
ProgramModel instances |
void |
addSceneModel(SceneModel sceneModel)
Add the given
SceneModel |
void |
addSceneModels(java.util.Collection<? extends SceneModel> sceneModels)
Add the given
SceneModel instances |
void |
addShaderModel(ShaderModel shaderModel)
Add the given
ShaderModel |
void |
addShaderModels(java.util.Collection<? extends ShaderModel> shaderModels)
Add the given
ShaderModel instances |
void |
addSkinModel(SkinModel skinModel)
Add the given
SkinModel |
void |
addSkinModels(java.util.Collection<? extends SkinModel> skinModels)
Add the given
SkinModel instances |
void |
addTechniqueModel(TechniqueModel techniqueModel)
Add the given
TechniqueModel |
void |
addTechniqueModels(java.util.Collection<? extends TechniqueModel> techniqueModels)
Add the given
TechniqueModel instances |
void |
addTextureModel(TextureModel textureModel)
Add the given
TextureModel |
void |
addTextureModels(java.util.Collection<? extends TextureModel> textureModels)
Add the given
TextureModel instances |
DefaultGltfModel |
build()
Build the
GltfModel containing all elements that have been
added to this builder. |
DefaultGltfModel |
buildV1()
Build the
GltfModel containing all elements that have been
added to this builder. |
static GltfModelBuilder |
create()
Creates a new instance
|
public static GltfModelBuilder create()
GltfModelBuilderpublic DefaultGltfModel buildV1()
GltfModel containing all elements that have been
added to this builder.GltfModelpublic DefaultGltfModel build()
GltfModel containing all elements that have been
added to this builder.GltfModelpublic void addAnimationModel(AnimationModel animationModel)
AnimationModelanimationModel - The instance to addpublic void addAnimationModels(java.util.Collection<? extends AnimationModel> animationModels)
AnimationModel instancesanimationModels - The instances to addpublic void addCameraModel(CameraModel cameraModel)
CameraModelcameraModel - The instance to addpublic void addCameraModels(java.util.Collection<? extends CameraModel> cameraModels)
CameraModel instancescameraModels - The instances to addpublic void addImageModel(ImageModel imageModel)
ImageModelimageModel - The instance to addpublic void addImageModels(java.util.Collection<? extends ImageModel> imageModels)
ImageModel instancesimageModels - The instances to addpublic void addMaterialModel(MaterialModel materialModel)
MaterialModelmaterialModel - The instance to addpublic void addMaterialModels(java.util.Collection<? extends MaterialModel> materialModels)
MaterialModel instancesmaterialModels - The instances to addpublic void addMeshModel(MeshModel meshModel)
MeshModelmeshModel - The instance to addpublic void addMeshModels(java.util.Collection<? extends MeshModel> meshModels)
MeshModel instancesmeshModels - The instances to addpublic void addNodeModel(NodeModel nodeModel)
NodeModelnodeModel - The instance to addpublic void addNodeModels(java.util.Collection<? extends NodeModel> nodeModels)
NodeModel instancesnodeModels - The instances to addpublic void addSceneModel(SceneModel sceneModel)
SceneModelsceneModel - The instance to addpublic void addSceneModels(java.util.Collection<? extends SceneModel> sceneModels)
SceneModel instancessceneModels - The instances to addpublic void addSkinModel(SkinModel skinModel)
SkinModelskinModel - The instance to addpublic void addSkinModels(java.util.Collection<? extends SkinModel> skinModels)
SkinModel instancesskinModels - The instances to addpublic void addTextureModel(TextureModel textureModel)
TextureModeltextureModel - The instance to addpublic void addTextureModels(java.util.Collection<? extends TextureModel> textureModels)
TextureModel instancestextureModels - The instances to addpublic void addTechniqueModel(TechniqueModel techniqueModel)
TechniqueModeltechniqueModel - The instance to addpublic void addTechniqueModels(java.util.Collection<? extends TechniqueModel> techniqueModels)
TechniqueModel instancestechniqueModels - The instances to addpublic void addProgramModel(ProgramModel programModel)
ProgramModelprogramModel - The instance to addpublic void addProgramModels(java.util.Collection<? extends ProgramModel> programModels)
ProgramModel instancesprogramModels - The instances to addpublic void addShaderModel(ShaderModel shaderModel)
ShaderModelshaderModel - The instance to addpublic void addShaderModels(java.util.Collection<? extends ShaderModel> shaderModels)
ShaderModel instancesshaderModels - The instances to addpublic void addAccessorModel(AccessorModel accessorModel)
AccessorModel that will be added to the
final model manually.accessorModel - The AccessorModelpublic void addAccessorModels(java.util.Collection<? extends AccessorModel> accessorModels)
AccessorModel instances that will be added
to the final model manually.accessorModels - The AccessorModel instancespublic void addBufferViewModel(BufferViewModel bufferViewModel)
BufferViewModel that will be added to the
final model manually.bufferViewModel - The BufferViewModelpublic void addBufferViewModels(java.util.Collection<? extends BufferViewModel> bufferViewModels)
BufferViewModel instances that will be added
to the final model manually.bufferViewModels - The BufferViewModel instancespublic void addBufferModel(BufferModel bufferModel)
BufferModel that will be added to the
final model manually.bufferModel - The BufferModelpublic void addBufferModels(java.util.Collection<? extends BufferModel> bufferModels)
BufferModel instances that will be added
to the final model manually.bufferModels - The BufferModel instancesCopyright © 2022. All Rights Reserved.