Package-level declarations

Functions

Link copied to clipboard

Parses a list of strings representing the content of a Wavefront OBJ file and converts it into a map of polygon groups, where each key corresponds to a mesh name and the value is a list of polygons.


fun loadOBJ(fileOrUrl: String): Map<String, List<IPolygon>>

Loads an OBJ file as a Map of names to lists of Polygon. Use this method to access the loaded OBJ data from the CPU.

Link copied to clipboard
fun loadOBJasVertexBuffer(lines: List<String>): VertexBuffer

Loads a Wavefront OBJ file representation provided as a list of strings and parses it into a VertexBuffer.

fun loadOBJasVertexBuffer(file: File): VertexBuffer
fun loadOBJasVertexBuffer(url: URL): VertexBuffer

fun loadOBJasVertexBuffer(fileOrUrl: String): VertexBuffer

Loads an OBJ file as a VertexBuffer. Use this method to render / process the loaded OBJ data using the GPU.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Reads and processes mesh data from a list of lines in OBJ format.

Link copied to clipboard
fun VertexBuffer.saveOBJ(filePath: String)

Saves a VertexBuffer to a Wavefront OBJ file. Faces use indices. Vertices, normals and texture coordinates are deduplicated.

Link copied to clipboard
fun ICompoundMeshData.toObj(allowNonStandardBehavior: Boolean = true): String

Convert mesh data to Wavefront OBJ representation