Package-level declarations

Types

Link copied to clipboard

How a glTF material's alpha channel is interpreted.

Link copied to clipboard
class Animator(nativeHandle: NativePointer)

Animator updates matrices according to glTF animation and skin definitions.

Link copied to clipboard
class AssetConfiguration(var engine: Engine, var materials: MaterialProvider, var entities: EntityManager? = null)

Construction parameters for an AssetLoader.

Link copied to clipboard
class AssetLoader(nativeHandle: NativePointer)

AssetLoader consumes glTF 2.0 content and produces FilamentAsset objects.

Link copied to clipboard
class FilamentAsset(nativeHandle: NativePointer)

FilamentAsset owns a loaded glTF 2.0 asset and all its Filament objects.

Link copied to clipboard

FilamentInstance provides access to a hierarchy of entities instanced from a glTF asset.

Link copied to clipboard
object Gltfio

gltfio (glTF I/O) is a loader and pipeline for glTF 2.0 assets in Filament.

Link copied to clipboard
data class MaterialKey(var doubleSided: Boolean = false, var unlit: Boolean = false, var hasVertexColors: Boolean = false, var hasBaseColorTexture: Boolean = false, var hasNormalTexture: Boolean = false, var hasOcclusionTexture: Boolean = false, var hasEmissiveTexture: Boolean = false, var useSpecularGlossiness: Boolean = false, var alphaMode: AlphaMode = AlphaMode.OPAQUE, var enableDiagnostics: Boolean = false, var hasMetallicRoughnessTexture: Boolean = false, var metallicRoughnessUV: Int = 0, var baseColorUV: Int = 0, var hasClearCoatTexture: Boolean = false, var clearCoatUV: Int = 0, var hasClearCoatRoughnessTexture: Boolean = false, var clearCoatRoughnessUV: Int = 0, var hasClearCoatNormalTexture: Boolean = false, var clearCoatNormalUV: Int = 0, var hasClearCoat: Boolean = false, var hasTransmission: Boolean = false, var hasTextureTransforms: Boolean = false, var emissiveUV: Int = 0, var aoUV: Int = 0, var normalUV: Int = 0, var hasTransmissionTexture: Boolean = false, var transmissionUV: Int = 0, var hasSheenColorTexture: Boolean = false, var sheenColorUV: Int = 0, var hasSheenRoughnessTexture: Boolean = false, var sheenRoughnessUV: Int = 0, var hasVolumeThicknessTexture: Boolean = false, var volumeThicknessUV: Int = 0, var hasSheen: Boolean = false, var hasIOR: Boolean = false, var hasVolume: Boolean = false, var hasDispersion: Boolean = false, var hasSpecular: Boolean = false, var hasSpecularTexture: Boolean = false, var hasSpecularColorTexture: Boolean = false, var specularTextureUV: Int = 0, var specularColorTextureUV: Int = 0)

MaterialKey encodes glTF material properties for material selection and creation.

Link copied to clipboard

MaterialProvider supplies materials to glTF assets during loading: the ubershader provider picks from a pre-compiled set of materials, see createUbershaderProvider.

Link copied to clipboard
class ResourceConfiguration(var engine: Engine, var normalizeSkinningWeights: Boolean = false)

Construction parameters for a ResourceLoader.

Link copied to clipboard

ResourceLoader loads external resources referenced by glTF assets.

Link copied to clipboard

Decodes the textures ResourceLoader hands it for the MIME types it's registered under with ResourceLoader.addTextureProvider. Destroy it after the loaders using it.

Link copied to clipboard
typealias UvMap = Array<UvSet>

Maps each glTF texcoord set (the index) to a Filament UvSet; UV_MAP_SIZE entries.

Link copied to clipboard
enum UvSet : Enum<UvSet>

One of Filament's UV sets a glTF texcoord set maps to.

Properties

Link copied to clipboard
const val UV_MAP_SIZE: Int = 8

Entries in a UvMap.

Functions

Link copied to clipboard

Trims key's requested features down to what the providers support, and fills uvmap with the resulting glTF-texcoord → Filament-UV-set mapping. Called by providers before material creation.

Link copied to clipboard

A provider transcoding KTX2 (Basis Universal); register it for image/ktx2.

Link copied to clipboard

A provider decoding PNG and JPEG with stb_image; register it for image/png and image/jpeg.

Link copied to clipboard

A provider over gltfio's default pre-compiled ubershader materials.

Link copied to clipboard

A provider decoding WebP, or null where this build has no WebP support (isWebpSupported); register it for image/webp.

Link copied to clipboard
fun getNumUvSets(uvmap: UvMap): Int

The number of Filament UV sets uvmap uses.

Link copied to clipboard

Whether this build of gltfio can decode WebP textures.