public class ObjGltfAssetCreatorV2
extends java.lang.Object
GltfAssetV2 objects from OBJ files| Constructor and Description |
|---|
ObjGltfAssetCreatorV2()
Default constructor
|
ObjGltfAssetCreatorV2(BufferStrategy bufferStrategy)
Creates a new glTF model creator
|
| Modifier and Type | Method and Description |
|---|---|
GltfAssetV2 |
convert(de.javagl.obj.ReadableObj obj,
java.util.Map<java.lang.String,de.javagl.obj.Mtl> mtlsMap,
java.lang.String baseName,
java.net.URI baseUri)
Convert the given OBJ into a
GltfAssetV2. |
GltfAssetV2 |
create(java.net.URI objUri)
Create a
GltfAssetV2 from the OBJ file with the given URI |
void |
setAssigningRandomColorsToParts(boolean assigningRandomColorsToParts)
For testing and debugging: Assign random colors to the parts that
are created when splitting the OBJ data
|
void |
setBufferStrategy(BufferStrategy bufferStrategy)
Set the
BufferStrategy to use |
void |
setIndicesComponentType(int indicesComponentType)
Set the component type for the indices of the
MeshPrimitives |
public ObjGltfAssetCreatorV2()
public ObjGltfAssetCreatorV2(BufferStrategy bufferStrategy)
bufferStrategy - The BufferStrategy to usepublic void setBufferStrategy(BufferStrategy bufferStrategy)
BufferStrategy to usebufferStrategy - The BufferStrategypublic void setIndicesComponentType(int indicesComponentType)
MeshPrimitivesindicesComponentType - The component typejava.lang.IllegalArgumentException - If the given type is not
GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT or GL_UNSIGNED_INTpublic void setAssigningRandomColorsToParts(boolean assigningRandomColorsToParts)
assigningRandomColorsToParts - The flagpublic GltfAssetV2 create(java.net.URI objUri) throws java.io.IOException
GltfAssetV2 from the OBJ file with the given URIobjUri - The OBJ URIGltfAssetV2java.io.IOException - If an IO error occurspublic GltfAssetV2 convert(de.javagl.obj.ReadableObj obj, java.util.Map<java.lang.String,de.javagl.obj.Mtl> mtlsMap, java.lang.String baseName, java.net.URI baseUri)
GltfAssetV2.obj - The OBJmtlsMap - The mapping from material names to MTL instancesbaseName - The base name for the glTFbaseUri - The base URI to resolve shaders and textures againstGltfAssetV2Copyright © 2022. All Rights Reserved.