Full Code of recp/AssetKit for AI

main 8cd23a03b970 cached
429 files
1.8 MB
520.9k tokens
1405 symbols
1 requests
Download .txt
Showing preview only (1,930K chars total). Download the full file or copy to clipboard to get everything.
Repository: recp/AssetKit
Branch: main
Commit: 8cd23a03b970
Files: 429
Total size: 1.8 MB

Directory structure:
gitextract_y45q9sak/

├── .github/
│   ├── FUNDING.yml
│   └── __disabled_workflows/
│       └── cmake.yml
├── .gitignore
├── .gitmodules
├── .travis.yml
├── CMakeLists.txt
├── EXTENSIONS.md
├── EXTRAS.md
├── LICENSE
├── README.md
├── appveyor.yml
├── docs/
│   ├── make.bat
│   └── source/
│       ├── api.rst
│       ├── build.rst
│       ├── conf.py
│       ├── getting_started.rst
│       ├── index.rst
│       ├── opt.rst
│       ├── quick_intro.rst
│       └── version.rst
├── include/
│   └── ak/
│       ├── animation.h
│       ├── assetkit.h
│       ├── bbox.h
│       ├── cam.h
│       ├── common.h
│       ├── context.h
│       ├── controller.h
│       ├── coord-util.h
│       ├── coord.h
│       ├── core-types.h
│       ├── geom.h
│       ├── gsplat.h
│       ├── image.h
│       ├── instance.h
│       ├── library.h
│       ├── light.h
│       ├── map.h
│       ├── material.h
│       ├── memory.h
│       ├── node.h
│       ├── options.h
│       ├── path.h
│       ├── profile.h
│       ├── sid.h
│       ├── source.h
│       ├── string.h
│       ├── texture.h
│       ├── transform.h
│       ├── trash.h
│       ├── type.h
│       ├── url.h
│       ├── util.h
│       └── version.h
├── scripts/
│   └── strpool.py
├── src/
│   ├── CMakeLists.txt
│   ├── accessor.c
│   ├── accessor.h
│   ├── anim/
│   │   ├── CMakeLists.txt
│   │   ├── bake.c
│   │   └── conflict.c
│   ├── array.c
│   ├── array.h
│   ├── asset.c
│   ├── assetkit.c
│   ├── base64.c
│   ├── base64.h
│   ├── bbox/
│   │   ├── CMakeLists.txt
│   │   ├── bbox.c
│   │   ├── bbox.h
│   │   ├── geom.c
│   │   ├── mesh.c
│   │   ├── mesh_prim.c
│   │   └── scene.c
│   ├── bitwise/
│   │   ├── CMakeLists.txt
│   │   └── bitwise.h
│   ├── camera/
│   │   ├── CMakeLists.txt
│   │   └── cam.c
│   ├── common.c
│   ├── common.h
│   ├── coord/
│   │   ├── CMakeLists.txt
│   │   ├── camera.c
│   │   ├── common.c
│   │   ├── common.h
│   │   ├── doc.c
│   │   ├── geom.c
│   │   ├── mesh.c
│   │   ├── node.c
│   │   ├── scene.c
│   │   ├── transform.c
│   │   ├── transforms.c
│   │   └── vector.c
│   ├── data.c
│   ├── data.h
│   ├── decoders/
│   │   └── gltf/
│   │       ├── draco/
│   │       │   └── assetkit_draco.cc
│   │       ├── ktx2/
│   │       │   └── assetkit_ktx2.cc
│   │       ├── meshopt/
│   │       │   └── assetkit_meshoptimizer.cc
│   │       └── spz/
│   │           └── assetkit_spz.cc
│   ├── default/
│   │   ├── CMakeLists.txt
│   │   ├── cam.c
│   │   ├── cam.h
│   │   ├── cmp.c
│   │   ├── coord.c
│   │   ├── id.c
│   │   ├── light.c
│   │   ├── light.h
│   │   ├── material.c
│   │   ├── material.h
│   │   ├── opt.c
│   │   ├── opt.h
│   │   ├── semantic.c
│   │   ├── semantic.h
│   │   ├── type.c
│   │   └── type.h
│   ├── endian.h
│   ├── find.c
│   ├── geom/
│   │   ├── CMakeLists.txt
│   │   └── mesh.c
│   ├── id.c
│   ├── id.h
│   ├── image/
│   │   ├── CMakeLists.txt
│   │   └── image.c
│   ├── instance/
│   │   ├── CMakeLists.txt
│   │   ├── inst.c
│   │   └── list.c
│   ├── io/
│   │   ├── 3mf/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── README.md
│   │   │   └── imp/
│   │   │       ├── 3mf.c
│   │   │       ├── 3mf.h
│   │   │       ├── CMakeLists.txt
│   │   │       └── common.h
│   │   ├── CMakeLists.txt
│   │   ├── common/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── postscript.c
│   │   │   ├── postscript.h
│   │   │   ├── util.c
│   │   │   └── util.h
│   │   ├── dae/
│   │   │   ├── 1.4/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── dae14.c
│   │   │   │   ├── dae14.h
│   │   │   │   ├── image.c
│   │   │   │   ├── image.h
│   │   │   │   ├── surface.c
│   │   │   │   └── surface.h
│   │   │   ├── CMakeLists.txt
│   │   │   ├── README.md
│   │   │   ├── brep/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── brep.c
│   │   │   │   ├── brep.h
│   │   │   │   ├── curve.c
│   │   │   │   ├── curve.h
│   │   │   │   ├── nurb.c
│   │   │   │   ├── nurb.h
│   │   │   │   ├── surface.c
│   │   │   │   ├── surface.h
│   │   │   │   ├── topology.c
│   │   │   │   └── topology.h
│   │   │   ├── bugfix/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── scenekit.c
│   │   │   │   ├── scenekit.h
│   │   │   │   ├── transp.c
│   │   │   │   ├── transp.h
│   │   │   │   └── url.h
│   │   │   ├── common.h
│   │   │   ├── core/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── anim.c
│   │   │   │   ├── anim.h
│   │   │   │   ├── asset.c
│   │   │   │   ├── asset.h
│   │   │   │   ├── cam.c
│   │   │   │   ├── cam.h
│   │   │   │   ├── color.c
│   │   │   │   ├── color.h
│   │   │   │   ├── ctlr.c
│   │   │   │   ├── ctlr.h
│   │   │   │   ├── enum.c
│   │   │   │   ├── enum.h
│   │   │   │   ├── geom.c
│   │   │   │   ├── geom.h
│   │   │   │   ├── light.c
│   │   │   │   ├── light.h
│   │   │   │   ├── line.c
│   │   │   │   ├── line.h
│   │   │   │   ├── mesh.c
│   │   │   │   ├── mesh.h
│   │   │   │   ├── morph.c
│   │   │   │   ├── morph.h
│   │   │   │   ├── node.c
│   │   │   │   ├── node.h
│   │   │   │   ├── param.c
│   │   │   │   ├── param.h
│   │   │   │   ├── poly.c
│   │   │   │   ├── poly.h
│   │   │   │   ├── scene.c
│   │   │   │   ├── scene.h
│   │   │   │   ├── skin.c
│   │   │   │   ├── skin.h
│   │   │   │   ├── source.c
│   │   │   │   ├── source.h
│   │   │   │   ├── spline.c
│   │   │   │   ├── spline.h
│   │   │   │   ├── techn.c
│   │   │   │   ├── techn.h
│   │   │   │   ├── triangle.c
│   │   │   │   ├── triangle.h
│   │   │   │   ├── value.c
│   │   │   │   ├── value.h
│   │   │   │   ├── vert.c
│   │   │   │   └── vert.h
│   │   │   ├── ctlr.c
│   │   │   ├── dae.c
│   │   │   ├── dae.h
│   │   │   ├── fixup/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── angle.c
│   │   │   │   ├── angle.h
│   │   │   │   ├── channel.c
│   │   │   │   ├── channel.h
│   │   │   │   ├── ctlr.c
│   │   │   │   ├── ctlr.h
│   │   │   │   ├── geom.c
│   │   │   │   ├── geom.h
│   │   │   │   ├── mesh.c
│   │   │   │   ├── mesh.h
│   │   │   │   ├── node.c
│   │   │   │   ├── node.h
│   │   │   │   ├── tex.c
│   │   │   │   └── tex.h
│   │   │   ├── fx/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── colortex.c
│   │   │   │   ├── colortex.h
│   │   │   │   ├── effect.c
│   │   │   │   ├── effect.h
│   │   │   │   ├── fltprm.c
│   │   │   │   ├── fltprm.h
│   │   │   │   ├── img.c
│   │   │   │   ├── img.h
│   │   │   │   ├── mat.c
│   │   │   │   ├── mat.h
│   │   │   │   ├── profile.c
│   │   │   │   ├── profile.h
│   │   │   │   ├── samp.c
│   │   │   │   ├── samp.h
│   │   │   │   ├── techn.c
│   │   │   │   └── techn.h
│   │   │   ├── postscript.c
│   │   │   ├── postscript.h
│   │   │   ├── strpool.c
│   │   │   ├── strpool.h
│   │   │   ├── strpool.json
│   │   │   └── strpool.py
│   │   ├── gltf/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── README.md
│   │   │   ├── common.h
│   │   │   ├── imp/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── common.h
│   │   │   │   ├── core/
│   │   │   │   │   ├── CMakeLists.txt
│   │   │   │   │   ├── accessor.c
│   │   │   │   │   ├── accessor.h
│   │   │   │   │   ├── anim.c
│   │   │   │   │   ├── anim.h
│   │   │   │   │   ├── asset.c
│   │   │   │   │   ├── asset.h
│   │   │   │   │   ├── buffer.c
│   │   │   │   │   ├── buffer.h
│   │   │   │   │   ├── camera.c
│   │   │   │   │   ├── camera.h
│   │   │   │   │   ├── enum.c
│   │   │   │   │   ├── enum.h
│   │   │   │   │   ├── ext.c
│   │   │   │   │   ├── ext.h
│   │   │   │   │   ├── image.c
│   │   │   │   │   ├── image.h
│   │   │   │   │   ├── material.c
│   │   │   │   │   ├── material.h
│   │   │   │   │   ├── mesh.c
│   │   │   │   │   ├── mesh.h
│   │   │   │   │   ├── node.c
│   │   │   │   │   ├── node.h
│   │   │   │   │   ├── profile.c
│   │   │   │   │   ├── profile.h
│   │   │   │   │   ├── sampler.c
│   │   │   │   │   ├── sampler.h
│   │   │   │   │   ├── scene.c
│   │   │   │   │   ├── scene.h
│   │   │   │   │   ├── skin.c
│   │   │   │   │   ├── skin.h
│   │   │   │   │   ├── texture.c
│   │   │   │   │   └── texture.h
│   │   │   │   ├── ext/
│   │   │   │   │   ├── CMakeLists.txt
│   │   │   │   │   ├── compression.c
│   │   │   │   │   ├── decoder.c
│   │   │   │   │   ├── decoder.h
│   │   │   │   │   ├── gsplat.c
│   │   │   │   │   ├── instancing.c
│   │   │   │   │   ├── instancing.h
│   │   │   │   │   ├── lights.c
│   │   │   │   │   ├── lights.h
│   │   │   │   │   ├── variants.c
│   │   │   │   │   └── variants.h
│   │   │   │   ├── extra.c
│   │   │   │   ├── extra.h
│   │   │   │   ├── gltf.c
│   │   │   │   ├── gltf.h
│   │   │   │   ├── mesh_fixup.c
│   │   │   │   ├── mesh_fixup.h
│   │   │   │   ├── postscript.c
│   │   │   │   └── postscript.h
│   │   │   ├── strpool.c
│   │   │   ├── strpool.h
│   │   │   ├── strpool.json
│   │   │   └── strpool.py
│   │   ├── obj/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── README.md
│   │   │   ├── common.h
│   │   │   ├── group.c
│   │   │   ├── group.h
│   │   │   ├── mtl.c
│   │   │   ├── mtl.h
│   │   │   ├── obj.c
│   │   │   ├── obj.h
│   │   │   ├── util.c
│   │   │   └── util.h
│   │   ├── ply/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── README.md
│   │   │   ├── ascii.c
│   │   │   ├── bin.c
│   │   │   ├── common.h
│   │   │   ├── ply.c
│   │   │   ├── ply.h
│   │   │   └── util.h
│   │   └── stl/
│   │       ├── CMakeLists.txt
│   │       ├── README.md
│   │       ├── common.h
│   │       ├── stl.c
│   │       └── stl.h
│   ├── json.h
│   ├── lib/
│   │   ├── CMakeLists.txt
│   │   ├── geom.c
│   │   └── lib.c
│   ├── light/
│   │   ├── CMakeLists.txt
│   │   └── light.c
│   ├── main.c
│   ├── map.c
│   ├── mat/
│   │   ├── CMakeLists.txt
│   │   └── mat.c
│   ├── mem/
│   │   ├── CMakeLists.txt
│   │   ├── common.h
│   │   ├── ext.c
│   │   ├── intr.c
│   │   ├── lt.c
│   │   ├── lt.h
│   │   ├── mem.c
│   │   ├── mmap.c
│   │   ├── rb.c
│   │   └── rb.h
│   ├── mesh/
│   │   ├── CMakeLists.txt
│   │   ├── duplicator.c
│   │   ├── edit.c
│   │   ├── edit_buff.c
│   │   ├── edit_buff_fixup.c
│   │   ├── edit_common.h
│   │   ├── edit_index.c
│   │   ├── index.c
│   │   ├── index.h
│   │   ├── input.c
│   │   ├── isolate.c
│   │   ├── material.c
│   │   ├── normal.c
│   │   └── triangulate.c
│   ├── miniz/
│   │   ├── CMakeLists.txt
│   │   ├── LICENSE
│   │   ├── miniz.c
│   │   └── miniz.h
│   ├── morph/
│   │   ├── CMakeLists.txt
│   │   └── intr.c
│   ├── node/
│   │   ├── CMakeLists.txt
│   │   └── node.c
│   ├── platform/
│   │   ├── CMakeLists.txt
│   │   ├── dylib.c
│   │   └── dylib.h
│   ├── profile.c
│   ├── profile.h
│   ├── resc/
│   │   ├── CMakeLists.txt
│   │   ├── path.c
│   │   ├── resource.c
│   │   ├── resource.h
│   │   └── url.c
│   ├── sid.c
│   ├── sid.h
│   ├── sid_constr.c
│   ├── simd/
│   │   ├── arm.h
│   │   ├── base64.h
│   │   ├── intrin.h
│   │   ├── wasm.h
│   │   └── x86.h
│   ├── skin/
│   │   ├── CMakeLists.txt
│   │   ├── fix.c
│   │   ├── fix.h
│   │   └── skin.c
│   ├── string.c
│   ├── strpool.c
│   ├── strpool.h
│   ├── strpool.json
│   ├── strpool.py
│   ├── topo/
│   │   ├── CMakeLists.txt
│   │   ├── topo.c
│   │   └── topo.h
│   ├── transform/
│   │   ├── CMakeLists.txt
│   │   ├── dup.c
│   │   ├── trans.c
│   │   └── traverse.c
│   ├── trash.c
│   ├── trash.h
│   ├── tree.c
│   ├── tree.h
│   ├── type.c
│   ├── type.h
│   ├── utils.c
│   ├── utils.h
│   ├── win32/
│   │   ├── CMakeLists.txt
│   │   ├── dllmain.c
│   │   └── strptime.c
│   ├── xml.c
│   └── xml.h
└── test/
    ├── include/
    │   └── common.h
    ├── runner.c
    ├── src/
    │   ├── collada/
    │   │   └── test_dae_load.c
    │   ├── test_common.h
    │   └── test_memory.c
    └── tests.h

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: [recp]
patreon: recp
open_collective: assetkit
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/__disabled_workflows/cmake.yml
================================================
name: CMake

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  BUILD_TYPE: Release

jobs:
  build:
    # The CMake configure and build commands are platform agnostic and should work equally
    # well on Windows or Mac.  You can convert this to a matrix build if you need
    # cross-platform coverage.
    # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Configure CMake
      # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
      # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
      run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

    - name: Build
      # Build your program with the given configuration
      run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

#    - name: Test
#      working-directory: ${{github.workspace}}/build
#      # Execute tests defined by the CMake configuration.  
#      # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
#      run: ctest -C ${{env.BUILD_TYPE}}
      


================================================
FILE: .gitignore
================================================
*.xcodeproj
*.xcworkspace
*.sln
*.vcxproj
*.vcxproj.*
*.suo
*.sdf
*.opensdf
ipch/
Debug/
Release/
.DS_Store
.vs
*.nupkg
*.opendb
packages.config
/aclocal.m4
/ar-lib
/autom4te.cache/
/compile
/config.guess
/config.log
/config.status
/config.sub
/configure
/depcomp
/install-sh
/ltmain.sh
/missing
/libtool
.libs/
.deps/
*.[oa]
*.l[oa]
Makefile
Makefile.in
m4/*.m4
.buildstamp
.dirstamp
packages/
.anjuta/*
*.anjuta*
config.h.*
libxml*
xml2*
python/setup.py
config.h
stamp*
COPYING
.idea/*
*.VC.db
test-driver
/include/include/
*.log
test/ak-tests.trs
test/ak-tests
*.gcov
*.gcno
*.gcda
tests.trs
tests
*.userprefs
*.orig
cmake-build-debug
win/x64/*
win/x86/*
build/
/deps/draco/
/deps/meshoptimizer/
/deps/spz/
/deps/ktx/
.cache/
.scannerwork/
.project
.cproject
.vscode/
proj/


================================================
FILE: .gitmodules
================================================
[submodule "deps/cglm"]
	path = deps/cglm
	url = https://github.com/recp/cglm.git
[submodule "deps/json"]
	path = deps/json
	url = https://github.com/recp/json.git
[submodule "deps/xml"]
	path = deps/xml
	url = https://github.com/recp/xml.git
[submodule "deps/ds"]
	path = deps/ds
	url = https://github.com/recp/ds.git


================================================
FILE: .travis.yml
================================================
language: c

os:
  - linux
  - osx

sudo: required
dist: trusty

compiler:
  - clang
  - gcc

matrix:
  fast_finish: true
  exclude:
    # Skip GCC builds on macOS.
    - os: osx
      compiler: gcc
  include:
    # Additional GCC builds for code coverage.
    - os: linux
      compiler: gcc
      env: CODE_COVERAGE=ON

cache:
  apt: true

addons:
  apt:
    packages:
      - lcov

branches:
  only:
    - master

script:
  - sh ./build-deps.sh
  - sh ./autogen.sh
  - if [[ "$CC" == "gcc" && "$CODE_COVERAGE" == "ON" ]]; then
      ./configure CFLAGS="-ftest-coverage -fprofile-arcs";
    else
      ./configure;
    fi
  - make -j8
#  - make check

after_success:
  - if [[ "$CC" == "gcc" && "$CODE_COVERAGE" == "ON" ]]; then
      pip install --user cpp-coveralls && 
      coveralls
        --build-root .
        --exclude lib
        --exclude test
        --gcov-options '\-lp'
        --verbose;
    fi


================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.16)
project(assetkit VERSION 0.3.2 LANGUAGES C)

if(POLICY CMP0076)
  cmake_policy(SET CMP0076 NEW)
endif()
if(POLICY CMP0169)
  cmake_policy(SET CMP0169 OLD)
endif()

set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED YES)
set(DEFAULT_BUILD_TYPE "Release")

get_directory_property(AK_HAS_PARENT PARENT_DIRECTORY)

set(CMAKE_C_FLAGS_DEBUG "-g")
if(MSVC)
  set(CMAKE_C_FLAGS_RELEASE "/Ox /DNDEBUG")
  set(CMAKE_CXX_FLAGS_RELEASE "/Ox /DNDEBUG")
else()
  set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
  set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
endif()

set(AK_BUILD)
option(AK_SHARED "Shared build" ON)
option(AK_STATIC "Static build" OFF)
option(AK_USE_C99 "" OFF)
option(AK_USE_TEST "Enable Tests" OFF)
option(AK_BUILD_GLTF_DRACO_DECODER "Build optional glTF Draco decoder shim" ON)
option(AK_BUILD_GLTF_MESHOPT_DECODER "Build optional glTF meshoptimizer decoder shim" ON)
option(AK_BUILD_GLTF_SPZ_DECODER "Build optional glTF Gaussian splatting (SPZ) decoder shim" ON)
option(AK_BUILD_GLTF_KTX2_DECODER "Build optional glTF KHR_texture_basisu (KTX2/BasisU) decoder shim" ON)
option(AK_FETCH_DEPS "Fetch optional decoder dependencies into AK_DEPS_ROOT when missing" ON)
option(AK_ENABLE_LTO "Enable link-time optimization for release builds" OFF)
set(AK_DRACO_ROOT "" CACHE PATH "Optional Draco install/source root")
set(AK_MESHOPT_ROOT "" CACHE PATH "Optional meshoptimizer source root")
set(AK_SPZ_ROOT "" CACHE PATH "Optional SPZ install/source root")
set(AK_KTX2_ROOT "" CACHE PATH "Optional KTX-Software install/source root")
set(AK_DEPS_ROOT "${PROJECT_SOURCE_DIR}/deps" CACHE PATH "AssetKit dependency checkout root")

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")

if(NOT AK_STATIC AND AK_SHARED)
  set(AK_BUILD SHARED)
else(AK_STATIC)
  set(AK_BUILD STATIC)
endif()

if(AK_USE_C99)
  set(CMAKE_C_STANDARD 99)
endif()

if(MSVC)
  # Ref: https://skia.googlesource.com/third_party/sdl/+/refs/heads/master/CMakeLists.txt#225
  # Make sure /RTC1 is disabled, otherwise it will use functions from the CRT
  foreach(flag_var
      CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
      CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
    string(REGEX REPLACE "/RTC(su|[1su])" "" ${flag_var} "${${flag_var}}")
  endforeach(flag_var)
endif()

if(NOT AK_HAS_PARENT AND NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  message(STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as none was specified.")
  set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE STRING "Choose the type of build." FORCE)
  # Set the possible values of build type for cmake-gui
  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

if(AK_ENABLE_LTO)
  include(CheckIPOSupported)
  check_ipo_supported(RESULT AK_LTO_OK OUTPUT AK_LTO_MSG)
  if(AK_LTO_OK)
    set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
    set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO ON)
  else()
    message(WARNING "LTO was requested but is not supported: ${AK_LTO_MSG}")
  endif()
endif()

function(ak_target_common_options target)
  if(MSVC)
    target_compile_options(${target}
        PRIVATE
            /W3
            $<$<CONFIG:Release>:/Gy>
            $<$<CONFIG:Release>:/Oi>
            $<$<CONFIG:RelWithDebInfo>:/Gy>
            $<$<CONFIG:RelWithDebInfo>:/Oi>)
  else()
    target_compile_options(${target}
        PRIVATE
            -Wall
            -Wextra
            -Wstrict-aliasing=2
            -Wno-overlength-strings
            $<$<COMPILE_LANGUAGE:C>:-Wmissing-declarations>)
  endif()
endfunction()

function(ak_target_c_options target)
  ak_target_common_options(${target})
  if(MSVC)
    target_compile_options(${target} PRIVATE /TC)
  endif()
endfunction()

function(ak_target_cxx_options target)
  ak_target_common_options(${target})
endfunction()

include(GNUInstallDirs)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})

if(NOT CPack_CMake_INCLUDED)
  include(CPack)
endif()

# Target Start
add_library(${PROJECT_NAME} ${AK_BUILD} "")
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
ak_target_c_options(${PROJECT_NAME})

if(APPLE)
  set(AK_INSTALL_RPATH "@loader_path")
elseif(UNIX)
  set(AK_INSTALL_RPATH "\$ORIGIN")
endif()

if(AK_SHARED)
  target_compile_definitions(${PROJECT_NAME} PRIVATE AK_EXPORTS)
  if(MSVC)
    target_compile_definitions(${PROJECT_NAME}
        PRIVATE
            _WINDOWS
            _USRDLL
            _assetkit_dll_DLL)
  endif()
else()
  target_compile_definitions(${PROJECT_NAME} PUBLIC AK_STATIC)
endif()

set_target_properties(${PROJECT_NAME} PROPERTIES
                              VERSION ${PROJECT_VERSION} 
                            SOVERSION ${PROJECT_VERSION_MAJOR})
if(AK_INSTALL_RPATH)
  set_target_properties(${PROJECT_NAME} PROPERTIES
                        INSTALL_RPATH "${AK_INSTALL_RPATH}")
endif()

add_subdirectory(src)

# Dependencies && Submodules

find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
# Update submodules as needed
    option(GIT_SUBMODULE "Check submodules during build" ON)
    if(GIT_SUBMODULE)
        message(STATUS "Submodule update")
        execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                        RESULT_VARIABLE GIT_SUBMOD_RESULT)
        if(NOT GIT_SUBMOD_RESULT EQUAL "0")
            message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
        endif()
    endif()
endif()

if(NOT EXISTS "${PROJECT_SOURCE_DIR}/deps/cglm/CMakeLists.txt")
    message(FATAL_ERROR "The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
endif()

add_subdirectory(deps/ds)
add_dependencies(${PROJECT_NAME} ds)

# set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/deps" ${CMAKE_MODULE_PATH})
# find_package(ds REQUIRED)
# target_link_libraries(${PROJECT_NAME} ds::ds)

# Include Dirs
target_include_directories(${PROJECT_NAME}
    PUBLIC 
        $<INSTALL_INTERFACE:include>    
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
    PRIVATE
        ${CMAKE_CURRENT_SOURCE_DIR}/src

        ${PROJECT_SOURCE_DIR}/deps/cglm/include
        ${PROJECT_SOURCE_DIR}/deps/ds/include
        ${PROJECT_SOURCE_DIR}/deps/json/include
        ${PROJECT_SOURCE_DIR}/deps/xml/include
)

target_link_libraries(${PROJECT_NAME} PRIVATE ds ${CMAKE_DL_LIBS})

if(AK_BUILD_GLTF_DRACO_DECODER OR AK_BUILD_GLTF_MESHOPT_DECODER
   OR AK_BUILD_GLTF_SPZ_DECODER OR AK_BUILD_GLTF_KTX2_DECODER)
  enable_language(CXX)
endif()

if(AK_BUILD_GLTF_DRACO_DECODER)
  find_path(AK_DRACO_INCLUDE_DIR
            NAMES draco/compression/decode.h
            HINTS ${AK_DRACO_ROOT}
                  ${AK_DRACO_ROOT}/install
                  ${AK_DRACO_ROOT}/include
                  ${AK_DEPS_ROOT}/draco/install
                  ${AK_DEPS_ROOT}/draco
                  ${AK_DEPS_ROOT}/draco/include
            PATH_SUFFIXES include
            NO_DEFAULT_PATH)
  find_library(AK_DRACO_LIBRARY
               NAMES draco
               HINTS ${AK_DRACO_ROOT}
                     ${AK_DRACO_ROOT}/install
                     ${AK_DRACO_ROOT}/lib
                     ${AK_DEPS_ROOT}/draco/install
                     ${AK_DEPS_ROOT}/draco
                     ${AK_DEPS_ROOT}/draco/lib
               PATH_SUFFIXES lib
               NO_DEFAULT_PATH)

  if((NOT AK_DRACO_INCLUDE_DIR OR NOT AK_DRACO_LIBRARY) AND AK_FETCH_DEPS)
    include(ExternalProject)

    set(AK_DRACO_INSTALL_DIR "${AK_DEPS_ROOT}/draco/install")
    set(AK_DRACO_INCLUDE_DIR "${AK_DRACO_INSTALL_DIR}/include")
    if(WIN32)
      set(AK_DRACO_LIBRARY "${AK_DRACO_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/draco.lib")
    else()
      set(AK_DRACO_LIBRARY "${AK_DRACO_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libdraco.a")
    endif()

    ExternalProject_Add(assetkit_draco_dep
        GIT_REPOSITORY https://github.com/google/draco.git
        GIT_TAG main
        GIT_SHALLOW TRUE
        GIT_SUBMODULES ""
        SOURCE_DIR "${AK_DEPS_ROOT}/draco"
        BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/assetkit_draco-build"
        INSTALL_DIR "${AK_DRACO_INSTALL_DIR}"
        BUILD_BYPRODUCTS "${AK_DRACO_LIBRARY}"
        CMAKE_ARGS
            -Wno-dev
            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
            -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
            -DCMAKE_POSITION_INDEPENDENT_CODE=ON
            -DDRACO_ANIMATION_ENCODING=OFF
            -DDRACO_BUILD_EXECUTABLES=OFF
            -DDRACO_GLTF_BITSTREAM=ON
            -DDRACO_INSTALL=ON
            -DDRACO_JS_GLUE=OFF
            -DDRACO_MAYA_PLUGIN=OFF
            -DDRACO_TESTS=OFF
            -DDRACO_TRANSCODER_SUPPORTED=OFF
            -DDRACO_UNITY_PLUGIN=OFF
            -DDRACO_WASM=OFF
            -DBUILD_SHARED_LIBS=OFF)
  endif()

  if(NOT AK_DRACO_INCLUDE_DIR OR NOT AK_DRACO_LIBRARY)
    message(FATAL_ERROR
            "Draco decoder requested but Draco was not found. "
            "Set AK_DRACO_ROOT, enable AK_FETCH_DEPS, or disable "
            "AK_BUILD_GLTF_DRACO_DECODER.")
  endif()

  add_library(assetkit_draco SHARED
              src/decoders/gltf/draco/assetkit_draco.cc)
  ak_target_cxx_options(assetkit_draco)
  if(TARGET assetkit_draco_dep)
    add_dependencies(assetkit_draco assetkit_draco_dep)
  endif()
  target_include_directories(assetkit_draco
      SYSTEM
      PRIVATE
          ${AK_DRACO_INCLUDE_DIR})
  target_include_directories(assetkit_draco
      PRIVATE
          ${CMAKE_CURRENT_SOURCE_DIR}/include
          ${CMAKE_CURRENT_SOURCE_DIR}/src
          ${PROJECT_SOURCE_DIR}/deps/cglm/include
          ${PROJECT_SOURCE_DIR}/deps/ds/include
          ${PROJECT_SOURCE_DIR}/deps/json/include
          ${PROJECT_SOURCE_DIR}/deps/xml/include)
  target_link_libraries(assetkit_draco
      PRIVATE
          ${PROJECT_NAME}
          ds
          ${AK_DRACO_LIBRARY})
  set_target_properties(assetkit_draco PROPERTIES
                        CXX_STANDARD 11
                        CXX_STANDARD_REQUIRED YES
                        CXX_VISIBILITY_PRESET hidden
                        VISIBILITY_INLINES_HIDDEN YES)
  if(AK_INSTALL_RPATH)
    set_target_properties(assetkit_draco PROPERTIES
                          INSTALL_RPATH "${AK_INSTALL_RPATH}")
  endif()
  if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
    target_compile_options(assetkit_draco
        PRIVATE
            -Wno-deprecated-copy-with-user-provided-copy
            -Wno-ignored-qualifiers
            -Wno-implicit-const-int-float-conversion
            -Wno-sign-compare)
  endif()

  install(TARGETS assetkit_draco
          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

if(AK_BUILD_GLTF_MESHOPT_DECODER)
  find_path(AK_MESHOPT_INCLUDE_DIR
            NAMES meshoptimizer.h
            HINTS ${AK_MESHOPT_ROOT}
                  ${AK_MESHOPT_ROOT}/src
                  ${AK_DEPS_ROOT}/meshoptimizer
                  ${AK_DEPS_ROOT}/meshoptimizer/src
            PATH_SUFFIXES src
            NO_DEFAULT_PATH)

  if(NOT AK_MESHOPT_INCLUDE_DIR AND AK_FETCH_DEPS)
    include(FetchContent)

    FetchContent_Declare(assetkit_meshoptimizer_dep
        GIT_REPOSITORY https://github.com/zeux/meshoptimizer.git
        GIT_TAG master
        GIT_SHALLOW TRUE
        SOURCE_DIR "${AK_DEPS_ROOT}/meshoptimizer")
    FetchContent_GetProperties(assetkit_meshoptimizer_dep)
    if(NOT assetkit_meshoptimizer_dep_POPULATED)
      FetchContent_Populate(assetkit_meshoptimizer_dep)
    endif()

    set(AK_MESHOPT_INCLUDE_DIR "${AK_DEPS_ROOT}/meshoptimizer/src")
  endif()

  set(AK_MESHOPT_SOURCES
      ${AK_MESHOPT_INCLUDE_DIR}/indexcodec.cpp
      ${AK_MESHOPT_INCLUDE_DIR}/vertexcodec.cpp
      ${AK_MESHOPT_INCLUDE_DIR}/vertexfilter.cpp)

  if(NOT AK_MESHOPT_INCLUDE_DIR
     OR NOT EXISTS "${AK_MESHOPT_INCLUDE_DIR}/indexcodec.cpp"
     OR NOT EXISTS "${AK_MESHOPT_INCLUDE_DIR}/vertexcodec.cpp"
     OR NOT EXISTS "${AK_MESHOPT_INCLUDE_DIR}/vertexfilter.cpp")
    message(FATAL_ERROR
            "meshoptimizer decoder requested but source files were not found. "
            "Set AK_MESHOPT_ROOT, enable AK_FETCH_DEPS, or disable "
            "AK_BUILD_GLTF_MESHOPT_DECODER.")
  endif()

  add_library(assetkit_meshoptimizer SHARED
              src/decoders/gltf/meshopt/assetkit_meshoptimizer.cc
              ${AK_MESHOPT_SOURCES})
  ak_target_cxx_options(assetkit_meshoptimizer)
  target_include_directories(assetkit_meshoptimizer
      PRIVATE
          ${AK_MESHOPT_INCLUDE_DIR})
  set_target_properties(assetkit_meshoptimizer PROPERTIES
                        CXX_STANDARD 11
                        CXX_STANDARD_REQUIRED YES
                        CXX_VISIBILITY_PRESET hidden
                        VISIBILITY_INLINES_HIDDEN YES)
  if(AK_INSTALL_RPATH)
    set_target_properties(assetkit_meshoptimizer PROPERTIES
                          INSTALL_RPATH "${AK_INSTALL_RPATH}")
  endif()

  install(TARGETS assetkit_meshoptimizer
          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

# ---------------------------------------------------------------------------
# Optional Gaussian splat (SPZ) decoder shim — KHR_gaussian_splatting future
# compression sub-extension support. Niantic Spatial's libspz handles the
# format; we link statically and expose the AssetKit decoder API.
# ---------------------------------------------------------------------------
if(AK_BUILD_GLTF_SPZ_DECODER)
  find_path(AK_SPZ_INCLUDE_DIR
            NAMES spz/spz.h
            HINTS ${AK_SPZ_ROOT}
                  ${AK_SPZ_ROOT}/install
                  ${AK_SPZ_ROOT}/include
                  ${AK_DEPS_ROOT}/spz/install
                  ${AK_DEPS_ROOT}/spz
                  ${AK_DEPS_ROOT}/spz/include
            PATH_SUFFIXES include
            NO_DEFAULT_PATH)
  find_library(AK_SPZ_LIBRARY
               NAMES spz
               HINTS ${AK_SPZ_ROOT}
                     ${AK_SPZ_ROOT}/install
                     ${AK_SPZ_ROOT}/lib
                     ${AK_DEPS_ROOT}/spz/install
                     ${AK_DEPS_ROOT}/spz
                     ${AK_DEPS_ROOT}/spz/lib
               PATH_SUFFIXES lib
               NO_DEFAULT_PATH)

  if((NOT AK_SPZ_INCLUDE_DIR OR NOT AK_SPZ_LIBRARY) AND AK_FETCH_DEPS)
    include(ExternalProject)

    set(AK_SPZ_INSTALL_DIR "${AK_DEPS_ROOT}/spz/install")
    set(AK_SPZ_INCLUDE_DIR "${AK_SPZ_INSTALL_DIR}/include")
    if(WIN32)
      set(AK_SPZ_LIBRARY "${AK_SPZ_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/spz.lib")
    else()
      set(AK_SPZ_LIBRARY "${AK_SPZ_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libspz.a")
    endif()

    ExternalProject_Add(assetkit_spz_dep
        GIT_REPOSITORY https://github.com/nianticlabs/spz.git
        GIT_TAG main
        GIT_SHALLOW TRUE
        SOURCE_DIR "${AK_DEPS_ROOT}/spz"
        BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/assetkit_spz-build"
        INSTALL_DIR "${AK_SPZ_INSTALL_DIR}"
        BUILD_BYPRODUCTS "${AK_SPZ_LIBRARY}"
        CMAKE_ARGS
            -Wno-dev
            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
            -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
            -DCMAKE_POSITION_INDEPENDENT_CODE=ON
            -DBUILD_SHARED_LIBS=OFF)
  endif()

  if(NOT AK_SPZ_INCLUDE_DIR OR NOT AK_SPZ_LIBRARY)
    message(WARNING
            "SPZ Gaussian-splat decoder requested but libspz was not found. "
            "Set AK_SPZ_ROOT, enable AK_FETCH_DEPS, or disable "
            "AK_BUILD_GLTF_SPZ_DECODER. Skipping decoder build for now.")
  else()
    add_library(assetkit_spz SHARED
                src/decoders/gltf/spz/assetkit_spz.cc)
    ak_target_cxx_options(assetkit_spz)
    if(TARGET assetkit_spz_dep)
      add_dependencies(assetkit_spz assetkit_spz_dep)
    endif()
    target_include_directories(assetkit_spz
        SYSTEM PRIVATE
            ${AK_SPZ_INCLUDE_DIR})
    target_include_directories(assetkit_spz
        PRIVATE
            ${CMAKE_CURRENT_SOURCE_DIR}/include
            ${CMAKE_CURRENT_SOURCE_DIR}/src
            ${PROJECT_SOURCE_DIR}/deps/cglm/include
            ${PROJECT_SOURCE_DIR}/deps/ds/include
            ${PROJECT_SOURCE_DIR}/deps/json/include)
    # SPZ depends on zstd + zlib (for ngsp/zstd-compressed streams + the gzip
     # codec). On macOS both ship with the SDK; elsewhere we expect system
     # packages. find_package handles missing libraries gracefully.
    find_package(ZLIB)
    find_library(AK_SPZ_ZSTD_LIB
                 NAMES zstd
                 HINTS /opt/homebrew/lib /usr/local/lib /usr/lib)

    target_link_libraries(assetkit_spz
        PRIVATE
            ${PROJECT_NAME}
            ds
            ${AK_SPZ_LIBRARY})

    if(ZLIB_FOUND)
      target_link_libraries(assetkit_spz PRIVATE ZLIB::ZLIB)
    endif()
    if(AK_SPZ_ZSTD_LIB)
      target_link_libraries(assetkit_spz PRIVATE ${AK_SPZ_ZSTD_LIB})
    else()
      message(WARNING
              "libzstd not found — SPZ ngsp/zstd-compressed splat streams "
              "will fail at runtime. Install via 'brew install zstd' on "
              "macOS or your distro's package manager.")
    endif()
    set_target_properties(assetkit_spz PROPERTIES
                          CXX_STANDARD 17
                          CXX_STANDARD_REQUIRED YES
                          CXX_VISIBILITY_PRESET hidden
                          VISIBILITY_INLINES_HIDDEN YES)
    if(AK_INSTALL_RPATH)
      set_target_properties(assetkit_spz PROPERTIES
                            INSTALL_RPATH "${AK_INSTALL_RPATH}")
    endif()

    install(TARGETS assetkit_spz
            LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
            RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
  endif()
endif()

# ---------------------------------------------------------------------------
# Optional KTX2 / BasisU texture decoder shim — KHR_texture_basisu support.
# Khronos KTX-Software provides libktx with built-in BasisU transcoding
# (UASTC / ETC1S → RGBA8 / BC7 / ASTC depending on target). The shim
# decodes a KTX2 buffer into an RGBA8 AkImage so the renderer can consume
# it like any other Core Graphics-decoded texture.
# ---------------------------------------------------------------------------
if(AK_BUILD_GLTF_KTX2_DECODER)
  find_path(AK_KTX2_INCLUDE_DIR
            NAMES ktx.h
            HINTS ${AK_KTX2_ROOT}
                  ${AK_KTX2_ROOT}/install
                  ${AK_KTX2_ROOT}/include
                  ${AK_DEPS_ROOT}/ktx/install
                  ${AK_DEPS_ROOT}/ktx
                  ${AK_DEPS_ROOT}/ktx/include
            PATH_SUFFIXES include
            NO_DEFAULT_PATH)
  find_library(AK_KTX2_LIBRARY
               NAMES ktx ktx_read
               HINTS ${AK_KTX2_ROOT}
                     ${AK_KTX2_ROOT}/install
                     ${AK_KTX2_ROOT}/lib
                     ${AK_DEPS_ROOT}/ktx/install
                     ${AK_DEPS_ROOT}/ktx
                     ${AK_DEPS_ROOT}/ktx/lib
               PATH_SUFFIXES lib
               NO_DEFAULT_PATH)

  if((NOT AK_KTX2_INCLUDE_DIR OR NOT AK_KTX2_LIBRARY) AND AK_FETCH_DEPS)
    include(ExternalProject)

    set(AK_KTX2_INSTALL_DIR "${AK_DEPS_ROOT}/ktx/install")
    set(AK_KTX2_INCLUDE_DIR "${AK_KTX2_INSTALL_DIR}/include")
    if(WIN32)
      set(AK_KTX2_LIBRARY "${AK_KTX2_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/ktx.lib")
    else()
      set(AK_KTX2_LIBRARY "${AK_KTX2_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libktx.a")
    endif()

    ExternalProject_Add(assetkit_ktx2_dep
        GIT_REPOSITORY https://github.com/KhronosGroup/KTX-Software.git
        GIT_TAG main
        GIT_SHALLOW TRUE
        SOURCE_DIR "${AK_DEPS_ROOT}/ktx"
        BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/assetkit_ktx2-build"
        INSTALL_DIR "${AK_KTX2_INSTALL_DIR}"
        BUILD_BYPRODUCTS "${AK_KTX2_LIBRARY}"
        CMAKE_ARGS
            -Wno-dev
            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
            -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
            -DCMAKE_POSITION_INDEPENDENT_CODE=ON
            -DKTX_FEATURE_TESTS=OFF
            -DKTX_FEATURE_TOOLS=OFF
            -DKTX_FEATURE_DOC=OFF
            -DKTX_FEATURE_LOADTEST_APPS=OFF
            -DKTX_FEATURE_STATIC_LIBRARY=ON
            -DBASISU_SUPPORT_SSE=ON
            -DBUILD_SHARED_LIBS=OFF)
  endif()

  if(NOT AK_KTX2_INCLUDE_DIR OR NOT AK_KTX2_LIBRARY)
    message(WARNING
            "KTX2/BasisU decoder requested but libktx was not found. "
            "Set AK_KTX2_ROOT, enable AK_FETCH_DEPS, or disable "
            "AK_BUILD_GLTF_KTX2_DECODER. Skipping decoder build for now.")
  else()
    add_library(assetkit_ktx2 SHARED
                src/decoders/gltf/ktx2/assetkit_ktx2.cc)
    ak_target_cxx_options(assetkit_ktx2)
    if(TARGET assetkit_ktx2_dep)
      add_dependencies(assetkit_ktx2 assetkit_ktx2_dep)
    endif()
    target_include_directories(assetkit_ktx2
        SYSTEM PRIVATE
            ${AK_KTX2_INCLUDE_DIR})
    target_include_directories(assetkit_ktx2
        PRIVATE
            ${CMAKE_CURRENT_SOURCE_DIR}/include
            ${CMAKE_CURRENT_SOURCE_DIR}/src
            ${PROJECT_SOURCE_DIR}/deps/cglm/include
            ${PROJECT_SOURCE_DIR}/deps/ds/include
            ${PROJECT_SOURCE_DIR}/deps/json/include)
    target_link_libraries(assetkit_ktx2
        PRIVATE
            ${PROJECT_NAME}
            ds
            ${AK_KTX2_LIBRARY})
    set_target_properties(assetkit_ktx2 PROPERTIES
                          CXX_STANDARD 17
                          CXX_STANDARD_REQUIRED YES
                          CXX_VISIBILITY_PRESET hidden
                          VISIBILITY_INLINES_HIDDEN YES)
    if(AK_INSTALL_RPATH)
      set_target_properties(assetkit_ktx2 PROPERTIES
                            INSTALL_RPATH "${AK_INSTALL_RPATH}")
    endif()

    install(TARGETS assetkit_ktx2
            LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
            RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
  endif()
endif()

# Test Configuration
if(AK_USE_TEST)
  include(CTest)
  enable_testing()
  add_subdirectory(test)
endif()

# Install 
install(TARGETS ${PROJECT_NAME}
        EXPORT  ${PROJECT_NAME}
        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

install(DIRECTORY include/ak DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
        PATTERN ".*" EXCLUDE)

# Config
export(TARGETS ${PROJECT_NAME}
       NAMESPACE ${PROJECT_NAME}::
       FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
)

install(EXPORT      ${PROJECT_NAME}
        FILE        "${PROJECT_NAME}Config.cmake"
        NAMESPACE   ${PROJECT_NAME}::
        DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})


================================================
FILE: EXTENSIONS.md
================================================
# Extensions

AssetKit handles glTF extensions in three ways:

- Typed support for extensions that affect AssetKit's runtime model.
- Optional side decoder libraries for compressed payloads.
- Preserved JSON payload through `ak_extra()` for app/vendor-specific data.

## Required Extensions

`extensionsRequired` is strict. If an extension is required for correct
geometry, animation, texture, material, or splat data, AssetKit must implement
it or reject the asset.

`extensionsUsed` can be more permissive. If an optional extension is not needed
for correct loading, AssetKit may preserve the payload in `ak_extra()` so a
viewer/tool can inspect it.

## Optional Decoder Libraries

Compression and heavy decoders live outside the main C library. AssetKit loads
these side libraries only when needed:

- `libassetkit_draco`
- `libassetkit_meshoptimizer`
- `libassetkit_spz`
- `libassetkit_ktx2`

On Windows they are `assetkit_*.dll`; on macOS `libassetkit_*.dylib`; on Linux
`libassetkit_*.so`. AssetKit first searches next to the loaded `libassetkit`
binary, then falls back to the platform loader search path.

CMake builds the side libraries by default when dependencies are available or
can be fetched:

```bash
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
```

Useful options:

```cmake
-DAK_FETCH_DEPS=OFF
-DAK_BUILD_GLTF_DRACO_DECODER=OFF
-DAK_BUILD_GLTF_MESHOPT_DECODER=OFF
-DAK_BUILD_GLTF_SPZ_DECODER=OFF
-DAK_BUILD_GLTF_KTX2_DECODER=OFF
```

## Typed Extension Data

Some extensions are represented as normal AssetKit fields:

- `KHR_materials_variants`
  - `AkDoc.materialVariants`
  - `AkMeshPrimitive.variantMappings`
  - `ak_materialVariantByName()`

- `KHR_gaussian_splatting`
  - `AkMeshPrimitive.gsplat`
  - splat attributes stay in the primitive input chain

- `KHR_animation_pointer`
  - maps supported JSON pointer targets to AssetKit animation targets

SPZ is only a decoder format. Public Gaussian splat data is generic and lives
in `AkGaussianSplat`.

More detail: [docs/source/extensions.rst](docs/source/extensions.rst)


================================================
FILE: EXTRAS.md
================================================
# Extras

AssetKit preserves source-format metadata that it does not need to interpret
directly.

- COLLADA: `<extra>`
- glTF: `extras` and preserved `extensions` payloads

Use `ak_extra()` to read it:

```c
AkTree *extra;

extra = ak_extra(object);
if (extra) {
  /* Walk extra->chld, node->next and node->attribs. */
}
```

Use `ak_extra_set()` when custom loader code wants to attach metadata:

```c
ak_extra_set(object, extraTree);
```

The returned `AkTree` is owned by the document heap. Do not free it directly.

## COLLADA

Older AssetKit code stored COLLADA `<extra>` data directly on struct fields
such as `node->extra`, `mesh->extra`, `geom->extra` or `material->extra`.
Those fields still work. New code should prefer `ak_extra(object)` so the same
path works for COLLADA and glTF.

## glTF

glTF metadata is stored under a root tree named `extra`:

```text
extra
  extensions
    KHR_example_extension
      enabled   type=value val=true
  extras
    author     type=value val=...
```

Each glTF tree node has a `type` attribute:

- `object`
- `array`
- `value`
- `null`
- `unknown`

Array items are repeated child nodes named `item` and preserve source order.

Typed AssetKit fields are still preferred for extensions AssetKit understands,
for example material variants or Gaussian splat metadata. `ak_extra()` is for
metadata, vendor payloads, debug payloads, and extension data that higher-level
tools may want to inspect.

More detail: [docs/source/extras.rst](docs/source/extras.rst)


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   

================================================
FILE: README.md
================================================
<p align="center">
   <img alt="" src="assetkit.png" width="550" />
</p>
<br>

<p align="center">
    <a href="https://github.com/recp/AssetKit/actions/workflows/c-cpp.yml">
        <img src="https://github.com/recp/AssetKit/actions/workflows/c-cpp.yml/badge.svg"
             alt="C/C++ CI">
    </a>
    <a href="https://github.com/recp/AssetKit/actions/workflows/cmake.yml">
        <img src="https://github.com/recp/AssetKit/actions/workflows/cmake.yml/badge.svg"
             alt="CMake">
    </a>
    <a href="https://www.codacy.com/app/recp/assetkit?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=recp/assetkit&amp;utm_campaign=Badge_Grade">
        <img src="https://api.codacy.com/project/badge/Grade/6edde2ba446148759437eb0148c799b6"
             alt="Codacy Badge"/>
    </a>
    <a href="https://coveralls.io/github/recp/assetkit?branch=master">
        <img src="https://coveralls.io/repos/github/recp/assetkit/badge.svg?branch=master"
             alt="Coverage Status"/>
    </a>
    <img src="https://img.shields.io/badge/glTF-2%2E0-green.svg?style=flat"
         alt="glTF Badge">
    <br /><br />
    <a href="https://patreon.com/recp">
      <img src="https://img.shields.io/badge/Patreon-Become a patron-orange.svg"
           alt="Patreon: Become a patron">
    </a>
    <a href="#sponsors">
        <img src="https://opencollective.com/assetkit/sponsors/badge.svg"
             alt="Sponsors on Open Collective"/>
    </a>
    <a href="#backers">
        <img src="https://opencollective.com/assetkit/backers/badge.svg"
             alt="Backers on Open Collective"/>
    </a>
</p>

<br>

<p align="center">
Brand-new modern 3D asset importer, exporter library. This library will include common 3D utils funcs. It is written with C99 but C++ wrappers or other language bindings can be written in the future.

This library will try to full support COLLADA specs and glTF specs, plus well-known other 3D formats e.g .obj, .stl, .ply... 

📌 There is also an optional renderer library called [Graphics Kernel (Realtime Rendering)](https://github.com/recp/libgk) and [rays (Path/Ray Tracer)](https://github.com/recp/rays) which can render **AssetKit** contents. You can see how to load **AssetKit** to [Graphics Kernel](https://github.com/recp/libgk) in [AssetKit-GL](https://github.com/recp/assetkit-gl) repo. Both renderers and documentation with samples will be updated regularly...  

</p>

#### 📚 Documentation (In Progress)

Almost all functions (inline versions) and parameters will be documented inside the corresponding headers. <br />
Complete documentation: http://assetkit.readthedocs.io

Runtime metadata and extension notes:

- [Extras and extension data](EXTRAS.md)
- [glTF extensions and optional decoders](EXTENSIONS.md)

## 💪 Supported Formats

* [ ] Asset Exchange (todo) http://github.com/AssetExchange/spec
* [x] COLLADA 1.4 and COLLADA 1.4.1
* [x] COLLADA 1.5
* [x] glTF 2.0 (Embedded or Separated (.gltf), Binary (.glb), Extensions...)
* [x] Wavefront Obj (.obj + .mtl)
* [x] STL (ASCII, Binary)
* [x] PLY (ASCII, Binary)
* [ ] 3MF (in progress)
* [ ] FBX (License?, probably need to download FBX SDK externally)
* [ ] USD and friends (License?)
* [ ] Alembic (License?)
* [ ] Draco
* [ ] X3D
* [x] in progress for next...
* [ ] Exporter

## 🚀 Features

- Single interface for glTF 2.0 (with extensions), COLLADA 1.4/1.4.1/1.5, Wavefront Obj and others...
- Very very small and very fast library
- Javascript-like API to get URL or ID `obj = ak_getObjectById(doc, objectId)`...
- Options to Generate Mesh Normals *(Default: enabled)*
- Option to Triangulate Polygons *(Default: enabled)*
- Option to change Coordinate System *(Default: enabled)*
- Option to calculate Bounding Boxes *(Default: enabled)*
- Unique and Flexible Coordinate System
  - Support multiple coordinate system
  - Can convert any coordinate system to another with adding transform or with changing transform, vertex data...
- Unique and Flexible Memory Management System
  - Hierarchical unique memory management
    - When a node is freed then all sub memories will be freed
  - COLLADA's **sid** and **ID** values are mapped to memory nodes itself to reduce memory size and make it easy to manage things.
  - Allow attach ID, sid or user data to a memory node
- Object-based Asset support; resolve asset element for any element
- Bugfix some DAE files
- Will be optimized to be fastest, smallest and most flexible, extendible Asset loader.
- Uses **mmap** to load files, you can disable this if needed
- [ ] Documentation
- [x] Cmake support
- [ ] Tests

## 🔨 Build

AssetKit uses CMake on macOS, Linux and Windows. It can be built as a
standalone project, embedded with `add_subdirectory()` or installed and used
with `find_package()`.

### Standalone CMake build

```bash
$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
$ cmake --build build
$ cmake --install build # [Optional]
```

On multi-config generators such as Visual Studio or Xcode:

```bash
$ cmake -S . -B build
$ cmake --build build --config Release
$ cmake --install build --config Release # [Optional]
```

Release builds use the platform compiler's optimized release mode. AssetKit
also has `AK_ENABLE_LTO=ON` for link-time optimization when the compiler and
generator support it; it is off by default for predictable cross-platform
builds.

##### CMake options with defaults:

```CMake
option(AK_SHARED "Shared build" ON)
option(AK_STATIC "Static build" OFF)
option(AK_USE_TEST "Enable Tests" OFF)
option(AK_BUILD_GLTF_DRACO_DECODER "Build optional glTF Draco decoder shim" ON)
option(AK_BUILD_GLTF_MESHOPT_DECODER "Build optional glTF meshoptimizer decoder shim" ON)
option(AK_FETCH_DEPS "Fetch optional decoder dependencies into AK_DEPS_ROOT when missing" ON)
option(AK_ENABLE_LTO "Enable link-time optimization for release builds" OFF)
```

Optional glTF compression decoders are side libraries. They are built next to
the main C library by default, but not linked into `libassetkit`. CMake fetches
missing decoder dependencies into `deps/` by default, so a normal standalone
build produces `libassetkit`, `libassetkit_draco` and
`libassetkit_meshoptimizer` when network access is available:

```bash
$ cmake -S . -B build
$ cmake --build build
```

Use `-DAK_FETCH_DEPS=OFF` with `AK_DRACO_ROOT` / `AK_MESHOPT_ROOT` for
offline or packaged builds. Use `-DAK_BUILD_GLTF_DRACO_DECODER=OFF` or
`-DAK_BUILD_GLTF_MESHOPT_DECODER=OFF` to skip these side libraries.

### Embedded in another CMake project

AssetKit can be used like a submodule:

```cmake
cmake_minimum_required(VERSION 3.16)

project(my_app LANGUAGES C)

add_subdirectory(external/assetkit)

add_executable(my_app src/main.c)
target_link_libraries(my_app PRIVATE assetkit::assetkit)
```

When embedded, AssetKit does not force a default build type on the parent
project. If you do not want CMake to fetch optional decoder dependencies while
configuring your parent project, pass:

```cmake
set(AK_FETCH_DEPS OFF CACHE BOOL "" FORCE)
set(AK_BUILD_GLTF_DRACO_DECODER OFF CACHE BOOL "" FORCE)
set(AK_BUILD_GLTF_MESHOPT_DECODER OFF CACHE BOOL "" FORCE)
add_subdirectory(external/assetkit)
```

### Installed package

After `cmake --install`, consumers can use:

```cmake
find_package(assetkit CONFIG REQUIRED)
target_link_libraries(my_app PRIVATE assetkit::assetkit)
```

### Windows
Windows builds are supported through CMake. `git` must be available when
`GIT_SUBMODULE=ON` or `AK_FETCH_DEPS=ON`.

```Powershell
$ cmake -S . -B build
$ cmake --build build --config Release
```

## Contributors

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/recp/assetkit/graphs/contributors"><img src="https://opencollective.com/assetkit/contributors.svg?width=890&button=false" /></a>


## Backers

Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/assetkit#backer)]

<a href="https://opencollective.com/assetkit#backers" target="_blank"><img src="https://opencollective.com/assetkit/backers.svg?width=890"></a>


## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/assetkit#sponsor)]

<a href="https://opencollective.com/assetkit/sponsor/0/website" target="_blank"><img src="https://opencollective.com/assetkit/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/assetkit/sponsor/1/website" target="_blank"><img src="https://opencollective.com/assetkit/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/assetkit/sponsor/2/website" target="_blank"><img src="https://opencollective.com/assetkit/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/assetkit/sponsor/3/website" target="_blank"><img src="https://opencollective.com/assetkit/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/assetkit/sponsor/4/website" target="_blank"><img src="https://opencollective.com/assetkit/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/assetkit/sponsor/5/website" target="_blank"><img src="https://opencollective.com/assetkit/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/assetkit/sponsor/6/website" target="_blank"><img src="https://opencollective.com/assetkit/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/assetkit/sponsor/7/website" target="_blank"><img src="https://opencollective.com/assetkit/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/assetkit/sponsor/8/website" target="_blank"><img src="https://opencollective.com/assetkit/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/assetkit/sponsor/9/website" target="_blank"><img src="https://opencollective.com/assetkit/sponsor/9/avatar.svg"></a>


### Trademarks

glTF and COLLADA and their logos are trademarks of Khronos Group.


================================================
FILE: appveyor.yml
================================================
image: Visual Studio 2017

build_script:
- ps: >-
    cd win

    .\build.bat


================================================
FILE: docs/make.bat
================================================
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=python -msphinx
)
set SOURCEDIR=source
set BUILDDIR=build
set SPHINXPROJ=cglm

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
	echo.
	echo.The Sphinx module was not found. Make sure you have Sphinx installed,
	echo.then set the SPHINXBUILD environment variable to point to the full
	echo.path of the 'sphinx-build' executable. Alternatively you may add the
	echo.Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.http://sphinx-doc.org/
	exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd


================================================
FILE: docs/source/api.rst
================================================
API documentation
================================

.. toctree::
   :maxdepth: 1
   :caption: API categories:

   version


================================================
FILE: docs/source/build.rst
================================================
Build AssetKit
================================

| **AssetKit** core uses bundled submodules. Optional glTF decoder side
  libraries can fetch their decoder dependencies when enabled. The same CMake
  project can be used standalone, as a subdirectory in another CMake project,
  or as an installed package.

Standalone CMake build:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash
  :linenos:

  $ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
  $ cmake --build build
  $ cmake --install build # [Optional]

With multi-config generators such as Visual Studio or Xcode:

.. code-block:: bash
  :linenos:

  $ cmake -S . -B build
  $ cmake --build build --config Release
  $ cmake --install build --config Release # [Optional]

The build folder contains the main AssetKit library and, by default, optional
glTF decoder side libraries.

**CMake Options:**

.. code-block:: CMake
  :linenos:

  option(AK_SHARED "Shared build" ON)
  option(AK_STATIC "Static build" OFF)
  option(AK_USE_C99 "" OFF) # C11 
  option(AK_USE_TEST "Enable Tests" OFF) # for make check - make test
  option(AK_BUILD_GLTF_DRACO_DECODER "Build optional glTF Draco decoder shim" ON)
  option(AK_BUILD_GLTF_MESHOPT_DECODER "Build optional glTF meshoptimizer decoder shim" ON)
  option(AK_FETCH_DEPS "Fetch optional decoder dependencies into AK_DEPS_ROOT when missing" ON)
  option(AK_ENABLE_LTO "Enable link-time optimization for release builds" OFF)

``AK_ENABLE_LTO`` is optional. Release builds already use optimized compiler
flags; LTO is off by default because support differs by compiler, generator and
platform.

Embedded in another CMake project:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: CMake
  :linenos:

  cmake_minimum_required(VERSION 3.16)
  
  project(my_app LANGUAGES C)
  
  add_subdirectory(external/assetkit/)

  add_executable(my_app src/main.c)
  target_link_libraries(my_app PRIVATE assetkit::assetkit)

When embedded, AssetKit does not force a default build type on the parent
project. If dependency fetching is not wanted during parent configure:

.. code-block:: CMake
  :linenos:

  set(AK_FETCH_DEPS OFF CACHE BOOL "" FORCE)
  set(AK_BUILD_GLTF_DRACO_DECODER OFF CACHE BOOL "" FORCE)
  set(AK_BUILD_GLTF_MESHOPT_DECODER OFF CACHE BOOL "" FORCE)
  add_subdirectory(external/assetkit/)

Installed package:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: CMake
  :linenos:

  find_package(assetkit CONFIG REQUIRED)
  target_link_libraries(my_app PRIVATE assetkit::assetkit)

Optional glTF compression decoders:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash
  :linenos:

  $ cmake -S . -B build
  $ cmake --build build

Decoder side libraries are built next to ``libassetkit`` by default, but not
linked into the main C library. CMake fetches missing decoder dependencies into
``deps/`` by default. Use ``-DAK_FETCH_DEPS=OFF`` with ``AK_DRACO_ROOT`` /
``AK_MESHOPT_ROOT`` for offline or packaged builds. Use
``-DAK_BUILD_GLTF_DRACO_DECODER=OFF`` or
``-DAK_BUILD_GLTF_MESHOPT_DECODER=OFF`` to skip these side libraries.

Windows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Windows builds use CMake. ``git`` must be available when ``GIT_SUBMODULE=ON``
or ``AK_FETCH_DEPS=ON``.

.. code-block:: bash
  :linenos:

  $ cmake -S . -B build
  $ cmake --build build --config Release

Currently tests are not available on Windows.

Documentation (Sphinx):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

**AssetKit** uses sphinx framework for documentation, it allows lot of formats for documentation. To see all options see sphinx build page:

https://www.sphinx-doc.org/en/master/man/sphinx-build.html

Example build:

.. code-block:: bash
  :linenos:

  $ cd assetkit/docs
  $ sphinx-build source build


================================================
FILE: docs/source/conf.py
================================================
# -*- coding: utf-8 -*-
#
# AssetKit documentation build configuration file, created by
# sphinx-quickstart on Tue Jun  6 20:31:05 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    'sphinx.ext.doctest',
    'sphinx.ext.todo',
    'sphinx.ext.coverage',
    'sphinx.ext.mathjax',
    'sphinx.ext.ifconfig',
    'sphinx.ext.viewcode',
    'sphinx.ext.githubpages'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'AssetKit'
copyright = u'2020, Recep Aslantas'
author = u'Recep Aslantas'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'0.3.2'
# The full version, including alpha/beta/rc tags.
release = u'0.3.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

html_theme_options = {
    # 'github_banner': 'true',
    # 'github_button': 'true',
    # 'github_user': 'recp',
    # 'github_repo': 'AssetKit',
    # 'travis_button': 'true',
    # 'show_related': 'true',
    # 'fixed_sidebar': 'true'
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'assetkitdoc'


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
    # The paper size ('letterpaper' or 'a4paper').
    #
    # 'papersize': 'letterpaper',

    # The font size ('10pt', '11pt' or '12pt').
    #
    # 'pointsize': '10pt',

    # Additional stuff for the LaTeX preamble.
    #
    # 'preamble': '',

    # Latex figure (float) alignment
    #
    # 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
#  author, documentclass [howto, manual, or own class]).
latex_documents = [
    (master_doc, 'AssetKit.tex', u'AssetKit Documentation',
     u'Recep Aslantas', 'manual'),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
    (master_doc, 'AssetKit', u'AssetKit Documentation',
     [author], 1)
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
#  dir menu entry, description, category)
texinfo_documents = [
    (master_doc, 'AssetKit', u'AssetKit Documentation',
     author, 'AssetKit', 'One line description of project.',
     'Miscellaneous'),
]

# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']


# -- Extension configuration -------------------------------------------------

# -- Options for todo extension ----------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True


================================================
FILE: docs/source/getting_started.rst
================================================
Getting Started
================================

There are lot of file formats out there. It is not easy to implement each of them 
individually in an engine or software. 

**AssetKit** provides single extensible interface for all file formats that is supported. 
**AssetKit** tries to full support all major file formats.


================================================
FILE: docs/source/index.rst
================================================
.. cglm documentation master file, created by
   sphinx-quickstart on Tue Jun  6 20:31:05 2017.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

.. image:: assetkit.png
   :width: 492px 
   :height: 297px
   :align: center

|

**AssetKit** is brand-new 2D/3D asset importer, exporter and util library that
is written in C language. C++ wrappers or other language bindings 
can be written in the future. This library will include common 3D util funcs.

Supported Formats
================================================================================

* [x] COLLADA 1.4 and COLLADA 1.4.1
* [x] COLLADA 1.5
* [x] glTF 2.0 (Embedded or Separated (.gltf), Binary (.glb), Extensions...)
* [x] Wavefront Obj (.obj + .mtl)
* [x] STL (ASCII, Binary)
* [x] PLY (ASCII, Binary)
* [ ] USD and friends (License?)
* [ ] Alembic (License?)
* [ ] Draco
* [ ] X3D
* [x] in progress for next...

Features
================================================================================

* Very very small, very fast and flexible library
* Single interface for glTF 2.0 (with extensions), COLLADA 1.4/1.4.1/1.5, Wavefront Obj and others...
* Javascript-like API to get URL or ID `obj = ak_getObjectById(doc, objectId)`...
* Options to Generate Mesh Normals *(Default: enabled)*
* Option to Triangulate Polygons *(Default: enabled)*
* Option to change Coordinate System *(Default: enabled)*
* Option to calculate Bounding Boxes *(Default: enabled)*
* Unique and Flexible Coordinate System
  * Support multiple coordinate system
  * Can convert any coordinate system to another with adding transform or with changing transform, vertex data...
* Unique and Flexible Memory Management System 
    * Hierarchical unique memory management 
    * When a node is freed then all sub memories will be freed
    * COLLADA's **sid** and **ID** values are mapped to memory nodes itself to reduce memory size and make it easy to manage things.
    * Allow attach ID, sid or user data to a memory node
* Object-based Asset support; resolve asset element for any element
* Bugfix some DAE files
* Will be optimized to be fastest, smallest and most flexible, extendible Asset loader.
* and others...

.. toctree::
   :maxdepth: 2
   :caption: Getting Started:

   build
   getting_started

.. toctree::
   :maxdepth: 3
   :caption: Tutorials:

   quick_intro

.. toctree::
   :maxdepth: 2
   :caption: API:

   api

.. toctree::
   :maxdepth: 2
   :caption: Options:

   opt

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


================================================
FILE: docs/source/opt.rst
================================================
.. default-domain:: C

Options
===============================================================================

Currently **AssetKit** provides global options but in th future document based 
options may be supported.

Options / Preferences / Settings Design
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To make things simplier and easy to manage, **AssetKit** provides options as 
**key** - **value** pair. 

The key always is the :code:`AkOption` enum type. 
The value's type is :code:`uintptr_t`, so you can pass integers, enums and pointers (by casting to `uintptr_t` e.g. :code:`(uintptr_t)(void *)myPointer`).

Documented global options:

.. code-block:: c

    typedef enum AkOption {
      AK_OPT_INDICES_DEFAULT            = 0,  /* false    */
      AK_OPT_INDICES_SINGLE_INTERLEAVED = 1,  /* false    */
      AK_OPT_INDICES_SINGLE_SEPARATE    = 2,  /* false    */
      AK_OPT_INDICES_SINGLE             = 3,  /* false    */
      AK_OPT_NOINDEX_INTERLEAVED        = 4,  /* true     */
      AK_OPT_NOINDEX_SEPARATE           = 5,  /* true     */
      AK_OPT_COORD                      = 6,  /* Y_UP     */
      AK_OPT_DEFAULT_ID_PREFIX          = 7,  /* id-      */
      AK_OPT_COMPUTE_BBOX               = 8,  /* false    */
      AK_OPT_TRIANGULATE                = 9,  /* true     */
      AK_OPT_GEN_NORMALS_IF_NEEDED      = 10, /* true     */
      AK_OPT_DEFAULT_PROFILE            = 11, /* COMMON   */
      AK_OPT_EFFECT_PROFILE             = 12, /* true     */
      AK_OPT_TECHNIQUE                  = 13, /* "common" */
      AK_OPT_TECHNIQUE_FX               = 14, /* "common" */
      AK_OPT_ZERO_INDEXED_INPUT         = 15, /* false    */
      AK_OPT_IMAGE_LOAD_FLIP_VERTICALLY = 16, /* true     */
      AK_OPT_ADD_DEFAULT_CAMERA         = 17, /* true     */
      AK_OPT_ADD_DEFAULT_LIGHT          = 18, /* false    */
      AK_OPT_COORD_CONVERT_TYPE         = 19, /* DEFAULT  */
      AK_OPT_BUGFIXES                   = 20, /* TRUE     */
      AK_OPT_GLTF_EXT_SPEC_GLOSS        = 21, /* TRUE     */
      AK_OPT_COMPUTE_EXACT_CENTER       = 22  /* FALSE    */
    } AkOption;

The comment at right contains default value for that option. 
All options will be documented below. (**TODO**)

As you can see and imagine, not all options are integer or boolean.
For instance to set :code:`Y_UP` for :code:`AK_OPT_COORD` option, you need to cast :code:`Y_UP` opinter to :code:`uintptr_t` type.

Sample options:

.. code-block:: c

    /* compute bounding box for mesh and for its primitives */
    ak_opt_set(AK_OPT_COMPUTE_BBOX, true);

    /* triangulate meshes that are not triangles e.g. polygons... */
    ak_opt_set(AK_OPT_TRIANGULATE, true);

    /* change UP axis to Y UP, see coordinate sys documentation. */
    ak_opt_set(AK_OPT_TRIANGULATE, (uintptr_t)AK_YUP);

Functions:

1. :c:func:`ak_opt_set`
#. :c:func:`ak_opt_get`
#. :c:func:`ak_opt_set_str`

.. c:function:: void ak_opt_set(AkOption option, uintptr_t value)

    Sets an option by key and value. Pass integers, booleans or pointers as value. 
    Value needs to be casted to **uintptr_t**. Pass only supported values for a key.

    Parameters:
      | *[in]* **option** option (see AkOption enum)
      | *[in]* **value**  option value

.. c:function:: uintptr_t ak_opt_get(AkOption option)

    Get value of option as **uintptr_t**. If the option is pointer than you need to cast it to pointer. 
    For instance :code:`(AkCoordSys *)ak_opt_get(AK_OPT_COORD)` or :code:`(void *)ak_opt_get(AK_OPT_COORD)`.
    If there are no warnings then you don't need to cast result to Boolean or Integers for Boolean/Integer options.
    For instance :code:`if (ak_opt_get(AK_OPT_TRIANGULATE)) ...`

    Parameters:
      | *[in]* **option** option (see AkOption enum)

.. c:function:: void ak_opt_set_str(AkOption option, const char *value)

    Similar to :c:func:`ak_opt_set` but it accepts null terminated string parameter 
    and it uses :c:func:`ak_strdup` to duplicate string to keep it. 
    Then it casts duplicated string to :code:`uintptr_t`, so you can get value anytime with :c:func:`ak_opt_get`.

    **NOTE:** When you set new value then the old value will be free-ed. 
    If you need to keep old value then you must duplicate it yourself.
    Otherwise memory leaks would occoured...

    Parameters:
      | *[in]* **option** option (see AkOption enum)
      | *[in]* **value**  option value as null-terminated string


================================================
FILE: docs/source/quick_intro.rst
================================================
Quick Implementation
===================================

Assuming you already followed Build instructions and Getting Started sections.
Also assuming you already linked **AssetKit** to your project and set include paths.

1. Include
----------------

**AssetKit** uses **ak** prefix for all functions and type names. To include **AssetKit** 

.. code-block:: c
  :linenos:

  #include <ak/assetkit.h>

  /* other headers */
  #include <ak/options.h>
  ...

2. Preparing
----------------

You may want to prepare loader before call :c:func:`ak_load` load function. 

a. Setting Image loader
~~~~~~~~~~~~~~~~~~~~~~~~

There was image loader inside **AssetKit** but it has been dropped to make it more generic.
Becasue you may already have an image loader e.g. stb_image ... 

**AssetKit** can trigger images and cache them for you, if it is already loaded than it will return loaded contents.

You need to set loader as below. The example used stb_image but you mat use another image loader...

.. code-block:: c
  :linenos:

  void*
  imageLoadFromFile(const char * __restrict path,
                    int        * __restrict width,
                    int        * __restrict height,
                    int        * __restrict components) {
    return stbi_load(path, width, height, components, 0);
  }

  void*
  imageLoadFromMemory(const char * __restrict data,
                      size_t                  len,
                      int        * __restrict width,
                      int        * __restrict height,
                      int        * __restrict components) {
    return stbi_load_from_memory((stbi_uc const*)data, (int)len, width, height, components, 0);
  }

  void
  imageFlipVerticallyOnLoad(bool flip) {
    stbi_set_flip_vertically_on_load(flip);
  }


  /* Call this before loading document e.g. ak_load() or images */
  ak_imageInitLoader(imageLoadFromFile, imageLoadFromMemory, imageFlipVerticallyOnLoad);

Just ensure that you set image loader before loading images. It is good to set it once before :c:func:`ak_load`.

b. Setting Options if Needed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Make sure that you set UP axis if you want to different one from **Y_UP**. 
For instance if you want to load contents as **Z_UP** 

.. code-block:: c

  ak_opt_set(AK_OPT_COORD, (uintptr_t)AK_ZUP);

see options in the documentation. If the default values don't work for you then just change them before :c:func:`ak_load`.

3. Load Document
----------------

Use :c:func:`ak_load()` to load a 3D file. It returns :c:type:`AkDoc` which contains everything you need.
You must check the result/return, it must be AK_OK otherwise, document is not loaded or falied at some point.

.. code-block:: c
  :linenos:

  AkDoc   *doc;
  AkResult ret;
  
  if ((ret = ak_load(&doc, "[Path to a file e.g ./sample.gltf]", NULL) != AK_OK) {
     printf("Document couldn't be loaded");
     return;
  }

or 

.. code-block:: c
  :linenos:

  AkDoc   *doc;
  AkResult ret;
  
  ret = ak_load(&doc, "[Path to a file e.g ./sample.gltf]", NULL);
  if (ret != AK_OK) {
     printf("Document couldn't be loaded");
     return;
  }

**doc** is passed as reference, if the result is success than the document will be set that reference parameter.

**AssetKit** will try to load referenced textures, images, binary files... so you must only pass original file, not folder.

Now you loaded the document you want. See next step.

------

There are two ways to load geometries from loaded document.

a. Load scene[s], nodes than load referenced geometries
b. Load all geometries in the document

The second way may cause to load unused geometries, because a geometry may not be referenced in scenes.
It is better to follow scene > node > instance geometry > geometry path.

4. Load Scene[s]
----------------

**AssetKit** can load scenes, nodes, geometries and so on. If the file you loaded doesn't support scenes e.g Wavefront Obj.
AssetKit creates a default scene for that file formats and adds reference of geometries to that scene.

There are **scene library** and **scene** in AssetKit **document**. The **scene** is the active scene for rendering, it references a scene from library.

.. code-block:: c
  :linenos:

  AkInstanceBase *instScene;
  AkVisualScene  *scene;

  if ((instScene = doc->scene.visualScene)) {
    scene = (AkVisualScene *)ak_instanceObject(doc->scene.visualScene);
  }

`scene.visualScene` is instance reference ( :c:type:`AkInstanceBase` ), any scene may be instanced with this link/object.
Another instance objects may have different types e.g. instance geometry (inherited from :c:type:`AkInstanceBase`).

We need to get actual scene object from instance object. There are a few helpers for this task.
But we will use :c:func:`ak_instanceObject` here. 

5. Load Nodes[s]
----------------

After you get a scene, you can iterate through root nodes. There are also nodes in NodeLibrary in document but in this way you only get used nodes.

There are a few elements in nodes

- Node Transform
- One or more instance geometries
- One or more instance cameras
- One or more instance lights
- One or more instance nodes
- One or more child nodes
- Bounding Box as AABB of Node
- ...

5.1 Transforms
~~~~~~~~~~~~~~~~

You must multiply node's transform with its parent to get transform in WORLD space for each node recursively.

A node can contain Matrix or individual Transform Elements like Rotation, Translation or Scaling. 
**AssetKit** also provides a util to combine these individual transforms into matrix with :c:func:`ak_transformCombine`.

**AssetKit** does not combines them automatically because they may be referenced to animated individually.

5.2 Instance Geometries
~~~~~~~~~~~~~~~~~~~~~~~~

This is the one of critical sections to understand. Nodes uses :c:type:`AkInstanceGeometry` type to reference a :c:type:`AkGeometry`.

A :c:type:`AkInstanceGeometry` object may store these informations:

* Instance to geometry
* Material to bind
* Instance to morpher
* Instance to skinner

5.2.1 Instance to geometry | Loading Geometry
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A node may contain multiple geometries, so you must iterate each one and get the geometry with :c:func:`ak_instanceObject` function.

After you get the geometry you can load geeometry elements. A :c:type:`AkGeometry` object can contain one of mesh, spline and brep.

.. code-block:: c
  :linenos:

  AkObject *prim;
  AkResult  ret;

  /* 
     return if the geometry is already loaded, 
     you can use a RBTree or HasMap... (see https://github.com/recp/ds) 
    */

  prim = geom->gdata;
  switch ((AkGeometryType)prim->type) {
    case AK_GEOMETRY_MESH:
       /* load mesh */
      ret = loadMesh(...);
      break;
    default:
      ret = AK_ERR;
  }

  return ret;

Now it is time to load a mesh.

5.2.2 Loading mesh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This tutorial will only cover loading meshes, extra tutorials may be provided in the future for loading curves, nurbs...

A mesh object is packed as :c:type:`AkObject` inside :c:type:`AkGeometry`. In previous section you may see that we have 
a switch control to check whether we have a mesh inside geometry or not.

**AssetKit** provides unique design to store this kind of objects with :c:type:`AkObject`. 
(Think :c:type:`AkObject` as **Object** class in .NET or **NSObject** in ObjC.)
Otherwise we would store 
additional pointers or inherits Mesh from Geometry and then cast it to mesh. This is another option of course, 
even **AssetKit** may change to this design in the future if needed. Currently we are not doing this because geometry 
object is top container.

**AssetKit** provides a helper to get object from :c:type:`AkObject` with :c:func:`ak_objGet` macro.

We can get :c:type:`AkMesh` object from :c:type:`AkGeometry` as

.. code-block:: c
  :linenos:

  AkMesh *mesh;
  
  mesh = ak_objGet(geom->gdata);

Now we have mesh object. Let's inspect a mesh type.

A mesh contains one or more primitives (or submeshes) as :c:type:`AkMeshPrimitive`. 
Each primitive contains AABB, the mesh also contains an AABB which is sum of all.

A mesh also contains default weights for morph targets but a Node in Scene object can override that.

5.2.2.1 Loading mesh primitives
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A mesh primitive may be one of :c:type:`AkLines`, :c:type:`AkPolygon` or :c:type:`AkTriangles`. 
:c:type:`AkMeshPrimitive` is base type for all of them. You can cast them to :c:type:`AkMeshPrimitive` or you can use **.base** member.


================================================
FILE: docs/source/version.rst
================================================
.. default-domain:: C

version
================================================================================

Header: ak/version.h

**AssetKit** uses semantic versioning (http://semver.org) which is MAJOR.MINOR.PATCH 

| **AK_VERSION_MAJOR** is major number of the version.
| **AK_VERSION_MINOR** is minor number of the version.
| **AK_VERSION_PATCH** is patch number of the version.

every release increases these numbers. You can check existing version by 
including `ak/version.h`


================================================
FILE: include/ak/animation.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_animation_h
#define assetkit_animation_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"
  
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "type.h"
#include "source.h"
#include "url.h"

typedef enum AkSamplerBehavior {
  AK_SAMPLER_BEHAVIOR_UNDEFINED      = 0,
  AK_SAMPLER_BEHAVIOR_CONSTANT       = 1,
  AK_SAMPLER_BEHAVIOR_GRADIENT       = 2,
  AK_SAMPLER_BEHAVIOR_CYCLE          = 3,
  AK_SAMPLER_BEHAVIOR_OSCILLATE      = 4,
  AK_SAMPLER_BEHAVIOR_CYCLE_RELATIVE = 5
} AkSamplerBehavior;

typedef enum AkTargetPropertyType {
  AK_TARGET_UNKNOWN  = 0,
  AK_TARGET_X        = 1,
  AK_TARGET_Y        = 2,
  AK_TARGET_Z        = 3,
  AK_TARGET_XY       = 4,
  AK_TARGET_XYZ      = 5,
  AK_TARGET_ANGLE    = 6,
  AK_TARGET_POSITION = 7,
  AK_TARGET_SCALE    = 8,
  AK_TARGET_ROTATE   = 9,
  AK_TARGET_QUAT     = 10,
  AK_TARGET_WEIGHTS  = 11,
  AK_TARGET_FLOAT    = 12,
  AK_TARGET_VEC2     = 13,
  AK_TARGET_VEC3     = 14,
  AK_TARGET_VEC4     = 15,
  AK_TARGET_COLOR    = 16,
  AK_TARGET_BOOL     = 17
} AkTargetPropertyType;

typedef enum AkInterpolationType {
  AK_INTERPOLATION_UNKNOWN  = 0,
  AK_INTERPOLATION_LINEAR   = 1,
  AK_INTERPOLATION_BEZIER   = 2,
  AK_INTERPOLATION_CARDINAL = 3,
  AK_INTERPOLATION_HERMITE  = 4,
  AK_INTERPOLATION_BSPLINE  = 5,
  AK_INTERPOLATION_STEP     = 6,

  AK_INTERPOLATION_MAXLEN   = 255
} AkInterpolationType;

typedef struct AkAnimSampler {
  AkOneWayIterBase      base;
  AkInput              *input;

  AkInput              *inputInput;
  AkInput              *outputInput;
  AkInput              *interpInput;
  AkInput              *inTangentInput;
  AkInput              *outTangentInput;

  AkInterpolationType   uniInterpolation;
  AkSamplerBehavior     pre;
  AkSamplerBehavior     post;
} AkAnimSampler;

typedef struct AkResolvedTarget {
  void    *target;
  uint32_t off;
  bool     isPartial;
} AkResolvedTarget;

typedef struct AkChannel {
  struct AkChannel    *next;
  const char          *target;
  AkResolvedTarget    *resolvedTarget;
  AkURL                source;
  AkTargetPropertyType targetType;
} AkChannel;

typedef struct AkAnimation {
  AkOneWayIterBase    base;
  struct AkAnimation *animation; /* subanimation */
  AkAnimSampler      *sampler;
  AkChannel          *channel;
  const char         *name;
  AkTree             *extra;
  
  /* TODO: WILL BE DELETED */
  AkSource           *source;
} AkAnimation;

/*!
 * Per-frame transform sequence produced by ak_nodeBakeAnimation().
 * `matrices` is `count × 16` floats, column-major (cglm convention),
 * each block mapping a node-local point into its parent's space.
 * `times` is `count` floats, parallel to the matrix array.
 *
 * Free with ak_free(out) — the inner buffers were sub-allocated under
 * the struct and cascade in the AssetKit heap.
 */
typedef struct AkBakedAnimation {
  float    *matrices;  /* count × 16 floats, column-major */
  float    *times;     /* count floats                    */
  uint32_t  count;
} AkBakedAnimation;

AK_INLINE
bool
ak_channelTargetIsPartial(const AkChannel *ch) {
  return ch->target && strchr(ch->target, '.') != NULL;
}

/**
 * returns NULL if no attribute (whole target animation),
 * otherwise pointer into ch->target after the '.'
 * result lifetime tied to ch->target — do NOT free
 */
AK_INLINE
const char *
ak_channelTargetAttr(const AkChannel *ch) {
  const char *dot;
  if (!ch->target || !(dot = strchr(ch->target, '.'))) return NULL;
  return dot + 1;
}

AK_INLINE
AkResolvedTarget
ak_channelTarget(AkContext * __restrict ctx,
                 AkChannel * __restrict ch) {
  const char      *sidAttrib;
  AkResolvedTarget resolved = {0};
  uint32_t         attrOff;

  /** glTF (and DAE post-fixup) provide a pre-resolved target. Honor it
      first — the SID string in ch->target is then optional and used only
      as a debug/lookup hint.

      glTF example: target => "translation"
        ch->resolvedTarget = AkResolvedTarget* with target = AkTranslate*
        and off = 0 (glTF animates the whole transform element).

      DAE example for morph weights: target => "morph-weights(0)"
        dae_fixup_channel resolves the source-and-(idx) pattern at fixup
        time and writes ch->resolvedTarget = AkResolvedTarget* with target
        = AkInstanceMorph*, off = idx, isPartial = true. */
  if (ch->resolvedTarget)
    return *ch->resolvedTarget;

  /** DAE SID path: "node1/translate.Y"
      resolved.target = AkTranslate*, sidAttrib = "Y" */
  if (ch->target) {
    if ((resolved.target = ak_sid_resolve(ctx, ch->target, &sidAttrib))
        && (attrOff = ak_sid_attr_offset(sidAttrib)) != UINT32_MAX) {
      resolved.isPartial = sidAttrib != NULL;
      resolved.off       = attrOff;
    } else {
      resolved.target    = NULL;
    }
  }

  return resolved;
}

#define ak_inputBegin(INP, T) (*(T*)INP->data)
#define ak_inputEnd(INP, T)   (*(T*)((char*)INP->data + INP->len - sizeof(T)))

/*!
 * @brief Test whether two animations would write to any of the same
 *        animatable slot. Two channels conflict iff they resolve (via
 *        ak_channelTarget) to the same target pointer AND either at least
 *        one is a whole-target write, or they share the same partial slot
 *        offset.
 *
 *        Useful for runtime players that pick which animations may run in
 *        parallel — overlapping writes otherwise produce undefined ordering.
 *
 * @param ctx resolution context (used to evaluate SID-targeted channels)
 * @param a   first animation
 * @param b   second animation
 * @return    true iff any pair of channels conflicts
 */
AK_EXPORT
bool
ak_animationsConflict(AkContext   * __restrict ctx,
                      AkAnimation * __restrict a,
                      AkAnimation * __restrict b);

/*!
 * @brief Build the maximal conflict-free set anchored at `primary`.
 *
 *        `primary` is always selected (it's the animation the caller wants
 *        to activate). Then each candidate is tested against everything
 *        already selected — added if it doesn't conflict with any of them.
 *
 *        First-fit greedy: candidate iteration order decides which side
 *        of a conflict wins. Pass candidates in the priority order you
 *        want (typically: doc order with `primary` excluded).
 *
 *        Use case: a UI like "user clicked Animation 2 — what other
 *        animations can stay enabled in parallel?"
 *
 * @param ctx              resolution context
 * @param primary          anchor animation (must be in result, may be NULL)
 * @param candidates       array of candidate AkAnimation* pointers
 * @param candidatesCount  length of candidates
 * @param outCompatible    pre-allocated buffer of at least
 *                         `candidatesCount + 1` AkAnimation* slots
 * @return count of selected animations (= written into outCompatible)
 */
AK_EXPORT
size_t
ak_animationsCompatibleSet(AkContext         * __restrict ctx,
                           AkAnimation       * __restrict primary,
                           AkAnimation      ** __restrict candidates,
                           size_t                         candidatesCount,
                           AkAnimation      ** __restrict outCompatible);

/*!
 * @brief Total number of animations across every animation library on the
 *        document. Useful for sizing buffers passed to the *FromDoc
 *        compatible-set helper.
 */
AK_EXPORT
size_t
ak_animationsCount(struct AkDoc * __restrict doc);

/*!
 * @brief Convenience over `ak_animationsCompatibleSet` that walks the
 *        document's animation libraries itself — so callers don't have to
 *        materialise a `candidates[]` array.
 *
 * @param ctx           resolution context
 * @param doc           the AssetKit document
 * @param primary       anchor animation (must be in result, may be NULL)
 * @param outCompatible pre-allocated buffer of at least
 *                      `ak_animationsCount(doc) + 1` slots
 * @return count of selected animations
 */
AK_EXPORT
size_t
ak_animationsCompatibleSetFromDoc(AkContext     * __restrict ctx,
                                  struct AkDoc  * __restrict doc,
                                  AkAnimation   * __restrict primary,
                                  AkAnimation  ** __restrict outCompatible);


/*!
 * @brief Hint that the node's animation should be baked rather than
 *        driven via per-property channels.
 *
 *        Returns true when the node's transform chain holds 2+ rotate
 *        elements — the canonical case is a Maya joint with
 *        jointOrient{XYZ} + rotate{XYZ} (six <rotate> elements in one
 *        chain, only three Euler slots in any decomposed-property
 *        animation API: SCNNode.eulerAngles, three.js Object3D.rotation,
 *        Filament TransformManager rotation).
 *
 *        Renderers that animate via decomposed properties MUST bake
 *        these nodes — partial rotates clobber each other in the
 *        Euler slot. Renderers that compose joint world matrices on
 *        the CPU per frame (assetkit-opengl/gk pattern) don't need
 *        this and can keep their per-channel walk.
 */
AK_EXPORT
bool
ak_nodeNeedsBaking(struct AkNode * __restrict node);

/*!
 * @brief Sample every animation channel that targets any AkObject in
 *        `node->transform` (translate / rotate / scale / matrix /
 *        skew / quat) on a shared time grid and emit a stream of 4×4
 *        local matrices.
 *
 *        Time grid is the union of the involved channels' keyframe
 *        times (no resampling — every original keyframe is preserved
 *        exactly; channels that lack a value at some t are linearly
 *        interpolated). STEP interpolation is honored; BEZIER /
 *        HERMITE fall back to LINEAR (the bake is keyframe-aligned,
 *        so engine-side interpolation can refine the curve).
 *
 *        Static AkObjects in the chain (those with no targeting
 *        channel) keep their authored values — bind pose is preserved
 *        between animated frames. The function snapshot/restores
 *        animated AkObject state so callers can keep using
 *        node->transform for bind-pose composition afterwards.
 *
 *        Output AkBakedAnimation is heap-allocated; caller frees with
 *        ak_free(out). Returns NULL when the node has no transform or
 *        no channel targets any element of its chain.
 */
AK_EXPORT
AkBakedAnimation*
ak_nodeBakeAnimation(struct AkDoc  * __restrict doc,
                     struct AkNode * __restrict node);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_animation_h */


================================================
FILE: include/ak/assetkit.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_h
#define assetkit_h

#include <stdlib.h>
#include <time.h>

#include "common.h"

#ifdef __cplusplus
extern "C" {
#endif

struct FList;
struct FListItem;
struct AkBuffer;
struct AkLibrary;

/* End Core Value Types */

#include "core-types.h"
#include "memory.h"
#include "coord.h"
#include "url.h"
#include "type.h"

typedef enum AkFileType {
  AK_FILE_TYPE_AUTO      = 0,
  AK_FILE_TYPE_COLLADA   = 1,
  AK_FILE_TYPE_GLTF      = 2,
  AK_FILE_TYPE_WAVEFRONT = 3,
  AK_FILE_TYPE_STL       = 4,
  AK_FILE_TYPE_PLY       = 5,
  AK_FILE_TYPE_3MF       = 6
} AkFileType;

typedef enum AkAltitudeMode {
  AK_ALTITUDE_RELATIVETOGROUND = 0,
  AK_ALTITUDE_ABSOLUTE         = 1
} AkAltitudeMode;

typedef enum AkFace {
  AK_FACE_POSITIVE_X = 1,
  AK_FACE_NEGATIVE_X = 2,
  AK_FACE_POSITIVE_Y = 3,
  AK_FACE_NEGATIVE_Y = 4,
  AK_FACE_POSITIVE_Z = 5,
  AK_FACE_NEGATIVE_Z = 6
} AkFace;

typedef enum AkChannelFormat {
  AK_CHANNEL_FORMAT_RGB  = 1,
  AK_CHANNEL_FORMAT_RGBA = 2,
  AK_CHANNEL_FORMAT_RGBE = 3,
  AK_CHANNEL_FORMAT_L    = 4,
  AK_CHANNEL_FORMAT_LA   = 5,
  AK_CHANNEL_FORMAT_D    = 6,
  AK_CHANNEL_FORMAT_XYZ  = 7,
  AK_CHANNEL_FORMAT_XYZW = 8
} AkChannelFormat;

typedef enum AkRangeFormat {
  AK_RANGE_FORMAT_SNORM = 1,
  AK_RANGE_FORMAT_UNORM = 2,
  AK_RANGE_FORMAT_SINT  = 3,
  AK_RANGE_FORMAT_UINT  = 4,
  AK_RANGE_FORMAT_FLOAT = 5
} AkRangeFormat;

typedef enum AkPrecisionFormat {
  AK_PRECISION_FORMAT_DEFAULT = 1,
  AK_PRECISION_FORMAT_LOW     = 2,
  AK_PRECISION_FORMAT_MID     = 3,
  AK_PRECISION_FORMAT_HIGHT   = 4,
  AK_PRECISION_FORMAT_MAX     = 5
} AkPrecisionFormat;

typedef enum AkInputSemantic {
  /* read semanticRaw */
  AK_INPUT_OTHER           = 0,
  AK_INPUT_BINORMAL        = 1,
  AK_INPUT_COLOR           = 2,
  AK_INPUT_CONTINUITY      = 3,
  AK_INPUT_IMAGE           = 4,
  AK_INPUT_INPUT           = 5,
  AK_INPUT_IN_TANGENT      = 6,
  AK_INPUT_INTERPOLATION   = 7,
  AK_INPUT_INV_BIND_MATRIX = 8,
  AK_INPUT_JOINT           = 9,
  AK_INPUT_LINEAR_STEPS    = 10,
  AK_INPUT_MORPH_TARGET    = 11,
  AK_INPUT_MORPH_WEIGHT    = 12,
  AK_INPUT_NORMAL          = 13,
  AK_INPUT_OUTPUT          = 14,
  AK_INPUT_OUT_TANGENT     = 15,
  AK_INPUT_POSITION        = 16,
  AK_INPUT_TANGENT         = 17,
  AK_INPUT_TEXBINORMAL     = 18,
  AK_INPUT_TEXCOORD        = 19,
  AK_INPUT_TEXTANGENT      = 20,
  AK_INPUT_UV              = 21,
  AK_INPUT_WEIGHT          = 22
} AkInputSemantic;

typedef enum AkCurveElementType {
  AK_CURVE_LINE      = 1,
  AK_CURVE_CIRCLE    = 2,
  AK_CURVE_ELLIPSE   = 3,
  AK_CURVE_PARABOLA  = 4,
  AK_CURVE_HYPERBOLA = 5,
  AK_CURVE_NURBS     = 6,
} AkCurveElementType;

typedef enum AkSurfaceElementType {
  AK_SURFACE_CONE          = 1,
  AK_SURFACE_PLANE         = 2,
  AK_SURFACE_CYLINDER      = 3,
  AK_SURFACE_NURBS_SURFACE = 4,
  AK_SURFACE_SPHERE        = 5,
  AK_SURFACE_TORUS         = 6,
  AK_SURFACE_SWEPT_SURFACE = 7
} AkSurfaceElementType;

typedef enum AkInstanceType {
  AK_INSTANCE_NODE       = 1,
  AK_INSTANCE_CAMERA     = 2,
  AK_INSTANCE_LIGHT      = 3,
  AK_INSTANCE_GEOMETRY   = 4,
  AK_INSTANCE_IMAGE      = 5,
  AK_INSTANCE_CONTROLLER = 6,
  AK_INSTANCE_EFFECT     = 7
} AkInstanceType;

typedef struct AkValue {
  void      *value;
  AkTypeDesc type;
} AkValue;

typedef struct AkTreeNodeAttr {
  const char            *name;
  char                  *val;
  struct AkTreeNodeAttr *next;
  struct AkTreeNodeAttr *prev;
} AkTreeNodeAttr;

typedef struct AkTreeNode {
  AkTreeNodeAttr    *attribs;
  
  const char        *name;
  char              *val;

  struct AkTreeNode *chld;
  struct AkTreeNode *parent;
  struct AkTreeNode *next;
  struct AkTreeNode *prev;
  
  unsigned long      attrc;
  unsigned long      chldc;
} AkTreeNode;

typedef struct AkTreeNode AkTree;

/*!
 * @brief Return optional metadata attached to an AssetKit object.
 *
 * COLLADA <extra> and preserved glTF extras/extensions are exposed as
 * AkTree. The returned tree is owned by the document heap.
 */
AK_EXPORT
AkTree*
ak_extra(void * __restrict obj);

/*!
 * @brief Attach optional metadata to an AssetKit object.
 */
AK_EXPORT
void
ak_extra_set(void   * __restrict obj, AkTree * __restrict extra);

#include "source.h"

typedef struct AkUnit {
  const char * name;
  double       dist;
} AkUnit;

typedef struct AkColorRGBA {
  AkFloat R;
  AkFloat G;
  AkFloat B;
  AkFloat A;
} AkColorRGBA;

typedef union AkColor {
  AK_ALIGN(16) AkColorRGBA rgba;
  AK_ALIGN(16) AkFloat4    vec;
} AkColor;

AK_INLINE
bool
ak_colorLessThanOne(AkColor color) {
  return color.rgba.R < 0.999
      || color.rgba.G < 0.999
      || color.rgba.B < 0.999
      || color.rgba.A < 0.999
  ;
}

AK_INLINE 
float
ak_sRGB_linearf(float channel) {
  if (channel <= 0.04045) {
    return channel / 12.92;
  } else {
    return powf((channel + 0.055) / 1.055, 2.4);
  }
}

AK_INLINE
float
ak_linear_sRGBf(float channel) {
  if (channel <= 0.0031308f) {
    return channel * 12.92f;
  } else {
    return 1.055f * powf(channel, 1.0f / 2.4f) - 0.055f;
  }
}

AK_INLINE
void
ak_sRGB_linear(AkColor * __restrict color) {
  color->rgba.R = ak_sRGB_linearf(color->rgba.R);
  color->rgba.G = ak_sRGB_linearf(color->rgba.G);
  color->rgba.B = ak_sRGB_linearf(color->rgba.B);
}

AK_INLINE 
void
ak_linear_sRGB(AkColor * __restrict color) {
  color->rgba.R = ak_linear_sRGBf(color->rgba.R);
  color->rgba.G = ak_linear_sRGBf(color->rgba.G);
  color->rgba.B = ak_linear_sRGBf(color->rgba.B);
}

typedef struct AkContributor {
  const char * author;
  const char * authorEmail;
  const char * authorWebsite;
  const char * authoringTool;
  const char * comments;
  const char * copyright;
  const char * sourceData;

  struct AkContributor * next;
} AkContributor;

typedef struct AkAltitude {
  AkAltitudeMode mode;
  double         val;
} AkAltitude;

typedef struct AkGeoLoc {
  double     lng;
  double     lat;
  AkAltitude alt;
} AkGeoLoc;

typedef struct AkCoverage {
  AkGeoLoc geoLoc;
} AkCoverage;

typedef struct AkAssetInf {
  AkCoordSys    *coordSys;
  AkUnit        *unit;
  AkContributor *contributor;
  AkCoverage    *coverage;
  const char    *subject;
  const char    *title;
  const char    *keywords;
  const char    *revision;
  AkTree        *extra;
  time_t         created;
  time_t         modified;
} AkAssetInf;

typedef struct AkDocInf {
  AkAssetInf   base;
  const char  *dir;
  const char  *name;
  size_t       dirlen;
  AkFileType   ftype;
  bool         flipImage;
} AkDocInf;

typedef struct AkTechnique {
  const char * profile;

  /**
   * @brief
   * COLLADA Specs 1.5:
   * This XML Schema namespace attribute identifies an additional schema
   * to use for validating the content of this instance document. Optional.
   */
  const char * xmlns;
  AkTree     * chld;

  struct AkTechnique * next;
} AkTechnique;

/* FX */
/* Effects */
/*
 * base type of param
 */
typedef struct AkParam {
  const char     *ref;
  struct AkParam *prev;
  struct AkParam *next;
} AkParam;

typedef struct AkHexData {
  const char *format;
  const char *hexval; /* hex value    */
  void       *data;   /* binary value */
} AkHexData;

typedef struct AkInitFrom {
  struct AkInitFrom *next;
  const char        *ref;
  const char        *resolvedFullPath;
  AkHexData         *hex;
  struct AkBuffer   *buff;
  const char        *buffMime;
  AkFace             face;
  AkUInt             mipIndex;
  AkUInt             depth;
  AkInt              arrayIndex;
  AkBool             mipsGenerate;
} AkInitFrom;

struct AkNode;
typedef struct AkInstanceBase {
  /* const char * sid; */
  AkURL                  url;
  AkInstanceType         type;
  void                  *object;
  const char            *name;
  AkTree                *extra;
  struct AkNode         *node;
  struct AkInstanceBase *prev;
  struct AkInstanceBase *next;
} AkInstanceBase;

typedef struct AkEvaluateTarget {
  AkParam        *param;
  AkInstanceBase *instanceImage;
  unsigned long   index;
  unsigned long   slice;
  unsigned long   mip;
  AkFace          face;
} AkEvaluateTarget;

#include "profile.h"

struct AkNewParam;
typedef struct AkEffect {
  /* const char * id; */
  const char      *name;
  struct AkNewParam  *newparam;
  AkProfile       *profile;
  AkTree          *extra;
  struct AkEffect *next;

  /* effect specific options, override global options */
  AkProfileType    bestProfile;
} AkEffect;

typedef struct AkInstanceEffect {
  AkInstanceBase   base;
  AkTechniqueHint *techniqueHint;
} AkInstanceEffect;

typedef struct AkMaterial {
  /* const char * id; */
  AkOneWayIterBase   base;
  const char        *name;
  AkInstanceEffect  *effect;
  AkTree            *extra;
} AkMaterial;

struct AkAccessor;

typedef struct AkInput {
  const char        *semanticRaw;
  struct AkInput    *next;
  struct AkAccessor *accessor;
  uint32_t           index; /* TEXCOORD0, TEXCOORD1... */
  bool               isIndexed;
  AkInputSemantic    semantic;
  uint32_t           offset;
  uint32_t           set;
  
  /* TODO: WILL BE DELETED */
//  AkURL              source;
} AkInput;

struct AkInstanceMaterial;
typedef struct AkBindMaterial {
  AkParam                   *param;
  struct AkInstanceMaterial *tcommon;
  AkTechnique               *technique;
  AkTree                    *extra;
} AkBindMaterial;

typedef struct AkInstanceGeometry {
  AkInstanceBase          base;

  AkBindMaterial         *bindMaterial;
  struct AkInstanceMorph *morpher;
  struct AkInstanceSkin  *skinner;
} AkInstanceGeometry;

typedef struct AkInstanceNode {
  AkInstanceBase base;
  const char    *proxy;
} AkInstanceNode;

/*
 * TODO: separate all instances to individual nodes?
 */
struct AkMatrix;
struct AkBoundingBox;
struct AkTransform;

typedef struct AkBind {
  const char    * semantic;
  const char    * target;
  struct AkBind * next;
} AkBind;

typedef struct AkBindVertexInput {
  struct AkBindVertexInput *next;
  const char               *semantic;
  const char               *inputSemantic;
  AkUInt                    inputSet;
} AkBindVertexInput;

typedef struct AkInstanceMaterial {
  AkInstanceBase       base;
  const char          *symbol;
  AkTechniqueOverride *techniqueOverride;
  AkBind              *bind;
  AkBindVertexInput   *bindVertexInput;
} AkInstanceMaterial;

typedef struct AkRender {
  /* const char * sid; */

  const char     * name;
  const char     * cameraNode;
  AkStringArrayL * layer;
  AkInstanceMaterial * instanceMaterial;
  AkTree         * extra;

  struct AkRender * next;
} AkRender;

typedef struct AkEvaluateScene {
  /* const char * id; */
  /* const char * sid; */

  const char * name;
  AkRender   * render;
  AkTree     * extra;
  AkBool       enable;

  struct AkEvaluateScene * next;
} AkEvaluateScene;

struct AkInstanceList;

typedef struct AkVisualScene {
  /* const char * id; */
  AkOneWayIterBase       base;
  const char            *name;
  struct AkNode         *node;
  struct AkNode         *firstCamNode; /* first found camera       */
  struct AkInstanceList *cameras;      /* all cameras inside scene */
  struct AkInstanceList *lights;       /* all lights inside scene  */
  AkEvaluateScene       *evaluateScene;
  struct AkBoundingBox  *bbox;
  AkTree                *extra;
} AkVisualScene;

typedef struct AkScene {
  /*
   TODO:
      instance_physics_scene
      instance_kinematics_scene
   */
  AkInstanceBase *visualScene;
  AkTree * extra;
} AkScene;

struct AkMorph;
struct AkSkin;

typedef struct AkLibraries {
  struct AkLibrary *cameras;
  struct AkLibrary   *lights;
  struct AkLibrary   *effects;
  struct AkLibrary   *libimages;
  struct AkLibrary   *materials;
  struct AkLibrary   *geometries;
  struct AkLibrary   *controllers;
  struct AkLibrary   *visualScenes;
  struct AkLibrary   *nodes;
  struct AkLibrary   *animations;
    
  struct FListItem   *buffers;
  struct FListItem   *accessors;
  struct FListItem   *textures;
  struct FListItem   *samplers;
  struct FListItem   *images;
  struct AkMorph     *morphs;
  struct AkSkin      *skins;
} AkLibraries;

typedef const char* (*AkFetchFromURLHandler)(const char * __restrict url);

typedef struct AkDoc {
  AkDocInf   *inf;
  AkCoordSys *coordSys;
  AkUnit     *unit;
  AkTree     *extra;
  void       *reserved;
  void       *userData;
  float       loadMillis;
  AkLibraries lib;
  AkScene     scene;

  /* KHR_materials_variants: document-level variant names. */
  struct AkMaterialVariant *materialVariants;
  uint32_t                  materialVariantCount;
} AkDoc;

#include "context.h"
#include "geom.h"
#include "image.h"
#include "string.h"
#include "coord-util.h"
#include "library.h"
#include "instance.h"
#include "cam.h"
#include "transform.h"
#include "sid.h"
#include "light.h"
#include "node.h"
#include "texture.h"
#include "animation.h"
#include "controller.h"
#include "gsplat.h"

AK_EXPORT
AkResult
ak_load(AkDoc     ** __restrict dest,
        const char * __restrict url,
        .../* options */);

AK_EXPORT
void *
ak_getId(void * __restrict objptr);

AK_EXPORT
AkResult
ak_setId(void       * __restrict objptr,
         const char * __restrict objectId);

AK_EXPORT
AkResult
ak_moveId(void * __restrict objptrOld,
          void * __restrict objptrNew);

AK_EXPORT
void *
ak_getObjectById(AkDoc      * __restrict doc,
                 const char * __restrict objectId);

AK_EXPORT
void *
ak_getObjectByUrl(AkURL * __restrict url);

const char*
ak_getFile(const char *url);

char*
ak_getFileFrom(AkDoc *doc, const char *url);

AK_EXPORT
const char *
ak_generatId(AkDoc      * __restrict doc,
             void       * __restrict parentmem,
             const char * __restrict prefix);

AK_EXPORT
void*
ak_getAssetInfo(void * __restrict obj,
                size_t itemOffset);

/* same as: ak_getAssetInfo(obj, offsetof(AkAssetInf, coordSys)) */
AK_EXPORT
AkCoordSys*
ak_getCoordSys(void * __restrict obj);

AK_EXPORT
bool
ak_hasCoordSys(void * __restrict obj);

AK_EXPORT
void
ak_retainURL(void * __restrict obj, AkURL * __restrict url);

AK_EXPORT
void
ak_releaseURL(void * __restrict obj, AkURL * __restrict url);

AK_EXPORT
void
ak_setFetchFromURLHandler(AkFetchFromURLHandler handler);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_h */


================================================
FILE: include/ak/bbox.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_bbox_h
#define assetkit_bbox_h

#include "common.h"
#include <stdbool.h>

struct AkMesh;
struct AkMeshPrimitive;
struct AkGeometry;
struct AkScene;
struct AkMeshPrimitive;

typedef struct AkBoundingBox {
  float min[3];
  float max[3];
  bool  isvalid;
} AkBoundingBox;

/*!
 * @brief calc bbox for whole scene, this calc scene bbox with transformations
 *        of geom nodes
 *
 * @param scene visual scene
 */
void
ak_bbox_scene(struct AkVisualScene * __restrict scene);

/*!
 * @brief calc bbox for whole geometry
 *        this will affect scene bbox
 *
 * @param geom  geometry
 */
void
ak_bbox_geom(struct AkGeometry * __restrict geom);

/*!
 * @brief calc bbox for whole mesh
 *        this will affect geom bbox
 *
 * @param mesh  mesh
 */
void
ak_bbox_mesh(struct AkMesh * __restrict mesh);

/*!
 * @brief calc bbox for mesh primitive
 *        this will affect geom bbox and mesh bbox
 *
 * @param prim  primitive
 */
void
ak_bbox_mesh_prim(struct AkMeshPrimitive * __restrict prim);

/*!
 * @brief get center of bbox
 *
 * @param[in]  bbox   bbox
 * @param[out] center center of bbox
 */
void
ak_bbox_center(AkBoundingBox * __restrict bbox,
               float center[3]);

/*!
 * @brief returns radius of sphere which is surround bbox square
 *
 * @param bbox bbox
 *
 * @return radius (r) of outer sphere
 */
float
ak_bbox_radius(AkBoundingBox * __restrict bbox);

#endif /* assetkit_bbox_h */


================================================
FILE: include/ak/cam.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_cam_h
#define assetkit_cam_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"

struct AkLibraryItemBase;

typedef enum AkProjectionType {
  AK_PROJECTION_PERSPECTIVE  = 0, /* default */
  AK_PROJECTION_ORTHOGRAPHIC = 1,
  AK_PROJECTION_OTHER        = 2
} AkProjectionType;

typedef struct AkProjection {
  AkProjectionType type;
  uint32_t         tag;
} AkProjection;

typedef struct AkPerspective {
  AkProjection base;
  float        xfov;
  float        yfov;
  float        aspectRatio;
  float        znear;
  float        zfar;
} AkPerspective;

typedef struct AkOrthographic {
  AkProjection base;
  float        xmag;
  float        ymag;
  float        aspectRatio;
  float        znear;
  float        zfar;
} AkOrthographic;

typedef struct AkOptics {
  AkProjection *tcommon;
  AkTechnique  *technique;
} AkOptics;

typedef struct AkImager {
  AkTechnique *technique;
  AkTree      *extra;
} AkImager;

typedef struct AkCamera {
  /* const char * id; */
  AkOneWayIterBase base;
  const char      *name;
  AkOptics        *optics;
  AkImager        *imager;
  AkTree          *extra;
} AkCamera;

/*!
 * @brief Top camera in scene if available
 *
 * pass NULL which parameter is not wanted and reduce overhead of calc these 
 * params, only pass param[s] which you need
 *
 * @warning the returned projection matrix's aspect ratio is same as exported
 *
 * @param[in]  doc        document (required)
 * @param[out] camera     found camera (optional)
 * @param[out] matrix     transform matrix (optional) of camera in world
 * @param[out] projMatrix proj matrix (optional)
 *
 * @return AK_OK if camera found else AK_EFOUND
 */
AK_EXPORT
AkResult
ak_firstCamera(AkDoc     * __restrict doc,
               AkCamera ** camera,
               float     * matrix,
               float     * projMatrix);

AK_EXPORT
const AkCamera*
ak_defaultCamera(void * __restrict memparent);

/*!
 * @brief Allocate a fresh perspective camera and register it in the
 *        document's cameras library.
 *
 * Wires up AkCamera + AkOptics + AkPerspective in one shot using the
 * heap that owns @p doc. The returned pointer is owned by that heap;
 * its lifetime is tied to @p memparent (or the document if memparent
 * is NULL). After this call the camera is queryable via the cameras
 * library — callers don't need to do their own lib-list management.
 *
 * The camera is *not* attached to any scene node here — use
 * ak_nodeAttachCamera() for that.
 *
 * @param[in]  doc        document the camera will live in (required)
 * @param[in]  memparent  heap parent for ownership (NULL → doc)
 * @param[in]  yfov       vertical field of view in radians
 * @param[in]  aspect     aspect ratio (width / height); 0 → unset
 * @param[in]  znear      near clipping distance
 * @param[in]  zfar       far clipping distance
 *
 * @return Newly allocated AkCamera, or NULL on allocation failure.
 */
AK_EXPORT
AkCamera *
ak_camMakePerspective(AkDoc * __restrict doc,
                      void  * __restrict memparent,
                      float yfov,
                      float aspect,
                      float znear,
                      float zfar);

/*!
 * @brief Allocate a fresh orthographic camera and register it in the
 *        document's cameras library.
 *
 * Mirrors ak_camMakePerspective(): allocates AkCamera + AkOptics +
 * AkOrthographic, wires them, and adds the camera to doc->lib.cameras.
 *
 * @param[in]  doc        document the camera will live in (required)
 * @param[in]  memparent  heap parent for ownership (NULL → doc)
 * @param[in]  xmag       half-width of the view volume
 * @param[in]  ymag       half-height of the view volume
 * @param[in]  aspect     aspect ratio (width / height); 0 → unset
 * @param[in]  znear      near clipping distance
 * @param[in]  zfar       far clipping distance
 *
 * @return Newly allocated AkCamera, or NULL on allocation failure.
 */
AK_EXPORT
AkCamera *
ak_camMakeOrthographic(AkDoc * __restrict doc,
                       void  * __restrict memparent,
                       float xmag,
                       float ymag,
                       float aspect,
                       float znear,
                       float zfar);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_cam_h */


================================================
FILE: include/ak/common.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_common_h
#define assetkit_common_h

/* since C99 or compiler ext */
#include <stdint.h>
#include <stddef.h>
#include <float.h>
#include <stdbool.h>
#include <errno.h>
#include <math.h>

#ifdef DEBUG
#  include <assert.h>
#  include <stdio.h>
#endif

#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
#  define AK_WINAPI
#endif

#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
#  ifdef AK_STATIC
#    define AK_EXPORT
#  elif defined(AK_EXPORTS)
#    define AK_EXPORT __declspec(dllexport)
#  else
#    define AK_EXPORT __declspec(dllimport)
#  endif
#  define AK_HIDE
#else
#  define AK_EXPORT   __attribute__((visibility("default")))
#  define AK_HIDE     __attribute__((visibility("hidden")))
#endif

#if defined(_MSC_VER)
#  define AK_INLINE   __forceinline
#  define AK_ALIGN(X) __declspec(align(X))
#else
#  define AK_ALIGN(X) __attribute((aligned(X)))
#  define AK_INLINE   static inline __attribute((always_inline))
#endif


#ifndef __has_builtin
#  define __has_builtin(x) 0
#endif

#define AK_ARRAY_LEN(ARR) sizeof(ARR) / sizeof(ARR[0])

#define AK_APPEND_FLINK(SRC,LAST,ITEM)                                        \
  do {                                                                        \
    if (LAST)                                                                 \
      LAST->next = ITEM;                                                      \
    else                                                                      \
      SRC = ITEM;                                                             \
    LAST = ITEM;                                                              \
  } while (0)

typedef int32_t AkEnum;

typedef enum AkResult {
  AK_NOOP     = 1,     /* no operation needed */
  AK_OK       = 0,
  AK_ERR      = -1,    /* UKNOWN ERR */
  AK_ETCOMMON = -2,    /* no tcommon found */
  AK_EFOUND   = -1000,
  AK_ENOMEM   = -ENOMEM,
  AK_EPERM    = -EPERM,
  AK_EBADF    = -EBADF, /* docoumnt couldn't parsed / loaded */
  AK_EINVAL   = -EINVAL
} AkResult;

typedef struct AkOneWayIterBase {
  struct AkOneWayIterBase *next;
} AkOneWayIterBase;

typedef struct AkTwoWayIterBase {
  struct AkTwoWayIterBase *next;
  struct AkTwoWayIterBase *prev;
} AkTwoWayIterBase;

#define AK_PATH_FROM_DOC(DOC, DEST, FILE_NAME)                                \
  do {                                                                        \
    size_t dirLength, newPathLength;                                          \
                                                                              \
    dirLength     = strlen(DOC->inf->dir);                                    \
    newPathLength = dirLength + strlen(FILE_NAME) + 1;                        \
                                                                              \
    DEST = alloca(newPathLength + 1);                                         \
    strcpy(DEST, DOC->inf->dir);                                              \
    if (DOC->inf->dir[dirLength - 1] != '/' && FILE_NAME[0] != '/') {         \
      strcat(DEST, "/");                                                      \
    }                                                                         \
    strcat(DEST, FILE_NAME);                                                  \
  } while (0)

#endif /* assetkit_common_h */


================================================
FILE: include/ak/context.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_context_h
#define assetkit_context_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"
#include "map.h"
#include "util.h"

typedef struct AkContext {
  AkDoc              *doc;
  AkTechniqueHint    *techniqueHint;
  AkInstanceMaterial *instanceMaterial;
  //  AkMap              *bindVertexInput;
} AkContext;

AK_INLINE AkContext AkContextZeroed(void) { return (AkContext){0}; }

#ifdef __cplusplus
}
#endif
#endif /* assetkit_context_h */


================================================
FILE: include/ak/controller.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_controller_h
#define assetkit_controller_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"
#include "geom.h"

struct AkNode;
struct FListItem;

typedef enum AkMorphMethod {
  /* Weights of blend shapes normalized to 1 (or 100%) */
  AK_MORPH_METHOD_NORMALIZED = 1,  

  /* Blend shapes defined as a difference from the base shape */
  AK_MORPH_METHOD_RELATIVE   = 2,  

  /* Alias for RELATIVE, treat additive as relative in this context */
  AK_MORPH_METHOD_ADDITIVE   = AK_MORPH_METHOD_RELATIVE,

  /* Each blend shape applied fully on top of the previous one */
  AK_MORPH_METHOD_ABSOLUTE   = 3
} AkMorphMethod;

typedef struct AkBoneWeight {
  uint32_t joint;
  float    weight;
} AkBoneWeight;

typedef struct AkBoneWeights {
  uint32_t     *counts;     /* joint count per vertex                     */
  size_t       *indexes;    /* offset of weight at buffer by index        */
  AkBoneWeight *weights;
  size_t        nWeights;   /* cache: count of weights                    */
  size_t        nVertex;    /* cache: count of pJointsCount/pWeightsIndex */
} AkBoneWeights;

/**
 * Skin controller — vertex skinning data.
 *
 * Per-vertex bone data storage differs by source format:
 *   - DAE: variable-count CSR layout in `weights[]` (filled by
 *     dae_fixup_ctlr in authored primitive order).
 *   - glTF: raw vec4 JOINTS_n / WEIGHTS_n accessors stay in `prim->input`
 *     (no aggregation — the format is already GPU-ready).
 *
 * Bridges should call ak_skinFillWeights() rather than touching `weights[]`
 * or `prim->input` directly. The helper hides this format divergence and
 * yields fixed-N (typically 4) flat buffers ready for upload.
 *
 * Default joints (`joints[]`) are populated for glTF; DAE leaves it NULL
 * and resolves joints per-instance via AkInstanceSkin.overrideJoints (DAE
 * lets the same skin bind to different skeletons per instance).
 *
 * `skeleton` is the closest common ancestor of joints, used by Apple
 * SCNSkinner.skeleton (and similar engines) as the coordinate-space
 * reference for bone lookups. Optional — when NULL, callers fall back
 * to joints[0] (typically the root joint by convention). glTF: filled
 * from the optional `skin.skeleton` JSON hint. DAE: filled from
 * <instance_controller>'s first <skeleton> URL when fixing the
 * instance.
 */
typedef struct AkSkin {
  AkOneWayIterBase base;
  AkFloat4x4      *invBindPoses;
  struct AkNode  **joints;   /* default joints (glTF; NULL for DAE)        */
  AkBoneWeights  **weights;  /* per primitive (DAE only; NULL for glTF)    */
  struct AkNode   *skeleton; /* common ancestor; NULL if not authored      */
  void            *inspectResult; /* private cache for raw accessor pairs   */
  size_t           nJoints;  /* cache: joint count                         */
  uint32_t         nPrims;   /* cache: primitive count                     */
  uint32_t         nMaxJoints;
  AkFloat4x4       bindShapeMatrix;
} AkSkin;

typedef enum AkMorphableType {
  AK_MORPHABLE_GEOMETRY, /* per-target geometry, must be same as base  */
  AK_MORPHABLE_MORPHABLE /* morph inputs if no geometry object is used */
} AkMorphableType;

/**
 * @brief input/attribute layout in shader orr in interleaved buffer
 * 
 *   currently two layouts are supported: 
 *     ------------------------------------------------------------------------
 *     P1 P2 P3    N1 N2 N3    T01 T02 T03 ...
 *     P1 N1 T01   P2 N2 T02   P3  N3  T03 ... (natural layout)
 * 
 *  IMPORTANT: in natural layout, input orders may not same as baseShape
 *             if you need same order as baseShape, use P1P2N1N2 layout
 *             or create an issue to bring this feature to here which is in TODO.
 */
typedef enum AkMorphInterleaveLayout {
  AK_MORPH_UNKNOWN  = 0,
  AK_MORPH_P1P2N1N2 = 1, /* each target's inputs are groupped by input type */
  AK_MORPH_NATURAL  = 3  /* P1N1 P2N2 but input orders are natural as target */
} AkMorphInterleaveLayout;

// typedef struct AkSparseMorphInfo {
//   uint32_t *affectedVertices;  /* indices of vertices that change            */
//   uint32_t  nAffectedVertices;
//   float     sparsityRatio;     /* 0.0-1.0, useful for optimization decisions */
// } AkSparseMorphInfo;

/* per-target inputs to morph */
typedef struct AkMorphable {
  struct AkMorphable  *next;
  AkInput             *input;  
  uint32_t             inputCount;
} AkMorphable;

typedef struct AkMorphPreset {
  const char   *name;      /* "neutral", "smile_max", ... */
  AkFloatArray *weights;   /* length = morph->targetCount */
} AkMorphPreset;

typedef struct AkMorphTarget {
  struct AkMorphTarget *next;
  AkObject             *target;         /* AkGeometry or AkMorphable to morph */
  uint32_t              primitiveCount; /* number of mesh primitives to morph */
} AkMorphTarget;

typedef struct AkMorphInspectInput {
  struct AkMorphInspectInput *next;
  AkInput                    *input;
  uint32_t                    intrOffset;
  union {
    bool                      inBaseMesh;
    bool                      inTarget;
  };
} AkMorphInspectInput;

typedef struct AkMorphInspectMorphable {
  struct AkMorphInspectMorphable *next;
  AkMorphInspectInput            *input;
  AkMorphInspectInput            *lastInput;
  uint32_t                        inputsCount;
  float                           weight;

  /* Per-primitive slice inside a target view. Multi-primitive meshes can
     have different vertex counts and strides per primitive. */
  uint32_t                        vertexCount;
  uint32_t                        stridePerVertex;
  size_t                          bufferOffset;
  size_t                          bufferSize;
} AkMorphInspectMorphable;

typedef struct AkMorphInspectTargetView {
  struct AkMorphInspectTargetView *next;
  AkMorphInspectMorphable         *morphable;
  uint32_t                         nTargets;
  /* Total byte size of this target slice, summed across all
     per-primitive morphables. */
  size_t                           interleaveBufferSize;
} AkMorphInspectTargetView;

/*
  AkMorphInspectView
         o
         |
         o -> AkMorphInspectTargetView ( like Mesh )
                         o
                         | 
                         o ->  AkMorphInspectMorphable 1 ( like Mesh Primitive )
                                         o
                                         -> AkMorphInspectInput 1
                                         -> AkMorphInspectInput 2
                                         -> AkMorphInspectInput 3
                         o ->  AkMorphInspectMorphable 2
                         o ->  AkMorphInspectMorphable 3
        o -> AkMorphInspectTargetView
                         o
                         | 
                         o ->  AkMorphInspectMorphable 1
                         o ->  AkMorphInspectMorphable 2
                         o ->  AkMorphInspectMorphable 3
*/
typedef struct AkMorphInspectView {
  /* first one is baseShape if includeBaseShape param is set to 'true' */
  AkMorphInspectTargetView *base;
  AkMorphInspectTargetView *targets;
  AkFloatArray             *initialWeights;
  uint32_t                  nTargets;
  size_t                    interleaveTotalBufferSize;
  bool                      includeBaseShape;
  bool                      ignoreUncommonInputs;
  AkMorphInterleaveLayout   layout;
} AkMorphInspectView;

typedef struct AkMorph {
  AkOneWayIterBase    base;
  AkMorphTarget      *target;
  AkMorphInspectView *inspectResult;
  AkFloatArray       *defaultWeights; /* this overrides mesh.weights        */
  const char        **targetNames;    /* optional, length = targetCount     */
  AkMorphPreset      *presets;        /* optional named weight sets         */
  AkMorphMethod       method;
  uint32_t            targetCount;
  uint32_t            presetCount;
} AkMorph;

typedef bool
(*AkMorphProgressFn)(AkMorph * __restrict morph,
                     uint32_t             targetIndex,
                     uint32_t             targetCount,
                     void   * __restrict userdata);

// TODO: multi-morph-per-mesh just thought loudly ?
// typedef struct AkPrimitiveMorph {
//   AkOneWayIterBase    base;
//   AkMorphTarget      *target;
//   AkMorphInspectView *inspectResult;
//   AkFloatArray       *weights; /* default weights or NULL to zero */
//   AkMorphMethod       method;
//   uint32_t            targetCount; 
// } AkPrimitiveMorph;
// 
// typedef struct AkMeshMorph {
//   AkOneWayIterBase  base;
//   AkPrimitiveMorph *morph;
//   float             weight;
// } AkMeshMorph;

typedef struct AkInstanceMorph {
  AkMorph      *morph;
  AkFloatArray *overrideWeights;  /* override morph.weights and mesh.weight or NULL */
} AkInstanceMorph;

typedef struct AkInstanceSkin {
  AkSkin         *skin;
  struct AkNode **overrideJoints; /* override default joints or NULL  */
} AkInstanceSkin;

/*!
 * @brief format-agnostic per-vertex bone-data extraction with INTERLEAVED
 *        output, suitable for a single GPU vertex buffer (OpenGL/Metal/
 *        Vulkan typical layout).
 *
 *        Per-vertex layout in the output buffer:
 *
 *          | JointIDs[maxJoint] (uint16) | Weights[maxJoint] (float) |
 *
 *        Matches a shader vertex input like:
 *
 *           in uvec4 JOINTS;  (backed by uint16 vertex input)
 *           in vec4  WEIGHTS;
 *
 *        Quality is identical to ak_skinFillWeights() — same format-
 *        agnostic core (DAE CSR + glTF accessors), same top-N selection
 *        when authored joint count exceeds maxJoint, same renormalize so
 *        weights sum to 1. Only the output packing differs (interleaved
 *        single buffer vs. separate idx/wgt arrays).
 *
 *        For the SceneKit/RealityKit path use ak_skinFillWeights()
 *        instead — Apple's APIs require separate boneIndices and
 *        boneWeights SCNGeometrySources.
 *
 *        Layout: per vertex `[J0..J(N-1) (uint16) W0..W(N-1) (float)]`.
 *
 * @param skin      AkSkin (for both DAE-CSR and glTF-accessor inputs)
 * @param prim      mesh primitive being skinned (vertex order source)
 * @param primIdx   primitive index fallback; prim pointer is authoritative
 * @param maxJoint  storage slots per vertex (typically 4)
 * @param buff      destination buffer; if *buff is NULL one is alloc'd
 *                  with ak_calloc(NULL, ...) and stored back into *buff
 *                  (caller frees with ak_free)
 * @return  total bytes written, or 0 on failure
 */
AK_EXPORT
size_t
ak_skinInterleave(AkSkin          * __restrict skin,
                  AkMeshPrimitive * __restrict prim,
                  uint32_t                     primIdx,
                  uint32_t                     maxJoint,
                  void           ** __restrict buff);

/*!
 * @brief format-agnostic per-vertex bone-data extraction for one primitive.
 *
 *        Fills caller-provided fixed-N flat buffers (joint indices + weights)
 *        regardless of the asset's source format:
 *
 *          - DAE  primitives use the CSR layout in skin->weights[];
 *                 variable joint count per vertex -> top-N selected by weight,
 *                 zero-padded if count<N, normalized so weights sum to 1.
 *          - glTF primitives keep JOINTS_n / WEIGHTS_n sets as raw accessors
 *                 in prim->input; all sets are merged, top-N is selected, and
 *                 UBYTE/USHORT joint indices are written as uint16_t.
 *
 *        Bridges should call this rather than reading skin->weights[] or
 *        prim->input directly — the dual storage is an implementation
 *        detail of the parsers.
 *
 * @param[in]  skin        skin owning the bone data
 * @param[in]  prim        mesh primitive being skinned
 * @param[in]  primIdx     primitive index fallback; prim pointer is authoritative
 * @param[in]  maxJoint    fixed slot count per vertex (typically 4)
 * @param[out] outIndices  buffer for vertexCount × maxJoint × sizeof(uint16_t)
 * @param[out] outWeights  buffer for vertexCount × maxJoint × sizeof(float)
 * @return     vertex count on success, 0 on error.
 */
AK_EXPORT
size_t
ak_skinFillWeights(AkSkin          * __restrict skin,
                   AkMeshPrimitive * __restrict prim,
                   uint32_t                     primIdx,
                   uint32_t                     maxJoint,
                   uint16_t        * __restrict outIndices,
                   float           * __restrict outWeights);

/*!
 * @brief collect vertex indices affected by one joint for one primitive.
 *
 *        Works for both DAE CSR skin weights and glTF JOINTS_n/WEIGHTS_n
 *        accessors. The function returns the total matching vertex count even
 *        when `outVertices` is NULL or `capacity` is smaller than the result,
 *        so callers can first query size and then fill a buffer.
 *
 * @param[in]  skin         skin owning the bone data
 * @param[in]  prim         mesh primitive at index `primIdx`
 * @param[in]  primIdx      primitive index in mesh
 * @param[in]  jointIdx     joint index to scan for
 * @param[out] outVertices  optional vertex-index buffer
 * @param[in]  capacity     number of uint32_t slots in outVertices
 * @return     total number of affected vertices.
 */
AK_EXPORT
size_t
ak_skinVerticesForJoint(AkSkin          * __restrict skin,
                        AkMeshPrimitive * __restrict prim,
                        uint32_t                     primIdx,
                        uint32_t                     jointIdx,
                        uint32_t        * __restrict outVertices,
                        size_t                       capacity);

/*!
 * @brief inspect a morph to get bufferSize and bufferStride to alloc memory for
 *        interleaved morph buffer with desired inputs. Also returns a list of 
 *        inputs for each target. You can use this list to collect inputs from
 *        morph targets. 
 *
 *        inspected result will be stored in morph->inspectResult. You can use
 *        this result to collect inputs same order as baseShape's inputs' order
 *        from morph targets. Inputs that dont exists in baseShape will be ignored.
 *        If you need them, pass ignoreUncommonInputs = false.
 * 
 * @param[in]  baseMesh               base mesh to morph
 * @param[in]  morph                  AkMorph object
 * @param[in]  desiredInputs          desired inputs (other inputs will be ignored)
 *                                        or NULL to collect all inputs, desiredInputsCount must be 0 in this case
 * @param[in]  desiredInputsCount     desired inputs count or 0 to collect all inputs
 * @param[in]  includeBaseShape       if true, baseShape will be included in result e.g. bytes stride, buffer size etc.
 * @param[in]  ignoreUncommonInputs   if true, all inputs that dont exist in base mesh will be ignored
 */
AK_EXPORT
AkResult
ak_morphInspect(AkGeometry * __restrict baseMesh,
                AkMorph    * __restrict morph,
                AkInputSemantic         desiredInputs[],
                uint8_t                 desiredInputsCount,
                bool                    includeBaseShape,
                bool                    ignoreUncommonInputs);

/*!
  * @brief prepare morph inspect result to interleave morph object with desired inputs
  *        this prepares inputs order by specified layout parameter and sets intrOffset, 
  *        inBaseMesh etc. properties.
  *
  *        make sure that you called ak_morphInspect() to get buffSize
  *        and alloc a buffer with that size.
  *
  * @param[in]  inspectView  inspect result
  * @param[in]  layout       interleave layout e.g. p1p2n1n2 or p1n1p2n2
  */
AK_EXPORT
AkResult
ak_morphInspectPrepareLayout(AkMorphInspectView * __restrict inspectView, 
                             AkMorphInterleaveLayout         layout);

/*!
 * @brief interleave morph object with desired inputs with desired input orders.
 *
 *        Make sure that you called ak_morphInspect() to get buffSize
 *        and alloc a buffer with that size.
 *
 *        All inputs except desired inputs will be ignored. If morph object don't
 *        contain a desired input than it will be ignored too.
 *
 *        You can send this buffer to GPU and use directly.
 * 
 *        WARN: all inputs that dont exist in base mesh will be ignored
 *              if you need them, you can use ak_morphInspect() to get all 
 *              inputs for your own interleave() implementation. Create an issue 
 *              if you need bring this feature to here.
 *
 * @param[in]  baseMesh      base mesh to morph
 * @param[in]  morph         AkMorph object
 * @param[in]  layout        interleave layout e.g. p1p2n1n2 or p1n1p2n2
 * @param[out] destBuff      pre-allocated buffer to store interleaved data
 */
AK_EXPORT
AkResult
ak_morphInterleave(AkGeometry * __restrict baseMesh,
                   AkMorph    * __restrict morph,
                   AkMorphInterleaveLayout layout,
                   void       * __restrict destBuff);

AK_EXPORT
AkResult
ak_morphInterleaveWithProgress(AkGeometry         * __restrict baseMesh,
                               AkMorph            * __restrict morph,
                               AkMorphInterleaveLayout         layout,
                               void               * __restrict destBuff,
                               AkMorphProgressFn                progress,
                               void               * __restrict userdata);

AK_EXPORT
const AkMorphPreset*
ak_morphPresetByName(AkMorph    * __restrict morph,
                     const char * __restrict name);

AK_EXPORT
bool
ak_morphApplyPreset(AkMorph    * __restrict morph,
                    const char * __restrict presetName,
                    float      * __restrict outWeights,
                    uint32_t                capacity);

AK_INLINE
bool
ak_morphHasOverride(const AkInstanceMorph* inst) {
  return inst && inst->overrideWeights && inst->overrideWeights->count > 0;
}

/* TODO: CPU morph evaluator (utility, low priority)
 *
 * Computes the final blended vertex data on the CPU using base mesh + targets
 * + weights. Output is a "final deformed mesh" ready to be uploaded as a
 * single static draw — no GPU-side blending required.
 *
 * Use cases:
 *   - mesh export / bake tools (e.g., bake "smile_max" pose as a static asset)
 *   - software renderers without GPU shader blending
 *   - pre-bake / asset pipeline tooling
 *
 * Modern engines (SceneKit, RealityKit, custom Metal/Vulkan) do NOT need this:
 * they consume ak_morphInterleave output + a weights uniform array and blend
 * on the GPU. This evaluator is purely for the niche cases above.
 *
 * Sketch:
 *
 * AK_EXPORT
 * AkResult
 * ak_morphEvaluate(AkGeometry            * __restrict baseMesh,
 *                  AkMorph               * __restrict morph,
 *                  const AkInstanceMorph * __restrict inst,     // NULL → defaults
 *                  void                  * __restrict destBuff);// pre-alloc base layout
 */

//AkResult
//ak_morphEvaluateWeights(const AkMorph         * __restrict morph,
//                        const AkInstanceMorph * __restrict inst,
//                        AkFloat                ** __restrict out /* len = morph->targetCount */) {
//  AkFloatArray *ov;
//  AkFloatArray *def;
//  AkMesh       *mesh;
//  uint32_t      n;
//
//  if (!morph || !out)
//    return AK_ERR;
//
//  n   = morph->targetCount;
//  ov  = (inst) ? inst->overrideWeights : NULL;
//
//  /* 1) Kaynak seçimi ve kopyalama (override > default > zeros) */
//  if (ov && ov->count) {
//    *out = ov->items;
//    return AK_OK;
//  } else if ((def = morph->defaultWeights) && def->count) {
//    *out = def->items;
//    return AK_OK;
//  } else if ((ak_objGet(morph->target->target))) {
//
//
//    return mesh->weights;
//  }
//
//  return AK_OK;
//}

#ifdef __cplusplus
}
#endif
#endif /* assetkit_controller_h */


================================================
FILE: include/ak/coord-util.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_coord_util_h
#define assetkit_coord_util_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"

struct AkNode;
struct AkVisualScene;

AK_EXPORT
void
ak_changeCoordSys(AkDoc * __restrict doc,
                  AkCoordSys * newCoordSys);

AK_EXPORT
void
ak_changeCoordSysGeom(AkGeometry * __restrict geom,
                      AkCoordSys * newCoordSys);

AK_EXPORT
void
ak_changeCoordSysMesh(AkMesh * __restrict mesh,
                      AkCoordSys * newCoordSys);

AK_EXPORT
void
ak_fixNodeCoordSys(struct AkNode * __restrict node);

AK_EXPORT
void
ak_fixSceneCoordSys(struct AkVisualScene * __restrict scene);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_coord_util_h */


================================================
FILE: include/ak/coord.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_coord_h
#define assetkit_coord_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"

typedef enum AkCoordCvtType {
  AK_COORD_CVT_DISABLED      = 0, /* import document as they are,
                                     don't apply any coord sys operation    */
  AK_COORD_CVT_FIX_TRANSFORM = 1, /* only add transforms to fix orientation */
  AK_COORD_CVT_ALL           = 2, /* change positions, all things...        */
  AK_COORD_CVT_DEFAULT       = AK_COORD_CVT_FIX_TRANSFORM
} AkCoordCvtType;

typedef struct AkAxisAccessor {
  int8_t right;
  int8_t up;
  int8_t fwd;

  int8_t s_right;
  int8_t s_up;
  int8_t s_fwd;
} AkAxisAccessor;

typedef enum AkAxis {
  AK_AXIS_NEGATIVE_X =-1,
  AK_AXIS_NEGATIVE_Y =-2,
  AK_AXIS_NEGATIVE_Z =-3,

  AK_AXIS_POSITIVE_X = 1,
  AK_AXIS_POSITIVE_Y = 2,
  AK_AXIS_POSITIVE_Z = 3,
} AkAxis;

typedef enum AkAxisRotDirection {
  AK_AXIS_ROT_DIR_LH = -2,
  AK_AXIS_ROT_DIR_RH = 0
} AkAxisRotDirection;

typedef struct AkAxisOrientation {
  AkAxis right;    /* +X */
  AkAxis up;       /* +Y */
  AkAxis fwd;      /* -Z */
} AkAxisOrientation;

typedef struct AkCoordSys {
  AkAxisOrientation  axis;

  /* the default value is AK_AXIS_ROT_DIRECTION_RH (Right Handed) */
  AkAxisRotDirection rotDirection;

  /* when creating custom coord sys, this value must be set correctly, 
     there is no default value */
  AkAxisOrientation  cameraOrientation;
} AkCoordSys;

/* Right Hand (Default) */
extern AkCoordSys * AK_ZUP;
extern AkCoordSys * AK_YUP;
extern AkCoordSys * AK_XUP;

/* Left Hand */
extern AkCoordSys * AK_ZUP_LH;
extern AkCoordSys * AK_YUP_LH;
extern AkCoordSys * AK_XUP_LH;

struct AkTransform;

AK_INLINE
void
ak_coordAxisToiVec3(AkAxisOrientation axisOri, int32_t vec[3]) {
  vec[0] = axisOri.right;
  vec[1] = axisOri.up;
  vec[2] = axisOri.fwd;
}

AK_INLINE
void
ak_coordToiVec3(AkCoordSys * __restrict coordSys, int32_t vec[3]) {
  vec[0] = coordSys->axis.right;
  vec[1] = coordSys->axis.up;
  vec[2] = coordSys->axis.fwd;
}

AK_INLINE
bool
ak_coordOrientationIsEq(AkCoordSys *c1, AkCoordSys *c2) {
  return  c1->axis.right == c2->axis.right
            && c1->axis.up == c2->axis.up
            && c1->axis.fwd == c2->axis.fwd;
}

AK_EXPORT
void
ak_coordCvtVector(AkCoordSys *oldCoordSystem,
                  float      *vector,
                  AkCoordSys *newCoordSystem);

AK_EXPORT
void
ak_coordCvtVectorTo(AkCoordSys *oldCoordSystem,
                    float      *oldVector,
                    AkCoordSys *newCoordSystem,
                    float      *newVector);

AK_EXPORT
void
ak_coordCvtVectors(AkCoordSys *oldCoordSystem,
                   float      *vectorArray,
                   size_t      len,
                   AkCoordSys *newCoordSystem);

AK_EXPORT
void
ak_coordCvtTransform(AkCoordSys *oldCoordSystem,
                     AkFloat4x4  transform,
                     AkCoordSys *newCoordSystem);

/* find transform between two coordinate system */
AK_EXPORT
void
ak_coordFindTransform(struct AkTransform *transform,
                      AkCoordSys         *oldCoordSys,
                      AkCoordSys         *newCoordSys);

AK_EXPORT
void
ak_coordFixCamOri(AkCoordSys *oldCoordSys,
                  AkCoordSys *newCoordSys,
                  AkFloat4x4  transform);

struct AkDoc;
struct AkNode;

AK_EXPORT
void
ak_coordRotNodeForFixedCoord(struct AkDoc *doc,
                             void         *memparent,
                             AkObject    **destTransform);

AK_EXPORT
void
ak_coordCvtNodeTransforms(struct AkDoc  * __restrict doc,
                          struct AkNode * __restrict node);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_coord_h */


================================================
FILE: include/ak/core-types.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_core_types_h
#define assetkit_core_types_h

typedef const char           *AkString;
typedef char                 *AkMutString;
typedef bool                  AkBool;
typedef int16_t               AkInt16;
typedef uint16_t              AkUInt16;
typedef int32_t               AkInt;
typedef uint32_t              AkUInt;
typedef int64_t               AkInt64;
typedef uint64_t              AkUInt64;
typedef float                 AkFloat;
typedef double                AkDouble;

typedef AkBool                AkBool4[4];
typedef AkInt                 AkInt2[2];
typedef AkInt                 AkInt4[4];
typedef AkFloat               AkFloat2[2];
typedef AkDouble              AkDouble2[2];

typedef              AkFloat  AkFloat3[3];
typedef              AkDouble AkDouble3[3];
typedef AK_ALIGN(16) AkFloat  AkFloat4[4];
typedef AK_ALIGN(16) AkDouble AkDouble4[4];
typedef AK_ALIGN(32) AkDouble AkDouble4x4[4];
typedef AK_ALIGN(32) AkFloat4 AkFloat4x4[4];

#undef AK__DEF_ARRAY

#define AK__DEF_ARRAY(TYPE)                                                   \
  typedef struct TYPE##Array {                                                \
    size_t count;                                                             \
    TYPE   items[];                                                           \
  } TYPE##Array;                                                              \
                                                                              \
  typedef struct TYPE##ArrayL {                                               \
    struct TYPE##ArrayL * next;                                               \
    size_t count;                                                             \
    TYPE   items[];                                                           \
  } TYPE##ArrayL

AK__DEF_ARRAY(AkBool);
AK__DEF_ARRAY(AkInt);
AK__DEF_ARRAY(AkUInt);
AK__DEF_ARRAY(AkFloat);
AK__DEF_ARRAY(AkDouble);
AK__DEF_ARRAY(AkString);

#undef AK__DEF_ARRAY

#endif /* assetkit_core_types_h */


================================================
FILE: include/ak/geom.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_geom_h
#define assetkit_geom_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"
#include "map.h"
#include "bbox.h"
#include "map.h"

struct RBTree;
struct AkGeometry;
struct AkMesh;
struct FListItem;
struct AkMaterial;

typedef enum AkGeometryType {
  AK_GEOMETRY_MESH   = 1,
  AK_GEOMETRY_SPLINE = 2,
  AK_GEOMETRY_BREP   = 3
} AkGeometryType;

typedef enum AkGeometryEditFlags {
  AK_GEOM_EDIT_FLAG_ARRAYS  = 1,
  AK_GEOM_EDIT_FLAG_INDICES = 2,
  AK_GEOM_EDIT_FLAG_MUTEX   = 3
} AkGeometryEditFlags;

typedef enum AkMeshPrimitiveType {
  AK_PRIMITIVE_LINES      = 1,
  AK_PRIMITIVE_POLYGONS   = 2,
  AK_PRIMITIVE_TRIANGLES  = 3,
  AK_PRIMITIVE_POINTS     = 4
} AkMeshPrimitiveType;

typedef enum AkTriangleMode {
  AK_TRIANGLES      = 1,
  AK_TRIANGLE_STRIP = 3,
  AK_TRIANGLE_FAN   = 5
} AkTriangleMode;

typedef enum AkLineMode {
  AK_LINES      = 1,
  AK_LINE_LOOP  = 3,
  AK_LINE_STRIP = 5
} AkLineMode;

typedef struct AkVertices {
  /* const char   * id; */
  const char   *name;
  AkTree       *extra;
  AkInput      *input;
  uint32_t      inputCount;
} AkVertices;

/* TODO: */
typedef struct AkJointDesc {
  uint32_t *counts;
  size_t   *indexes;
  uint32_t  allCount;
} AkJointDesc;

typedef struct AkMeshPrimitive {
  struct AkMeshPrimitive *next;
  struct AkMesh          *mesh;
  AkBoundingBox          *bbox;   /* per-primitive bbox */
  const char             *name;
  const char             *bindmaterial;
  struct AkMaterial      *material;
  AkInput                *input;
  AkInput                *pos;
  AkUIntArray            *indices;
  AkTree                 *extra;
  void                   *udata;
  AkMeshPrimitiveType     type;
  uint32_t                nPolygons;
  uint32_t                inputCount;
  AkFloat3                center;

  /* TODO: remove */
  uint32_t                indexStride;
  uint32_t                reserved1; /* private member */
  uint32_t                reserved2; /* private member */
  void                   *reserved3; /* private member */

  /* KHR_materials_variants: optional material overrides. */
  struct AkMaterialVariantMapping *variantMappings;
  uint32_t                         variantMappingCount;

  /* KHR_gaussian_splatting: optional splat metadata. Splat inputs stay
     in the normal primitive input chain. */
  struct AkGaussianSplat          *gsplat;
} AkMeshPrimitive;

typedef struct AkLines {
  AkMeshPrimitive base;
  AkLineMode      mode;
} AkLines;

typedef struct AkPolygon {
  AkMeshPrimitive base;
  AkDoubleArrayL *holes;
  AkUIntArray    *vcount;
  AkBool          haveHoles;
} AkPolygon;

typedef struct AkTriangles {
  AkMeshPrimitive base;
  AkTriangleMode  mode;
} AkTriangles;

typedef struct AkMeshEditHelper {
  AkGeometryEditFlags flags;
  struct RBTree      *buffers;         /* new buffers               */
  struct RBTree      *indices;         /* new indices               */
  AkMap              *inputBufferMap;  /* input-accessor-buffer map */
  void               *mutex;
  void               *duplicator;
  bool                skipFixIndices;
} AkMeshEditHelper;

typedef struct AkMesh {
  struct AkGeometry *geom;
  const char        *convexHullOf;
  AkMeshPrimitive   *primitive;
  AkBoundingBox     *bbox;
  AkTree            *extra;
  AkMeshEditHelper  *edith;
  struct FListItem  *skins;
  const char        *name;
  AkFloatArray      *weights;
  uint32_t           primitiveCount;
  AkFloat3           center;
} AkMesh;

typedef struct AkSpline {
  struct AkGeometry *geom;
  AkSource          *source;
  AkVertices        *cverts;
  AkTree            *extra;
  AkBool             closed;
} AkSpline;

typedef struct AkLine {
  AkFloat3 origin;
  AkFloat3 direction;
  AkTree  *extra;
} AkLine;

typedef struct AkCircle {
  AkFloat radius;
  AkTree *extra;
} AkCircle;

typedef struct AkEllipse {
  AkFloat2 radius;
  AkTree  *extra;
} AkEllipse;

typedef struct AkParabola {
  AkFloat focal;
  AkTree *extra;
} AkParabola;

typedef struct AkHyperbola {
  AkFloat2 radius;
  AkTree  *extra;
} AkHyperbola;

typedef struct AkNurbs {
  AkSource   *source;
  AkVertices *cverts;
  AkTree     *extra;
  AkUInt      degree;
  AkBool      closed;
} AkNurbs;

typedef struct AkCurve {
  AkFloatArrayL *orient;
  AkFloat3       origin;
  AkObject       *curve;
  struct AkCurve *next;
} AkCurve;

typedef struct AkCurves {
  AkCurve *curve;
  AkTree  *extra;
} AkCurves;

typedef struct AkCone {
  AkFloat radius;
  AkFloat angle;
  AkTree *extra;
} AkCone;

typedef struct AkPlane {
  AkFloat4 equation;
  AkTree  *extra;
} AkPlane;

typedef struct AkCylinder {
  AkFloat2 radius;
  AkTree  *extra;
} AkCylinder;

typedef struct AkNurbsSurface {
  AkSource   *source;
  AkVertices *cverts;
  AkTree     *extra;
  AkUInt      degree_u;
  AkUInt      degree_v;
  AkBool      closed_u;
  AkBool      closed_v;
} AkNurbsSurface;

typedef struct AkSphere {
  AkFloat radius;
  AkTree *extra;
} AkSphere;

typedef struct AkTorus {
  AkFloat2 radius;
  AkTree * extra;
} AkTorus;

typedef struct AkSweptSurface {
  AkCurve *curve;
  AkFloat3 direction;
  AkFloat3 origin;
  AkFloat3 axis;
  AkTree  *extra;
} AkSweptSurface;

typedef struct AkSurface {
  /* const char * sid; */

  const char       *name;
  AkObject         *surface;
  AkFloatArrayL    *orient;
  AkFloat3          origin;
  struct AkSurface *next;
} AkSurface;

typedef struct AkSurfaces {
  AkSurface *surface;
  AkTree    *extra;
} AkSurfaces;

typedef struct AkEdges {
  /* const char    * id; */
  const char    *name;
  AkInput       *input;
  AkUIntArray   *primitives;
  AkTree        *extra;
  AkUInt         count;
  uint32_t       inputCount;
} AkEdges;

typedef struct AkWires {
  /* const char    * id; */
  const char  *name;
  AkInput     *input;
  AkUIntArray *vcount;
  AkUIntArray *primitives;
  AkTree      *extra;
  AkUInt       count;
  uint32_t     inputCount;
} AkWires;

typedef struct AkFaces {
  /* const char    * id; */
  const char  *name;
  AkInput     *input;
  AkUIntArray *vcount;
  AkUIntArray *primitives;
  AkTree      *extra;
  AkUInt       count;
  uint32_t     inputCount;
} AkFaces;

typedef struct AkPCurves {
  /* const char    * id; */
  const char  *name;
  AkInput     *input;
  AkUIntArray *vcount;
  AkUIntArray *primitives;
  AkTree      *extra;
  AkUInt       count;
  uint32_t     inputCount;
} AkPCurves;

typedef struct AkShells {
  /* const char    * id; */
  const char  *name;
  AkInput     *input;
  AkUIntArray *vcount;
  AkUIntArray *primitives;
  AkTree      *extra;
  AkUInt       count;
  uint32_t     inputCount;
} AkShells;

typedef struct AkSolids {
  /* const char    * id; */
  const char  *name;
  AkInput     *input;
  AkUIntArray *vcount;
  AkUIntArray *primitives;
  AkTree      *extra;
  AkUInt       count;
  uint32_t     inputCount;
} AkSolids;

/* TODO: */
typedef struct AkBoundryRep {
  struct AkGeometry *geom;
  AkCurves          *curves;
  AkCurves          *surfaceCurves;
  AkSurfaces        *surfaces;
  AkSource          *source;
  AkVertices        *vertices;
  AkEdges           *edges;
  AkWires           *wires;
  AkFaces           *faces;
  AkPCurves         *pcurves;
  AkShells          *shells;
  AkSolids          *solids;
  AkTree            *extra;
} AkBoundryRep;

typedef struct AkGeometry {
  /* const char * id; */
  AkOneWayIterBase   base;
  const char        *name;
  AkObject          *gdata;
  AkTree            *extra;
  AkMap             *materialMap;
  AkBoundingBox     *bbox;
} AkGeometry;

typedef enum AkMeshIsolateType {
  AK_MESH_ISOLATE_NONE      = 0 << 0,
  AK_MESH_ISOLATE_BUFFERS   = 1 << 1,
  AK_MESH_ISOLATE_ACCESSORS = 2 << 2
} AkMeshIsolateType;

/*!
 * @brief Total input count except VERTEX input
 *
 * returns primitive.inputCount - 1 + primitive.vertices.inputCount
 *
 * @return total input count
 */
AK_EXPORT
uint32_t
ak_meshInputCount(AkMesh * __restrict mesh);

/*!
 * @brief set material (symbol) for primitive
 *        actual material will set with bind_material/instance material
 *
 * @param prim     mesh primitive
 * @param material material
 *
 * @return result
 */
AK_EXPORT
AkResult
ak_meshSetMaterial(AkMeshPrimitive *prim,
                   const char      *material);

/*!
 * @brief triangulate all mesh primitives
 *
 * @param mesh mesh
 *
 * @return new triangles/faces count
 */
AK_EXPORT
uint32_t
ak_meshTriangulate(AkMesh * __restrict mesh);

/*!
 * @brief triangulate polygon
 *
 * @param poly polygon primitive
 *
 * @return new triangles/faces count
 */
AK_EXPORT
uint32_t
ak_meshTriangulatePoly(AkPolygon * __restrict poly);

/*!
 * @brief returns true if least one primitive doesn't have normals
 *
 * @param mesh mesh
 *
 * @return boolean
 */
AK_EXPORT
bool
ak_meshNeedsNormals(AkMesh * __restrict mesh);

/*!
 * @brief returns true if primitive doesn't have normals
 *
 * @param prim primitive
 *
 * @return boolean
 */
AK_EXPORT
bool
ak_meshPrimNeedsNormals(AkMeshPrimitive * __restrict prim);

/*!
 * @brief generate normals for all pritimives of mesh
 *
 * @param mesh mesh
 */
AK_EXPORT
void
ak_meshGenNormals(AkMesh * __restrict mesh);

/*!
 * @brief prepare mesh for edit, or enable edit mode with default attribs
 *
 * @param mesh mesh
 */
AK_EXPORT
void
ak_meshBeginEdit(AkMesh * __restrict mesh);

/*!
 * @brief prepare mesh for edit, or enable edit mode
 *
 * @param mesh  meshs
 * @param flags flags needed while edit mode
 */
AK_EXPORT
void
ak_meshBeginEditA(AkMesh  * __restrict mesh,
                  AkGeometryEditFlags flags);

/*!
 * @brief finish edit, disable edit mode, relese allocated memory for editing
 *
 * @param mesh mesh
 */
AK_EXPORT
void
ak_meshEndEdit(AkMesh * __restrict mesh);

AK_EXPORT
AkUIntArray*
ak_meshIndicesArrayFor(AkMesh          * __restrict mesh,
                       AkMeshPrimitive * __restrict prim,
                       bool                         readonly);

AK_EXPORT
AkSourceBuffState*
ak_meshReserveBuffer(AkMesh * __restrict mesh,
                     void   * __restrict buffid,
                     size_t              itemSize,
                     uint32_t            stride,
                     size_t              acc_count);

AK_EXPORT
void
ak_meshReserveBufferForInput(AkMesh   * __restrict mesh,
                             AkInput  * __restrict input,
                             size_t                count);

AK_EXPORT
void
ak_meshReserveBuffers(AkMesh          * __restrict mesh,
                      AkMeshPrimitive * __restrict prim,
                      size_t                       count);

AK_EXPORT
AkResult
ak_meshFillBuffers(AkMesh * __restrict mesh);

AK_EXPORT
void
ak_moveIndices(AkMesh * __restrict mesh);

AK_EXPORT
void
ak_meshMoveBuffers(AkMesh * __restrict mesh);

AK_EXPORT
AkSourceEditHelper*
ak_meshSourceEditHelper(AkMesh  * __restrict mesh,
                        AkInput * __restrict input);

AK_EXPORT
AkDuplicator*
ak_meshDuplicatorForIndices(AkMesh          * __restrict mesh,
                            AkMeshPrimitive * __restrict prim);

AK_EXPORT
void
ak_meshFixIndexBuffer(AkMesh          * __restrict mesh,
                      AkMeshPrimitive * __restrict prim,
                      AkDuplicator    * __restrict duplicator);


void
ak_meshReIndexInputs(AkMesh * __restrict mesh);

void
ak_inputNameIndexed(AkInput * __restrict input,
                    char    * __restrict buf);

AK_EXPORT
void
ak_inputNameBySet(AkInput * __restrict input,
                  char    * __restrict buf);

AK_EXPORT
AkInput*
ak_meshInputGet(AkMeshPrimitive *prim,
                const char      *inputSemantic,
                uint32_t         set);

AK_EXPORT
bool
ak_meshIsIsolated(AkMesh *mesh);

/*!
 * @brief current isolation rule
 *
 * 1. Separated buffer per accessor
 * 2. Separated accessor per input
 *
 * @return true if the rules are match
 */
AK_EXPORT
bool
ak_meshIsPrimIsolated(AkMeshPrimitive *prim);

AK_EXPORT
void
ak_meshIsolate(AkMesh *mesh);

AK_EXPORT
void
ak_meshIsolatePrim(AkMeshPrimitive *prim);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_geom_h */


================================================
FILE: include/ak/gsplat.h
================================================
/*
 * Copyright (C) 2026 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_gsplat_h
#define assetkit_gsplat_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"

/*!
 * @brief KHR_gaussian_splatting metadata.
 *
 * The base extension stores splats as POINT primitives. Per-splat data
 * stays in AkMeshPrimitive.input (POSITION, ROTATION, SCALE, OPACITY,
 * COLOR_0..COLOR_15). This struct stores only the extension-level
 * rendering hints and optional decoder output for compressed payloads.
 */

typedef enum AkGaussianSplatKernel {
  AK_GSPLAT_KERNEL_UNKNOWN = 0,
  AK_GSPLAT_KERNEL_ELLIPSE = 1   /* 2D ellipse projection of an ellipsoid */
} AkGaussianSplatKernel;

typedef enum AkGaussianSplatColorSpace {
  AK_GSPLAT_COLOR_UNKNOWN              = 0,
  AK_GSPLAT_COLOR_SRGB_REC709_DISPLAY  = 1, /* "srgb_rec709_display" */
  AK_GSPLAT_COLOR_LIN_REC709_DISPLAY   = 2  /* "lin_rec709_display"  */
} AkGaussianSplatColorSpace;

typedef enum AkGaussianSplatProjection {
  AK_GSPLAT_PROJECTION_PERSPECTIVE  = 0, /* default */
  AK_GSPLAT_PROJECTION_ORTHOGRAPHIC = 1
} AkGaussianSplatProjection;

typedef enum AkGaussianSplatSortingMethod {
  AK_GSPLAT_SORTING_CAMERA_DISTANCE = 0, /* default */
  AK_GSPLAT_SORTING_NONE            = 1
} AkGaussianSplatSortingMethod;

typedef struct AkGaussianSplat {
  AkGaussianSplatKernel        kernel;
  AkGaussianSplatColorSpace    colorSpace;
  AkGaussianSplatProjection    projection;
  AkGaussianSplatSortingMethod sortingMethod;

  /* Filled by an optional decoder when a compression extension is present. */
  void                        *decodedData;     /* opaque, decoder-owned */
  uint32_t                     decodedCount;     /* decoded splat count */
  uint32_t                     reserved;
} AkGaussianSplat;

/*---------------------------------------------------------------------*/
/* External decoder interface.                                         */
/*                                                                     */
/* Apps provide a side library exporting assetkit_gsplat_create, the   */
/* same pattern used by Draco / meshoptimizer / KTX2 shims. AssetKit   */
/* dlopens it from AK_OPT_GLTF_GSPLAT_DECODER_PATH or, when autoload   */
/* is enabled, from the standard side-library name.                    */
/*                                                                     */
/* The uncompressed base KHR_gaussian_splatting extension does not     */
/* need this decoder; renderers read primitive accessors directly.     */
/*---------------------------------------------------------------------*/

struct AkHeap;
struct AkGLTFState;
struct AkMeshPrimitive;
struct json_t;

/* Decoders may implement either entrypoint. decodeBytes is preferred when
   the compression extension references a bufferView directly; decodePrimitive
   is kept for formats that need broader glTF state. */
typedef int
(*AkGaussianSplatDecodeBytesFn)(struct AkHeap          * heap,
                                struct AkMeshPrimitive * prim,
                                const uint8_t          * data,
                                size_t                   size);

typedef int
(*AkGaussianSplatDecodePrimitiveFn)(struct AkGLTFState     * gst,
                                    struct AkMeshPrimitive * prim,
                                    const struct json_t    * jprim,
                                    const struct json_t    * jcompression);

typedef struct AkGaussianSplatDecoder {
  void                              *userdata;
  AkGaussianSplatDecodeBytesFn       decodeBytes;
  AkGaussianSplatDecodePrimitiveFn   decodePrimitive;
  void                             (*close)(void *ud);
} AkGaussianSplatDecoder;

/*!
 * @brief Decoder-library entrypoint. Returns 0 on success.
 */
typedef int
(*AkGaussianSplatDecoderCreateFn)(AkGaussianSplatDecoder * out);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_gsplat_h */


================================================
FILE: include/ak/image.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_image_h
#define assetkit_image_h

#include "common.h"

struct AkInitFrom;

typedef enum AkImageType {
  AK_IMAGE_TYPE_1D   = 0,
  AK_IMAGE_TYPE_2D   = 1,
  AK_IMAGE_TYPE_3D   = 2,
  AK_IMAGE_TYPE_CUBE = 3
} AkImageType;

typedef struct AkImageData {
  void    *data;
  uint32_t width;
  uint32_t height;
  AkEnum   comp;
} AkImageData;

typedef struct AkSizeExact {
  uint32_t width;
  uint32_t height;
} AkSizeExact;

typedef struct AkSizeRatio {
  float width;
  float height;
} AkSizeRatio;

typedef struct AkMips {
  uint32_t levels;
  bool     autoGenerate;
} AkMips;

typedef struct AkImageFormat {
  const char       *space;
  const char       *exact;
  AkChannelFormat   channel;
  AkRangeFormat     range;
  AkPrecisionFormat precision;
} AkImageFormat;

typedef struct AkImageSize {
  AkUInt width;
  AkUInt height;
  AkUInt depth;
} AkImageSize;

typedef struct AkImageBase {
  AkImageFormat     *format;
  struct AkInitFrom *initFrom;
  long               arrayLen;
  AkImageType        type;
} AkImageBase;

typedef struct AkImage2d {
  AkImageBase  base;
  AkSizeExact *sizeExact;
  AkSizeRatio *sizeRatio;
  AkMips      *mips;
  const char  *unnormalized;
} AkImage2d;

typedef struct AkImage3d {
  AkImageBase base;
  AkImageSize size;
  AkMips      mips;
} AkImage3d;

typedef struct AkImageCube {
  AkImageBase base;
  uint32_t    width;
  AkMips      mips;
} AkImageCube;

typedef struct AkImage {
  /* const char * id;  */
  /* const char * sid; */
  const char        *name;
  struct AkInitFrom *initFrom;
  AkImageBase       *image;
  AkImageData       *data;
  AkTree            *extra;
  struct AkImage    *next;

  AkBool             renderable;
  AkBool             renderableShare;

  bool               flipOnLoad;
} AkImage;

AK_EXPORT
void
ak_imageLoad(AkImage * __restrict image);

/* Loader Configurator */
typedef AkImageData* (*AkImageLoadFromFileFn)(AkHeap     * __restrict heap,
                                              AkImage    * __restrict image,
                                              const char * __restrict path,
                                              bool                    flipVertically);

typedef AkImageData* (*AkImageLoadFromMemoryFn)(AkHeap   * __restrict heap,
                                                AkImage  * __restrict image,
                                                AkBuffer * __restrict buff,
                                                bool                  flipVertically);

typedef void  (*AkImageFlipVerticallyOnLoad)(bool flip);

AK_EXPORT
void
ak_imageInitLoader(AkImageLoadFromFileFn   fromFile,
                   AkImageLoadFromMemoryFn fromMemory);

#endif /* assetkit_image_h */


================================================
FILE: include/ak/instance.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_instance_h
#define assetkit_instance_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"
#include "node.h"

typedef struct AkInstanceListItem {
  struct AkInstanceListItem *prev;
  struct AkInstanceListItem *next;
  AkInstanceBase *instance;
  size_t          index;
} AkInstanceListItem;

typedef struct AkInstanceList {
  AkInstanceListItem *first;
  AkInstanceListItem *last;
  size_t              count;
  size_t              lastindex;
} AkInstanceList;

AK_EXPORT
AkInstanceBase*
ak_instanceMake(AkHeap * __restrict heap,
                void   * __restrict memparent,
                void   * __restrict object);

AK_EXPORT
AkInstanceGeometry*
ak_instanceMakeGeom(AkHeap     * __restrict heap,
                    void       * __restrict memparent,
                    AkGeometry * __restrict object);

AK_EXPORT
void
ak_instanceListAdd(AkInstanceList *list,
                   AkInstanceBase *inst);

AK_EXPORT
void
ak_instanceListDel(AkInstanceList *list,
                   AkInstanceListItem *item);

AK_EXPORT
void
ak_instanceListEmpty(AkInstanceList *list);

char*
ak_instanceName(AkInstanceListItem *item);

AK_EXPORT
void *
ak_instanceObject(AkInstanceBase *instance);

AK_EXPORT
AkNode *
ak_instanceObjectNode(AkNode * node);

AK_EXPORT
AkGeometry *
ak_instanceObjectGeom(AkNode * node);

AK_EXPORT
AkGeometry *
ak_instanceObjectGeomId(AkDoc * __restrict doc,
                        const char * id);

AK_EXPORT
AkNode*
ak_instanceMoveToSubNode(AkNode * __restrict node,
                         AkInstanceBase     *inst);

AK_EXPORT
AkNode*
ak_instanceMoveToSubNodeIfNeeded(AkNode * __restrict node,
                                 AkInstanceBase     *inst);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_instance_h */


================================================
FILE: include/ak/library.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_lib_h
#define assetkit_lib_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"
#include "cam.h"
#include "light.h"

typedef struct AkLibrary {
  /* const char * id; */

  struct AkLibrary *next;
  const char       *name;
  AkTree           *extra;
  AkOneWayIterBase *chld;
  uint64_t          count;
} AkLibrary;

AK_EXPORT
AkGeometry *
ak_libFirstGeom(AkDoc * __restrict doc);

AK_EXPORT
AkResult
ak_libAddCamera(AkDoc * __restrict doc, AkCamera * __restrict cam);

AK_EXPORT
AkResult
ak_libAddLight(AkDoc * __restrict doc, AkLight * __restrict light);

AK_EXPORT
void
ak_libInsertInto(AkLibrary *lib, void *item, int32_t prevoff, int32_t nextoff);

AK_EXPORT
AkLibrary*
ak_libFirstOrCreat(AkDoc * __restrict doc, uint32_t itemOffset);

AK_EXPORT
AkLibrary*
ak_libImageFirstOrCreat(AkDoc * __restrict doc);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_lib_h */


================================================
FILE: include/ak/light.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_light_h
#define assetkit_light_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"

typedef enum AkLightType {
  AK_LIGHT_TYPE_AMBIENT     = 1,
  AK_LIGHT_TYPE_DIRECTIONAL = 2,
  AK_LIGHT_TYPE_POINT       = 3,
  AK_LIGHT_TYPE_SPOT        = 4,
  AK_LIGHT_TYPE_CUSTOM      = 5
} AkLightType;

typedef struct AkLightBase {
  AkLightType type;
  uint32_t    ctype; /* custom type, because type always is custom */
  AkColor     color;
  AkFloat3    direction;
  float       intensity;
  float       range;
} AkLightBase;

typedef AkLightBase AkAmbientLight;
typedef AkLightBase AkDirectionalLight;

typedef struct AkPointLight {
  AkLightBase base;
  float       constAttn;
  float       linearAttn;
  float       quadAttn;
} AkPointLight;

typedef struct AkSpotLight {
  AkLightBase base;
  float       constAttn;
  float       linearAttn;
  float       quadAttn;
  float       innerConeAngle;
  float       outerConeAngle;
  float       falloffAngle;
  float       falloffExp;
} AkSpotLight;

typedef struct AkLight {
  /* const char * id; */
  const char     *name;
  AkLightBase    *tcommon;
  AkTechnique    *technique;
  AkTree         *extra;
  struct AkLight *next;
} AkLight;

AK_EXPORT
AkLight*
ak_defaultLight(void * __restrict memparent);

/*!
 * @brief Allocate a light of the given type with sensible defaults
 *        (white color, downward direction for directional/spot,
 *        constant attenuation for point/spot, 30° spot falloff)
 *        and register it in the document's lights library.
 *
 * Wires up AkLight + the matching tcommon variant (AkLightBase for
 * ambient/directional, AkPointLight, or AkSpotLight) in one call.
 * Pair with ak_nodeAttachLight() to expose the light in the scene
 * tree.
 *
 * @param[in]  doc        document the light will live in (required)
 * @param[in]  memparent  heap parent for ownership (NULL → doc)
 * @param[in]  type       AK_LIGHT_TYPE_AMBIENT/DIRECTIONAL/POINT/SPOT
 *
 * @return Newly allocated AkLight, or NULL on failure (unsupported
 *         type, allocation failure, etc.)
 */
AK_EXPORT
AkLight *
ak_lightMake(AkDoc * __restrict doc,
             void  * __restrict memparent,
             AkLightType type);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_light_h */


================================================
FILE: include/ak/map.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* TODO: use separate rbtree instead of heap's rbtree (optional)
 *       this map impl have many TODOs
 */

#ifndef assetkit_map_h
#define assetkit_map_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"
#include "memory.h"
#include <stdbool.h>

typedef struct AkMapItem {
  struct AkMapItem *prev;
  struct AkMapItem *next;
  void             *data;
  bool              isMapItem;
} AkMapItem;

typedef struct AkMap {
  AkHeap    *heap;
  AkMapItem *root;
} AkMap;

typedef AkHeapSrchCmpFn AkMapCmp;

AK_EXPORT
void
ak_map_addptr(AkMap *map, void *ptr);

AK_EXPORT
void*
ak_map_find(AkMap *map, void *id);

AK_EXPORT
AkMapItem*
ak_map_findm(AkMap *map, void *id);

AK_EXPORT
void
ak_map_add(AkMap *map,
           void  *value,
           void  *id);

AK_EXPORT
void
ak_multimap_add(AkMap *map,
                void  *value,
                void  *id);

AK_EXPORT
AkMap *
ak_map_new(AkMapCmp cmp);

AK_EXPORT
void
ak_map_destroy(AkMap *map);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_map_h */


================================================
FILE: include/ak/material.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_material_h
#define assetkit_material_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"
#include "texture.h"

struct AkBindMaterial;
struct AkMeshPrimitive;
struct AkEffect;
struct AkInstanceMaterial;
struct AkMaterial;
struct AkDoc;
struct AkTreeNode;

/*!
 * @brief Named material variant from KHR_materials_variants.
 */
typedef struct AkMaterialVariant {
  struct AkMaterialVariant *next;
  const char               *name;
  struct AkTreeNode        *extras;
} AkMaterialVariant;

/*!
 * @brief Primitive material override for a document variant index.
 */
typedef struct AkMaterialVariantMapping {
  struct AkMaterialVariantMapping *next;
  struct AkMaterial               *material;
  uint32_t                         variantIndex;
} AkMaterialVariantMapping;

AK_EXPORT
AkMaterialVariant*
ak_materialVariantByName(struct AkDoc * __restrict doc,
                         const char   * __restrict name);

typedef enum AkOpaque {
  AK_OPAQUE_OPAQUE   = 0, /* fully opaque */
  AK_OPAQUE_A_ONE    = 1,
  AK_OPAQUE_A_ZERO   = 2,
  AK_OPAQUE_RGB_ONE  = 3,
  AK_OPAQUE_RGB_ZERO = 4,
  AK_OPAQUE_BLEND    = 5, /* Blend only */
  AK_OPAQUE_MASK     = 6, /* Activate alpha cutoff */
  AK_OPAQUE_DEFAULT  = AK_OPAQUE_OPAQUE
} AkOpaque;

typedef enum AkMaterialType {
  AK_MATERIAL_PHONG              = 1,
  AK_MATERIAL_BLINN              = 2,
  AK_MATERIAL_LAMBERT            = 3,
  AK_MATERIAL_CONSTANT           = 4,
  AK_MATERIAL_METALLIC_ROUGHNESS = 5,  /* PBR Material */
  AK_MATERIAL_SPECULAR_GLOSSINES = 6,  /* PBR Material */
  AK_MATERIAL_PBR                = 7,  /* PBR Material */

  AK_MATERIAL_UNLIT              = AK_MATERIAL_CONSTANT
} AkMaterialType;

/*
typedef struct AkFloatOrParam {
  float   *val;
  AkParam *param;
} AkFloatOrParam;
*/

typedef struct AkColorDesc {
  AkColor      *color;
  AkParam      *param;
  AkTextureRef *texture;
} AkColorDesc;

typedef struct AkTransparent {
  AkColorDesc    *color;
  float           amount;
  AkOpaque        opaque;
  float           cutoff;
} AkTransparent;

typedef struct AkReflective {
  AkColorDesc    *color;
  float           amount;
} AkReflective;

typedef struct AkOcclusion {
  AkTextureRef      *tex;
  float              strength;
  AkTextureChannels  textureChannels;
} AkOcclusion;

typedef struct AkNormalMap {
  AkTextureRef *tex;
  float         scale;
} AkNormalMap;

typedef struct AkMaterialMetallicProp {
  AkTextureRef      *tex;
  float              intensity;
  AkTextureChannels  textureChannels;
} AkMaterialMetallicProp;

typedef struct AkMaterialSpecularProp {
  AkTextureRef      *specularTex;
  AkColorDesc       *color;
  union {
    float            strength;
    float            shininess;
  };
  AkTextureChannels  textureChannels;
} AkMaterialSpecularProp;

typedef struct AkMaterialClearcoat {
  AkTextureRef      *roughnessTexture;
  AkTextureRef      *normalTexture;

  AkTextureRef      *texture;
  float              intensity;
  float              roughness;
  float              normalScale;
  AkTextureChannels  textureChannels;
  AkTextureChannels  roughnessTextureChannels;
} AkMaterialClearcoat;

typedef struct AkMaterialEmissionProp {
  AkColorDesc color;
  float       strength;
} AkMaterialEmissionProp;

/* KHR_materials_transmission */
typedef struct AkMaterialTransmissionProp {
  AkTextureRef      *texture;
  float              factor;
  AkTextureChannels  textureChannels;
} AkMaterialTransmissionProp;

typedef struct AkMaterialSheen {
  AkColorDesc       *color;
  AkTextureRef      *roughnessTexture;
  float              roughness;
  AkTextureChannels  roughnessTextureChannels;
} AkMaterialSheen;

typedef struct AkMaterialIridescence {
  AkTextureRef      *texture;
  AkTextureRef      *thicknessTexture;
  float              factor;
  float              ior;
  float              thicknessMinimum;
  float              thicknessMaximum;
  AkTextureChannels  textureChannels;
  AkTextureChannels  thicknessTextureChannels;
} AkMaterialIridescence;

typedef struct AkMaterialVolume {
  AkTextureRef      *thicknessTexture;
  AkColor            attenuationColor;
  float              thicknessFactor;
  float              attenuationDistance;
  AkTextureChannels  thicknessTextureChannels;
} AkMaterialVolume;

typedef struct AkMaterialAnisotropy {
  AkTextureRef *texture;
  float         strength;
  float         rotation;
} AkMaterialAnisotropy;

typedef struct AkMaterialDispersion {
  float         dispersion;
} AkMaterialDispersion;

typedef struct AkMaterialDiffuseTransmission {
  AkTextureRef      *texture;
  AkColorDesc       *color;
  float              factor;
  AkTextureChannels  textureChannels;
} AkMaterialDiffuseTransmission;

typedef struct AkTechniqueFxCommon {
  AkColorDesc                *ambient;
  AkMaterialEmissionProp      *emission;

  union {
    AkColorDesc              *diffuse;
    AkColorDesc              *albedo;
  };

  AkOcclusion                *occlusion;
  AkNormalMap                *normal;
  AkMaterialClearcoat        *clearcoat;

  /* metallic properties      */
  AkMaterialMetallicProp     *metalness;
  AkMaterialMetallicProp     *roughness;

  /* specular */
  AkMaterialSpecularProp     *specular;

  /* reflectivity */
  AkReflective               *reflective;
  float                       ior;

  /* TODO: can we merge transparent and transmission */
  /* transparency */
  AkTransparent              *transparent;
  AkMaterialTransmissionProp *transmission;
  AkMaterialSheen            *sheen;
  AkMaterialIridescence      *iridescence;
  AkMaterialVolume           *volume;
  AkMaterialAnisotropy       *anisotropy;
  AkMaterialDispersion       *dispersion;
  AkMaterialDiffuseTransmission *diffuseTransmission;

  /* common */
  AkMaterialType              type;
  bool                        doubleSided;
} AkTechniqueFxCommon;

/*!
 * @brief a helper that returns effect for given mesh prim for a bindMaterial
 *
 * @param bindMat      bind material object in AkNode
 * @param meshPrim     mesh primitive
 * @param foundInstMat instance material
 *
 * @return effect that points by a AkMaterial
 */
AK_EXPORT
struct AkEffect*
ak_effectForBindMaterial(struct AkBindMaterial      * __restrict bindMat,
                         struct AkMeshPrimitive     * __restrict meshPrim,
                         struct AkInstanceMaterial ** __restrict foundInstMat);

#ifdef __cplusplus
}
#endif
#endif /* assetkit_material_h */


================================================
FILE: include/ak/memory.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_memory_h
#define assetkit_memory_h

#include <stdint.h>
#include <sys/types.h>

#include "common.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct AkObject {
  struct AkObject * next;
  size_t size;
  AkEnum type;
  void * pData;
  char   data[];
} AkObject;

/* Inline payload access — pData is the start of the struct copy living
   inside the AkObject's tail buffer. Used when ak_objAlloc was invoked
   with sizeof(SomeStruct). */
#define ak_objGetOrNull(OBJ) (OBJ ? (OBJ)->pData : NULL)
#define ak_objGet(OBJ)       ((OBJ)->pData)

/* Pointer-storage access — when ak_objAlloc was invoked with
   sizeof(SomePtr) the inline payload is one pointer-sized slot holding a
   reference to an external object (the referenced object owns its own
   lifetime). ak_objGetTarget dereferences once to recover that pointer. */
#define ak_objGetTarget(OBJ) (*(void **)((OBJ)->pData))

#define ak_allocator ak_mem_allocator()

typedef struct AkHeapAllocator {
  void  *(*malloc)(size_t);
  void  *(*calloc)(size_t, size_t);
  void *(*realloc)(void *, size_t);
  int  (*memalign)(void **, size_t, size_t);
  char  *(*strdup)(const char *);
  void     (*free)(void *);
  size_t   (*size)(const void *);
} AkHeapAllocator;

typedef struct AkHeapSrchCtx AkHeapSrchCtx;
typedef struct AkHeapNode    AkHeapNode;
typedef struct AkHeap        AkHeap;
struct AkURL;

typedef int (*AkHeapSrchCmpFn)(void * __restrict key1,
                               void * __restrict key2);

typedef void (*AkHeapSrchPrintFn)(void * __restrict key);

typedef enum AkHeapFlags {
  AK_HEAP_FLAGS_NONE        = 0,
  AK_HEAP_FLAGS_INITIALIZED = 1 << 0,
  AK_HEAP_FLAGS_DYNAMIC     = 1 << 1,
} AkHeapFlags;

typedef enum AkHeapNodeFlags {
  AK_HEAP_NODE_FLAGS_NONE      = 0,       /* plain node                      */
  AK_HEAP_NODE_FLAGS_HEAP_CHLD = 1 << 0,  /* node has attached heaps         */
  AK_HEAP_NODE_FLAGS_EXT       = 1 << 1,  /* node has one of:                */
  AK_HEAP_NODE_FLAGS_SID_CHLD  = 1 << 2,  /* least one of children has sid   */
  AK_HEAP_NODE_FLAGS_RED       = 1 << 3,  /* RBtree color bit                */
  AK_HEAP_NODE_FLAGS_SRCH      = 1 << 4,  /* node has an id                  */
  AK_HEAP_NODE_FLAGS_SID       = 1 << 5,  /* memory node or its attr has sid */
  AK_HEAP_NODE_FLAGS_REFC      = 1 << 6,  /* node is reference counted       */
  AK_HEAP_NODE_FLAGS_EXTRA     = 1 << 7,  /* node has <extra> element        */
  AK_HEAP_NODE_FLAGS_INF       = 1 << 8,  /* node has <asset> element        */
  AK_HEAP_NODE_FLAGS_URL       = 1 << 9,  /* node has retained mem via url   */
  AK_HEAP_NODE_FLAGS_USR       = 1 << 10, /* user data                       */
  AK_HEAP_NODE_FLAGS_USRF      = 1 << 11, /* user data must be freed         */
  AK_HEAP_NODE_FLAGS_MMAP      = 1 << 12, /* attached mmap-ed memory list    */
  AK_HEAP_NODE_FLAGS_SID_NODE  = AK_HEAP_NODE_FLAGS_SID,
  AK_HEAP_NODE_FLAGS_EXT_ALL   = AK_HEAP_NODE_FLAGS_EXT
                               | AK_HEAP_NODE_FLAGS_SRCH
                               | AK_HEAP_NODE_FLAGS_SID
                               | AK_HEAP_NODE_FLAGS_REFC
                               | AK_HEAP_NODE_FLAGS_EXTRA
                               | AK_HEAP_NODE_FLAGS_INF
                               | AK_HEAP_NODE_FLAGS_URL
                               | AK_HEAP_NODE_FLAGS_USR
                               | AK_HEAP_NODE_FLAGS_USRF
                               | AK_HEAP_NODE_FLAGS_MMAP,
  AK_HEAP_NODE_FLAGS_EXT_FRST = AK_HEAP_NODE_FLAGS_SRCH
} AkHeapNodeFlags;

AK_EXPORT
AkHeapAllocator *
ak_heap_allocator(AkHeap * __restrict heap);

AK_EXPORT
AkHeap *
ak_heap_getheap(void * __restrict memptr);

AK_EXPORT
AkHeap *
ak_heap_default(void);

AK_EXPORT
AkHeap *
ak_heap_new(AkHeapAllocator *allocator,
            AkHeapSrchCmpFn cmp,
            AkHeapSrchPrintFn print);

AK_EXPORT
void
ak_heap_attach(AkHeap * __restrict parent,
               AkHeap * __restrict chld);

AK_EXPORT
void
ak_heap_dettach(AkHeap * __restrict parent,
                AkHeap * __restrict chld);

AK_EXPORT
void
ak_heap_setdata(AkHeap * __restrict heap,
                void   * __restrict memptr);

AK_EXPORT
void*
ak_heap_data(AkHeap * __restrict heap);

AK_EXPORT
void
ak_heap_init(AkHeap          * __restrict heap,
             AkHeapAllocator * __restrict allocator,
             AkHeapSrchCmpFn              cmp,
             AkHeapSrchPrintFn            print);

AK_EXPORT
void
ak_heap_destroy(AkHeap * __restrict heap);

AK_EXPORT
char*
ak_heap_strdup(AkHeap * __restrict heap,
               void * __restrict parent,
               const char * str);

AK_EXPORT
char*
ak_heap_strndup(AkHeap * __restrict heap,
                void   * __restrict parent,
                const char * str,
                size_t       size);

AK_EXPORT
void*
ak_heap_alloc(AkHeap * __restrict heap,
              void   * __restrict parent,
              size_t size);

AK_EXPORT
void*
ak_heap_calloc(AkHeap * __restrict heap,
               void   * __restrict parent,
               size_t size);

AK_EXPORT
void*
ak_heap_realloc(AkHeap * __restrict heap,
                void   * __restrict parent,
                void   * __restrict memptr,
                size_t newsize);

AK_EXPORT
void *
ak_heap_chld(AkHeapNode *heapNode);

AK_EXPORT
void
ak_heap_chld_set(AkHeapNode * __restrict heapNode,
                 AkHeapNode * __restrict chldNode);

AK_EXPORT
AkHeapNode *
ak_heap_parent(AkHeapNode *heapNode);

AK_EXPORT
void
ak_heap_setp(AkHeapNode * __restrict heapNode,
             AkHeapNode * __restrict newParent);

AK_EXPORT
void
ak_heap_moveh(AkHeapNode * __restrict heapNode,
              AkHeap     * __restrict newheap);

AK_EXPORT
void
ak_heap_setpm(void   * __restrict memptr,
              void   * __restrict newparent);

AK_EXPORT
void
ak_heap_free(AkHeap     * __restrict heap,
             AkHeapNode * __restrict heapNode);

AK_EXPORT
void
ak_heap_cleanup(AkHeap * __restrict heap);

AK_EXPORT
void *
ak_heap_getId(AkHeap     * __restrict heap,
              AkHeapNode * __restrict heapNode);

AK_EXPORT
void
ak_heap_setId(AkHeap     * __restrict heap,
              AkHeapNode * __restrict heapNode,
              void       * __restrict memId);

AK_EXPORT
AkResult
ak_heap_getNodeById(AkHeap      * __restrict heap,
                    void        * __restrict memId,
                    AkHeapNode ** __restrict dest);

AK_EXPORT
AkResult
ak_heap_getNodeByURL(AkHeap       * __restrict heap,
                     struct AkURL * __restrict url,
                     AkHeapNode  ** __restrict dest);

AK_EXPORT
AkResult
ak_heap_getMemById(AkHeap * __restrict heap,
                   void   * __restrict memId,
                   void  ** __restrict dest);

AK_EXPORT
void*
ak_heap_setUserData(AkHeap * __restrict heap,
                    void   * __restrict mem,
                    void   * __restrict userData);

AK_EXPORT
int
ak_heap_refc(AkHeapNode * __restrict heapNode);

AK_EXPORT
int
ak_heap_retain(AkHeapNode * __restrict heapNode);

AK_EXPORT
void
ak_heap_release(AkHeapNode * __restrict heapNode);

AK_EXPORT
void
ak_heap_printKeys(AkHeap * __restrict heap);

/* default heap helpers */

AK_EXPORT
AkHeap*
ak_attachedHeap(void * __restrict memptr);

AK_EXPORT
void
ak_setAttachedHeap(void   * __restrict memptr,
                   AkHeap * __restrict heap);

AK_EXPORT
AkHeapAllocator *
ak_mem_allocator(void);

AK_EXPORT
void
ak_mem_printKeys(void);

AK_EXPORT
void*
ak_malloc(void * __restrict parent,
          size_t size);

AK_EXPORT
void*
ak_calloc(void * __restrict parent,
          size_t size);

AK_EXPORT
char*
ak_strdup(void * __restrict parent,
          const char * __restrict str);

AK_EXPORT
void*
ak_realloc(void * __restrict parent,
           void * __restrict memptr,
           size_t newsize);

AK_EXPORT
void
ak_mem_setp(void * __restrict memptr,
            void * __restrict newparent);

AK_EXPORT
void *
ak_mem_parent(void *mem);

AK_EXPORT
void
ak_free(void * __restrict memptr);

AK_EXPORT
void *
ak_mem_getId(void * __restrict memptr);

AK_EXPORT
void
ak_mem_setId(void * __restrict memptr,
             void * __restrict memId);

AK_EXPORT
AkResult
ak_mem_getMemById(void * __restrict ctx,
                  void * __restrict memId,
                  void ** __restrict dest);

AK_EXPORT
int
ak_refc(void * __restrict mem);

AK_EXPORT
int
ak_retain(void * __restrict mem);

AK_EXPORT
void
ak_release(void * __restrict mem);

/* mem wrapper helpers */

AK_EXPORT
AkObject*
ak_objAlloc(AkHeap * __restrict heap,
            void * __restrict memParent,
            size_t typeSize,
            AkEnum typeEnum,
            bool zeroed);

AK_EXPORT
void*
ak_userData(void * __restrict mem);

AK_EXPORT
void*
ak_setUserData(void * __restrict mem, void * __restrict userData);

AK_EXPORT
AkObject*
ak_objFrom(void * __restrict memptr);

AK_EXPORT
void*
ak_mmap_rdonly(int fd, size_t size);

AK_EXPORT
void
ak_unmap(void *file, size_t size);

AK_EXPORT
void
ak_mmap_attach(void * __restrict obj, void * __restrict mapped, size_t sized);

AK_EXPORT
void
ak_unmmap_attached(void * __restrict obj);

#ifdef __cplusplus
}
#endif

#endif /* assetkit_memory_h */


================================================
FILE: include/ak/node.h
================================================
/*
 * Copyright (C) 2020 Recep Aslantas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef assetkit_node_h
#define assetkit_node_h
#ifdef __cplusplus
extern "C" {
#endif

#include "common.h"

struct AkInstanceMorph;
struct AkAccessor;

typedef enum AkNodeFlags {
  AK_NODEF_FIXED_COORD = 1
} AkNodeFlags;

/*!
 * @brief Per-instance TRS accessors for EXT_mesh_gpu_instancing.
 */
typedef struct AkInstanceAttribs {
  struct AkAccessor *translation;  /* optional, vec3 x count */
  struct AkAccessor *rotation;     /* optional, vec4 x count (quaternion) */
  struct AkAccessor *scale;        /* optional, vec3 x count */
  uint32_t           count;        /* number of instances */
} AkInstanceAttribs;

typedef enum AkNodeType {
  AK_NODE_TYPE_NODE        = 1,
  AK_NODE_TYPE_CAMERA_NODE = 2,
  AK_NODE_TYPE_JOINT       = 3
} AkNodeType;

typedef struct AkListIter {
  void *prev;
  void *next;
} AkListIter;

typedef struct AkTreeWithParentIter {
  void *prev;
  void *next;
  void *parent;
  void *chld;
} AkTreeWithParentIter;

typedef struct AkTreeIter {
  void *prev;
  void *next;
  void *chld;
} AkTreeIter;

typedef struct AkNode {
  /* const char * id;  */
  /* const char * sid; */

  const char           *name;
  AkNodeFlags           flags;
  AkNodeType            nodeType;
  AkStringArray        *layer;
  struct AkTransform   *transform;
  bool                  visible;

  /* only avilable if library is forced to calculate them
     check these two matrix to avoid extra or same calculation
   */
  struct AkMatrix      *matrix;
  struct AkMatrix      *matrixWorld;
  struct AkBoundingBox *bbox;
  
  AkInstanceGeometry   *geometry;
  AkInstanceBase       *camera;
  AkInstanceBase       *light;
  AkInstanceNode       *node;

  /* EXT_mesh_gpu_instancing, NULL if not authored. */
  AkInstanceAttribs    *instancing;

  AkTree               *extra;

  struct AkNode        *prev;
  struct AkNode        *next;
  struct AkNode        *chld;
  struct AkNode        *parent;
} AkNode;

AK_EXPORT
void
ak_addSubNode(AkNode * __restrict parent,
              AkNode * __restrict subnode,
              bool                fixCoordSys);

/*!
 * @brief Allocate a fresh AkNode in the document's heap.
 *
 * Optionally attaches the new node as a child of @p parent (via
 * ak_addSubNode without coord-sys fix-up — the caller is in control
 * of orientation). The node's name is duplicated into the heap if
 * @p name is non-NULL.
 *
 * @param[in]  doc     document the node will live in (required)
 * @param[in]  parent  parent node to attach as child of, or NULL
 *                     to leave the new node unparented
 * @param[in]  name    optional node name (deep-copied)
 *
 * @return Newly allocated AkNode, or NULL on allocation failure.
 */
AK_EXPORT
AkNode *
ak_nodeMake(AkDoc      * __restrict doc,
            AkNode     * __restrict parent,
            const char * name);

/*!
 * @brief Find a direct child of @p parent whose name matches @p name.
 *
 * Linear scan over the immediate children chain. NULL parent or NULL
 * name returns NULL. Returns the first match — names aren't unique
 * by spec, so callers that care should walk the result chain
 * themselves.
 */
Download .txt
gitextract_y45q9sak/

├── .github/
│   ├── FUNDING.yml
│   └── __disabled_workflows/
│       └── cmake.yml
├── .gitignore
├── .gitmodules
├── .travis.yml
├── CMakeLists.txt
├── EXTENSIONS.md
├── EXTRAS.md
├── LICENSE
├── README.md
├── appveyor.yml
├── docs/
│   ├── make.bat
│   └── source/
│       ├── api.rst
│       ├── build.rst
│       ├── conf.py
│       ├── getting_started.rst
│       ├── index.rst
│       ├── opt.rst
│       ├── quick_intro.rst
│       └── version.rst
├── include/
│   └── ak/
│       ├── animation.h
│       ├── assetkit.h
│       ├── bbox.h
│       ├── cam.h
│       ├── common.h
│       ├── context.h
│       ├── controller.h
│       ├── coord-util.h
│       ├── coord.h
│       ├── core-types.h
│       ├── geom.h
│       ├── gsplat.h
│       ├── image.h
│       ├── instance.h
│       ├── library.h
│       ├── light.h
│       ├── map.h
│       ├── material.h
│       ├── memory.h
│       ├── node.h
│       ├── options.h
│       ├── path.h
│       ├── profile.h
│       ├── sid.h
│       ├── source.h
│       ├── string.h
│       ├── texture.h
│       ├── transform.h
│       ├── trash.h
│       ├── type.h
│       ├── url.h
│       ├── util.h
│       └── version.h
├── scripts/
│   └── strpool.py
├── src/
│   ├── CMakeLists.txt
│   ├── accessor.c
│   ├── accessor.h
│   ├── anim/
│   │   ├── CMakeLists.txt
│   │   ├── bake.c
│   │   └── conflict.c
│   ├── array.c
│   ├── array.h
│   ├── asset.c
│   ├── assetkit.c
│   ├── base64.c
│   ├── base64.h
│   ├── bbox/
│   │   ├── CMakeLists.txt
│   │   ├── bbox.c
│   │   ├── bbox.h
│   │   ├── geom.c
│   │   ├── mesh.c
│   │   ├── mesh_prim.c
│   │   └── scene.c
│   ├── bitwise/
│   │   ├── CMakeLists.txt
│   │   └── bitwise.h
│   ├── camera/
│   │   ├── CMakeLists.txt
│   │   └── cam.c
│   ├── common.c
│   ├── common.h
│   ├── coord/
│   │   ├── CMakeLists.txt
│   │   ├── camera.c
│   │   ├── common.c
│   │   ├── common.h
│   │   ├── doc.c
│   │   ├── geom.c
│   │   ├── mesh.c
│   │   ├── node.c
│   │   ├── scene.c
│   │   ├── transform.c
│   │   ├── transforms.c
│   │   └── vector.c
│   ├── data.c
│   ├── data.h
│   ├── decoders/
│   │   └── gltf/
│   │       ├── draco/
│   │       │   └── assetkit_draco.cc
│   │       ├── ktx2/
│   │       │   └── assetkit_ktx2.cc
│   │       ├── meshopt/
│   │       │   └── assetkit_meshoptimizer.cc
│   │       └── spz/
│   │           └── assetkit_spz.cc
│   ├── default/
│   │   ├── CMakeLists.txt
│   │   ├── cam.c
│   │   ├── cam.h
│   │   ├── cmp.c
│   │   ├── coord.c
│   │   ├── id.c
│   │   ├── light.c
│   │   ├── light.h
│   │   ├── material.c
│   │   ├── material.h
│   │   ├── opt.c
│   │   ├── opt.h
│   │   ├── semantic.c
│   │   ├── semantic.h
│   │   ├── type.c
│   │   └── type.h
│   ├── endian.h
│   ├── find.c
│   ├── geom/
│   │   ├── CMakeLists.txt
│   │   └── mesh.c
│   ├── id.c
│   ├── id.h
│   ├── image/
│   │   ├── CMakeLists.txt
│   │   └── image.c
│   ├── instance/
│   │   ├── CMakeLists.txt
│   │   ├── inst.c
│   │   └── list.c
│   ├── io/
│   │   ├── 3mf/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── README.md
│   │   │   └── imp/
│   │   │       ├── 3mf.c
│   │   │       ├── 3mf.h
│   │   │       ├── CMakeLists.txt
│   │   │       └── common.h
│   │   ├── CMakeLists.txt
│   │   ├── common/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── postscript.c
│   │   │   ├── postscript.h
│   │   │   ├── util.c
│   │   │   └── util.h
│   │   ├── dae/
│   │   │   ├── 1.4/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── dae14.c
│   │   │   │   ├── dae14.h
│   │   │   │   ├── image.c
│   │   │   │   ├── image.h
│   │   │   │   ├── surface.c
│   │   │   │   └── surface.h
│   │   │   ├── CMakeLists.txt
│   │   │   ├── README.md
│   │   │   ├── brep/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── brep.c
│   │   │   │   ├── brep.h
│   │   │   │   ├── curve.c
│   │   │   │   ├── curve.h
│   │   │   │   ├── nurb.c
│   │   │   │   ├── nurb.h
│   │   │   │   ├── surface.c
│   │   │   │   ├── surface.h
│   │   │   │   ├── topology.c
│   │   │   │   └── topology.h
│   │   │   ├── bugfix/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── scenekit.c
│   │   │   │   ├── scenekit.h
│   │   │   │   ├── transp.c
│   │   │   │   ├── transp.h
│   │   │   │   └── url.h
│   │   │   ├── common.h
│   │   │   ├── core/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── anim.c
│   │   │   │   ├── anim.h
│   │   │   │   ├── asset.c
│   │   │   │   ├── asset.h
│   │   │   │   ├── cam.c
│   │   │   │   ├── cam.h
│   │   │   │   ├── color.c
│   │   │   │   ├── color.h
│   │   │   │   ├── ctlr.c
│   │   │   │   ├── ctlr.h
│   │   │   │   ├── enum.c
│   │   │   │   ├── enum.h
│   │   │   │   ├── geom.c
│   │   │   │   ├── geom.h
│   │   │   │   ├── light.c
│   │   │   │   ├── light.h
│   │   │   │   ├── line.c
│   │   │   │   ├── line.h
│   │   │   │   ├── mesh.c
│   │   │   │   ├── mesh.h
│   │   │   │   ├── morph.c
│   │   │   │   ├── morph.h
│   │   │   │   ├── node.c
│   │   │   │   ├── node.h
│   │   │   │   ├── param.c
│   │   │   │   ├── param.h
│   │   │   │   ├── poly.c
│   │   │   │   ├── poly.h
│   │   │   │   ├── scene.c
│   │   │   │   ├── scene.h
│   │   │   │   ├── skin.c
│   │   │   │   ├── skin.h
│   │   │   │   ├── source.c
│   │   │   │   ├── source.h
│   │   │   │   ├── spline.c
│   │   │   │   ├── spline.h
│   │   │   │   ├── techn.c
│   │   │   │   ├── techn.h
│   │   │   │   ├── triangle.c
│   │   │   │   ├── triangle.h
│   │   │   │   ├── value.c
│   │   │   │   ├── value.h
│   │   │   │   ├── vert.c
│   │   │   │   └── vert.h
│   │   │   ├── ctlr.c
│   │   │   ├── dae.c
│   │   │   ├── dae.h
│   │   │   ├── fixup/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── angle.c
│   │   │   │   ├── angle.h
│   │   │   │   ├── channel.c
│   │   │   │   ├── channel.h
│   │   │   │   ├── ctlr.c
│   │   │   │   ├── ctlr.h
│   │   │   │   ├── geom.c
│   │   │   │   ├── geom.h
│   │   │   │   ├── mesh.c
│   │   │   │   ├── mesh.h
│   │   │   │   ├── node.c
│   │   │   │   ├── node.h
│   │   │   │   ├── tex.c
│   │   │   │   └── tex.h
│   │   │   ├── fx/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── colortex.c
│   │   │   │   ├── colortex.h
│   │   │   │   ├── effect.c
│   │   │   │   ├── effect.h
│   │   │   │   ├── fltprm.c
│   │   │   │   ├── fltprm.h
│   │   │   │   ├── img.c
│   │   │   │   ├── img.h
│   │   │   │   ├── mat.c
│   │   │   │   ├── mat.h
│   │   │   │   ├── profile.c
│   │   │   │   ├── profile.h
│   │   │   │   ├── samp.c
│   │   │   │   ├── samp.h
│   │   │   │   ├── techn.c
│   │   │   │   └── techn.h
│   │   │   ├── postscript.c
│   │   │   ├── postscript.h
│   │   │   ├── strpool.c
│   │   │   ├── strpool.h
│   │   │   ├── strpool.json
│   │   │   └── strpool.py
│   │   ├── gltf/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── README.md
│   │   │   ├── common.h
│   │   │   ├── imp/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── common.h
│   │   │   │   ├── core/
│   │   │   │   │   ├── CMakeLists.txt
│   │   │   │   │   ├── accessor.c
│   │   │   │   │   ├── accessor.h
│   │   │   │   │   ├── anim.c
│   │   │   │   │   ├── anim.h
│   │   │   │   │   ├── asset.c
│   │   │   │   │   ├── asset.h
│   │   │   │   │   ├── buffer.c
│   │   │   │   │   ├── buffer.h
│   │   │   │   │   ├── camera.c
│   │   │   │   │   ├── camera.h
│   │   │   │   │   ├── enum.c
│   │   │   │   │   ├── enum.h
│   │   │   │   │   ├── ext.c
│   │   │   │   │   ├── ext.h
│   │   │   │   │   ├── image.c
│   │   │   │   │   ├── image.h
│   │   │   │   │   ├── material.c
│   │   │   │   │   ├── material.h
│   │   │   │   │   ├── mesh.c
│   │   │   │   │   ├── mesh.h
│   │   │   │   │   ├── node.c
│   │   │   │   │   ├── node.h
│   │   │   │   │   ├── profile.c
│   │   │   │   │   ├── profile.h
│   │   │   │   │   ├── sampler.c
│   │   │   │   │   ├── sampler.h
│   │   │   │   │   ├── scene.c
│   │   │   │   │   ├── scene.h
│   │   │   │   │   ├── skin.c
│   │   │   │   │   ├── skin.h
│   │   │   │   │   ├── texture.c
│   │   │   │   │   └── texture.h
│   │   │   │   ├── ext/
│   │   │   │   │   ├── CMakeLists.txt
│   │   │   │   │   ├── compression.c
│   │   │   │   │   ├── decoder.c
│   │   │   │   │   ├── decoder.h
│   │   │   │   │   ├── gsplat.c
│   │   │   │   │   ├── instancing.c
│   │   │   │   │   ├── instancing.h
│   │   │   │   │   ├── lights.c
│   │   │   │   │   ├── lights.h
│   │   │   │   │   ├── variants.c
│   │   │   │   │   └── variants.h
│   │   │   │   ├── extra.c
│   │   │   │   ├── extra.h
│   │   │   │   ├── gltf.c
│   │   │   │   ├── gltf.h
│   │   │   │   ├── mesh_fixup.c
│   │   │   │   ├── mesh_fixup.h
│   │   │   │   ├── postscript.c
│   │   │   │   └── postscript.h
│   │   │   ├── strpool.c
│   │   │   ├── strpool.h
│   │   │   ├── strpool.json
│   │   │   └── strpool.py
│   │   ├── obj/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── README.md
│   │   │   ├── common.h
│   │   │   ├── group.c
│   │   │   ├── group.h
│   │   │   ├── mtl.c
│   │   │   ├── mtl.h
│   │   │   ├── obj.c
│   │   │   ├── obj.h
│   │   │   ├── util.c
│   │   │   └── util.h
│   │   ├── ply/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── README.md
│   │   │   ├── ascii.c
│   │   │   ├── bin.c
│   │   │   ├── common.h
│   │   │   ├── ply.c
│   │   │   ├── ply.h
│   │   │   └── util.h
│   │   └── stl/
│   │       ├── CMakeLists.txt
│   │       ├── README.md
│   │       ├── common.h
│   │       ├── stl.c
│   │       └── stl.h
│   ├── json.h
│   ├── lib/
│   │   ├── CMakeLists.txt
│   │   ├── geom.c
│   │   └── lib.c
│   ├── light/
│   │   ├── CMakeLists.txt
│   │   └── light.c
│   ├── main.c
│   ├── map.c
│   ├── mat/
│   │   ├── CMakeLists.txt
│   │   └── mat.c
│   ├── mem/
│   │   ├── CMakeLists.txt
│   │   ├── common.h
│   │   ├── ext.c
│   │   ├── intr.c
│   │   ├── lt.c
│   │   ├── lt.h
│   │   ├── mem.c
│   │   ├── mmap.c
│   │   ├── rb.c
│   │   └── rb.h
│   ├── mesh/
│   │   ├── CMakeLists.txt
│   │   ├── duplicator.c
│   │   ├── edit.c
│   │   ├── edit_buff.c
│   │   ├── edit_buff_fixup.c
│   │   ├── edit_common.h
│   │   ├── edit_index.c
│   │   ├── index.c
│   │   ├── index.h
│   │   ├── input.c
│   │   ├── isolate.c
│   │   ├── material.c
│   │   ├── normal.c
│   │   └── triangulate.c
│   ├── miniz/
│   │   ├── CMakeLists.txt
│   │   ├── LICENSE
│   │   ├── miniz.c
│   │   └── miniz.h
│   ├── morph/
│   │   ├── CMakeLists.txt
│   │   └── intr.c
│   ├── node/
│   │   ├── CMakeLists.txt
│   │   └── node.c
│   ├── platform/
│   │   ├── CMakeLists.txt
│   │   ├── dylib.c
│   │   └── dylib.h
│   ├── profile.c
│   ├── profile.h
│   ├── resc/
│   │   ├── CMakeLists.txt
│   │   ├── path.c
│   │   ├── resource.c
│   │   ├── resource.h
│   │   └── url.c
│   ├── sid.c
│   ├── sid.h
│   ├── sid_constr.c
│   ├── simd/
│   │   ├── arm.h
│   │   ├── base64.h
│   │   ├── intrin.h
│   │   ├── wasm.h
│   │   └── x86.h
│   ├── skin/
│   │   ├── CMakeLists.txt
│   │   ├── fix.c
│   │   ├── fix.h
│   │   └── skin.c
│   ├── string.c
│   ├── strpool.c
│   ├── strpool.h
│   ├── strpool.json
│   ├── strpool.py
│   ├── topo/
│   │   ├── CMakeLists.txt
│   │   ├── topo.c
│   │   └── topo.h
│   ├── transform/
│   │   ├── CMakeLists.txt
│   │   ├── dup.c
│   │   ├── trans.c
│   │   └── traverse.c
│   ├── trash.c
│   ├── trash.h
│   ├── tree.c
│   ├── tree.h
│   ├── type.c
│   ├── type.h
│   ├── utils.c
│   ├── utils.h
│   ├── win32/
│   │   ├── CMakeLists.txt
│   │   ├── dllmain.c
│   │   └── strptime.c
│   ├── xml.c
│   └── xml.h
└── test/
    ├── include/
    │   └── common.h
    ├── runner.c
    ├── src/
    │   ├── collada/
    │   │   └── test_dae_load.c
    │   ├── test_common.h
    │   └── test_memory.c
    └── tests.h
Download .txt
SYMBOL INDEX (1405 symbols across 234 files)

FILE: include/ak/animation.h
  type AkSamplerBehavior (line 32) | typedef enum AkSamplerBehavior {
  type AkTargetPropertyType (line 41) | typedef enum AkTargetPropertyType {
  type AkInterpolationType (line 62) | typedef enum AkInterpolationType {
  type AkAnimSampler (line 74) | typedef struct AkAnimSampler {
  type AkResolvedTarget (line 89) | typedef struct AkResolvedTarget {
  type AkChannel (line 95) | typedef struct AkChannel {
  type AkAnimation (line 103) | typedef struct AkAnimation {
  type AkBakedAnimation (line 124) | typedef struct AkBakedAnimation {
  function AK_INLINE (line 130) | AK_INLINE
  function AK_INLINE (line 141) | AK_INLINE
  function AK_INLINE (line 149) | AK_INLINE
  type AkDoc (line 248) | struct AkDoc
  type AkDoc (line 265) | struct AkDoc
  type AkNode (line 289) | struct AkNode
  type AkDoc (line 316) | struct AkDoc
  type AkNode (line 317) | struct AkNode

FILE: include/ak/assetkit.h
  type FList (line 29) | struct FList
  type FListItem (line 30) | struct FListItem
  type AkBuffer (line 31) | struct AkBuffer
  type AkLibrary (line 32) | struct AkLibrary
  type AkFileType (line 42) | typedef enum AkFileType {
  type AkAltitudeMode (line 52) | typedef enum AkAltitudeMode {
  type AkFace (line 57) | typedef enum AkFace {
  type AkChannelFormat (line 66) | typedef enum AkChannelFormat {
  type AkRangeFormat (line 77) | typedef enum AkRangeFormat {
  type AkPrecisionFormat (line 85) | typedef enum AkPrecisionFormat {
  type AkInputSemantic (line 93) | typedef enum AkInputSemantic {
  type AkCurveElementType (line 120) | typedef enum AkCurveElementType {
  type AkSurfaceElementType (line 129) | typedef enum AkSurfaceElementType {
  type AkInstanceType (line 139) | typedef enum AkInstanceType {
  type AkValue (line 149) | typedef struct AkValue {
  type AkTreeNodeAttr (line 154) | typedef struct AkTreeNodeAttr {
  type AkTreeNode (line 161) | typedef struct AkTreeNode {
  type AkTree (line 176) | typedef struct AkTreeNode AkTree;
  type AkUnit (line 197) | typedef struct AkUnit {
  type AkColorRGBA (line 202) | typedef struct AkColorRGBA {
  type AkColor (line 209) | typedef union AkColor {
  function AK_INLINE (line 214) | AK_INLINE
  function AK_INLINE (line 224) | AK_INLINE
  function AK_INLINE (line 234) | AK_INLINE
  function AK_INLINE (line 244) | AK_INLINE
  function AK_INLINE (line 252) | AK_INLINE
  type AkContributor (line 260) | typedef struct AkContributor {
  type AkAltitude (line 272) | typedef struct AkAltitude {
  type AkGeoLoc (line 277) | typedef struct AkGeoLoc {
  type AkCoverage (line 283) | typedef struct AkCoverage {
  type AkAssetInf (line 287) | typedef struct AkAssetInf {
  type AkDocInf (line 301) | typedef struct AkDocInf {
  type AkTechnique (line 310) | typedef struct AkTechnique {
  type AkParam (line 330) | typedef struct AkParam {
  type AkHexData (line 336) | typedef struct AkHexData {
  type AkInitFrom (line 342) | typedef struct AkInitFrom {
  type AkNode (line 356) | struct AkNode
  type AkInstanceBase (line 357) | typedef struct AkInstanceBase {
  type AkEvaluateTarget (line 369) | typedef struct AkEvaluateTarget {
  type AkNewParam (line 380) | struct AkNewParam
  type AkEffect (line 381) | typedef struct AkEffect {
  type AkInstanceEffect (line 393) | typedef struct AkInstanceEffect {
  type AkMaterial (line 398) | typedef struct AkMaterial {
  type AkAccessor (line 406) | struct AkAccessor
  type AkInput (line 408) | typedef struct AkInput {
  type AkInstanceMaterial (line 422) | struct AkInstanceMaterial
  type AkBindMaterial (line 423) | typedef struct AkBindMaterial {
  type AkInstanceGeometry (line 430) | typedef struct AkInstanceGeometry {
  type AkInstanceNode (line 438) | typedef struct AkInstanceNode {
  type AkMatrix (line 446) | struct AkMatrix
  type AkBoundingBox (line 447) | struct AkBoundingBox
  type AkTransform (line 448) | struct AkTransform
  type AkBind (line 450) | typedef struct AkBind {
  type AkBindVertexInput (line 456) | typedef struct AkBindVertexInput {
  type AkInstanceMaterial (line 463) | typedef struct AkInstanceMaterial {
  type AkRender (line 471) | typedef struct AkRender {
  type AkEvaluateScene (line 483) | typedef struct AkEvaluateScene {
  type AkInstanceList (line 495) | struct AkInstanceList
  type AkVisualScene (line 497) | typedef struct AkVisualScene {
  type AkScene (line 510) | typedef struct AkScene {
  type AkMorph (line 520) | struct AkMorph
  type AkSkin (line 521) | struct AkSkin
  type AkLibraries (line 523) | typedef struct AkLibraries {
  type AkDoc (line 546) | typedef struct AkDoc {

FILE: include/ak/bbox.h
  type AkMesh (line 23) | struct AkMesh
  type AkMeshPrimitive (line 24) | struct AkMeshPrimitive
  type AkGeometry (line 25) | struct AkGeometry
  type AkScene (line 26) | struct AkScene
  type AkMeshPrimitive (line 27) | struct AkMeshPrimitive
  type AkBoundingBox (line 29) | typedef struct AkBoundingBox {
  type AkVisualScene (line 42) | struct AkVisualScene
  type AkGeometry (line 51) | struct AkGeometry
  type AkMesh (line 60) | struct AkMesh
  type AkMeshPrimitive (line 69) | struct AkMeshPrimitive

FILE: include/ak/cam.h
  type AkLibraryItemBase (line 25) | struct AkLibraryItemBase
  type AkProjectionType (line 27) | typedef enum AkProjectionType {
  type AkProjection (line 33) | typedef struct AkProjection {
  type AkPerspective (line 38) | typedef struct AkPerspective {
  type AkOrthographic (line 47) | typedef struct AkOrthographic {
  type AkOptics (line 56) | typedef struct AkOptics {
  type AkImager (line 61) | typedef struct AkImager {
  type AkCamera (line 66) | typedef struct AkCamera {

FILE: include/ak/common.h
  type AkEnum (line 75) | typedef int32_t AkEnum;
  type AkResult (line 77) | typedef enum AkResult {
  type AkOneWayIterBase (line 89) | typedef struct AkOneWayIterBase {
  type AkTwoWayIterBase (line 93) | typedef struct AkTwoWayIterBase {

FILE: include/ak/context.h
  type AkContext (line 27) | typedef struct AkContext {
  function AK_INLINE (line 34) | AK_INLINE AkContext AkContextZeroed(void) { return (AkContext){0}; }

FILE: include/ak/controller.h
  type AkNode (line 26) | struct AkNode
  type FListItem (line 27) | struct FListItem
  type AkMorphMethod (line 29) | typedef enum AkMorphMethod {
  type AkBoneWeight (line 43) | typedef struct AkBoneWeight {
  type AkBoneWeights (line 48) | typedef struct AkBoneWeights {
  type AkSkin (line 81) | typedef struct AkSkin {
  type AkMorphableType (line 94) | typedef enum AkMorphableType {
  type AkMorphInterleaveLayout (line 111) | typedef enum AkMorphInterleaveLayout {
  type AkMorphable (line 124) | typedef struct AkMorphable {
  type AkMorphPreset (line 130) | typedef struct AkMorphPreset {
  type AkMorphTarget (line 135) | typedef struct AkMorphTarget {
  type AkMorphInspectInput (line 141) | typedef struct AkMorphInspectInput {
  type AkMorphInspectMorphable (line 151) | typedef struct AkMorphInspectMorphable {
  type AkMorphInspectTargetView (line 166) | typedef struct AkMorphInspectTargetView {
  type AkMorphInspectView (line 196) | typedef struct AkMorphInspectView {
  type AkMorph (line 208) | typedef struct AkMorph {
  type AkInstanceMorph (line 242) | typedef struct AkInstanceMorph {
  type AkInstanceSkin (line 247) | typedef struct AkInstanceSkin {
  function AK_INLINE (line 447) | AK_INLINE

FILE: include/ak/coord-util.h
  type AkNode (line 25) | struct AkNode
  type AkVisualScene (line 26) | struct AkVisualScene
  type AkNode (line 45) | struct AkNode
  type AkVisualScene (line 49) | struct AkVisualScene

FILE: include/ak/coord.h
  type AkCoordCvtType (line 25) | typedef enum AkCoordCvtType {
  type AkAxisAccessor (line 33) | typedef struct AkAxisAccessor {
  type AkAxis (line 43) | typedef enum AkAxis {
  type AkAxisRotDirection (line 53) | typedef enum AkAxisRotDirection {
  type AkAxisOrientation (line 58) | typedef struct AkAxisOrientation {
  type AkCoordSys (line 64) | typedef struct AkCoordSys {
  type AkTransform (line 85) | struct AkTransform
  function AK_INLINE (line 87) | AK_INLINE
  function AK_INLINE (line 95) | AK_INLINE
  function AK_INLINE (line 103) | AK_INLINE
  type AkTransform (line 140) | struct AkTransform
  type AkDoc (line 150) | struct AkDoc
  type AkNode (line 151) | struct AkNode
  type AkDoc (line 155) | struct AkDoc
  type AkDoc (line 161) | struct AkDoc
  type AkNode (line 162) | struct AkNode

FILE: include/ak/core-types.h
  type AkBool (line 22) | typedef bool                  AkBool;
  type AkInt16 (line 23) | typedef int16_t               AkInt16;
  type AkUInt16 (line 24) | typedef uint16_t              AkUInt16;
  type AkInt (line 25) | typedef int32_t               AkInt;
  type AkUInt (line 26) | typedef uint32_t              AkUInt;
  type AkInt64 (line 27) | typedef int64_t               AkInt64;
  type AkUInt64 (line 28) | typedef uint64_t              AkUInt64;
  type AkFloat (line 29) | typedef float                 AkFloat;
  type AkDouble (line 30) | typedef double                AkDouble;
  type AkBool (line 32) | typedef AkBool                AkBool4[4];
  type AkInt (line 33) | typedef AkInt                 AkInt2[2];
  type AkInt (line 34) | typedef AkInt                 AkInt4[4];
  type AkFloat (line 35) | typedef AkFloat               AkFloat2[2];
  type AkDouble (line 36) | typedef AkDouble              AkDouble2[2];
  type AkFloat (line 38) | typedef              AkFloat  AkFloat3[3];
  type AkDouble (line 39) | typedef              AkDouble AkDouble3[3];
  type TYPE (line 48) | struct TYPE

FILE: include/ak/geom.h
  type RBTree (line 28) | struct RBTree
  type AkGeometry (line 29) | struct AkGeometry
  type AkMesh (line 30) | struct AkMesh
  type FListItem (line 31) | struct FListItem
  type AkMaterial (line 32) | struct AkMaterial
  type AkGeometryType (line 34) | typedef enum AkGeometryType {
  type AkGeometryEditFlags (line 40) | typedef enum AkGeometryEditFlags {
  type AkMeshPrimitiveType (line 46) | typedef enum AkMeshPrimitiveType {
  type AkTriangleMode (line 53) | typedef enum AkTriangleMode {
  type AkLineMode (line 59) | typedef enum AkLineMode {
  type AkVertices (line 65) | typedef struct AkVertices {
  type AkJointDesc (line 74) | typedef struct AkJointDesc {
  type AkMeshPrimitive (line 80) | typedef struct AkMeshPrimitive {
  type AkLines (line 112) | typedef struct AkLines {
  type AkPolygon (line 117) | typedef struct AkPolygon {
  type AkTriangles (line 124) | typedef struct AkTriangles {
  type AkMeshEditHelper (line 129) | typedef struct AkMeshEditHelper {
  type AkMesh (line 139) | typedef struct AkMesh {
  type AkSpline (line 153) | typedef struct AkSpline {
  type AkLine (line 161) | typedef struct AkLine {
  type AkCircle (line 167) | typedef struct AkCircle {
  type AkEllipse (line 172) | typedef struct AkEllipse {
  type AkParabola (line 177) | typedef struct AkParabola {
  type AkHyperbola (line 182) | typedef struct AkHyperbola {
  type AkNurbs (line 187) | typedef struct AkNurbs {
  type AkCurve (line 195) | typedef struct AkCurve {
  type AkCurves (line 202) | typedef struct AkCurves {
  type AkCone (line 207) | typedef struct AkCone {
  type AkPlane (line 213) | typedef struct AkPlane {
  type AkCylinder (line 218) | typedef struct AkCylinder {
  type AkNurbsSurface (line 223) | typedef struct AkNurbsSurface {
  type AkSphere (line 233) | typedef struct AkSphere {
  type AkTorus (line 238) | typedef struct AkTorus {
  type AkSweptSurface (line 243) | typedef struct AkSweptSurface {
  type AkSurface (line 251) | typedef struct AkSurface {
  type AkSurfaces (line 261) | typedef struct AkSurfaces {
  type AkEdges (line 266) | typedef struct AkEdges {
  type AkWires (line 276) | typedef struct AkWires {
  type AkFaces (line 287) | typedef struct AkFaces {
  type AkPCurves (line 298) | typedef struct AkPCurves {
  type AkShells (line 309) | typedef struct AkShells {
  type AkSolids (line 320) | typedef struct AkSolids {
  type AkBoundryRep (line 332) | typedef struct AkBoundryRep {
  type AkGeometry (line 348) | typedef struct AkGeometry {
  type AkMeshIsolateType (line 358) | typedef enum AkMeshIsolateType {

FILE: include/ak/gsplat.h
  type AkGaussianSplatKernel (line 34) | typedef enum AkGaussianSplatKernel {
  type AkGaussianSplatColorSpace (line 39) | typedef enum AkGaussianSplatColorSpace {
  type AkGaussianSplatProjection (line 45) | typedef enum AkGaussianSplatProjection {
  type AkGaussianSplatSortingMethod (line 50) | typedef enum AkGaussianSplatSortingMethod {
  type AkGaussianSplat (line 55) | typedef struct AkGaussianSplat {
  type AkHeap (line 79) | struct AkHeap
  type AkGLTFState (line 80) | struct AkGLTFState
  type AkMeshPrimitive (line 81) | struct AkMeshPrimitive
  type json_t (line 82) | struct json_t
  type AkHeap (line 88) | struct AkHeap
  type AkMeshPrimitive (line 89) | struct AkMeshPrimitive
  type AkGLTFState (line 94) | struct AkGLTFState
  type AkMeshPrimitive (line 95) | struct AkMeshPrimitive
  type json_t (line 96) | struct json_t
  type json_t (line 97) | struct json_t
  type AkGaussianSplatDecoder (line 99) | typedef struct AkGaussianSplatDecoder {

FILE: include/ak/image.h
  type AkInitFrom (line 22) | struct AkInitFrom
  type AkImageType (line 24) | typedef enum AkImageType {
  type AkImageData (line 31) | typedef struct AkImageData {
  type AkSizeExact (line 38) | typedef struct AkSizeExact {
  type AkSizeRatio (line 43) | typedef struct AkSizeRatio {
  type AkMips (line 48) | typedef struct AkMips {
  type AkImageFormat (line 53) | typedef struct AkImageFormat {
  type AkImageSize (line 61) | typedef struct AkImageSize {
  type AkImageBase (line 67) | typedef struct AkImageBase {
  type AkImage2d (line 74) | typedef struct AkImage2d {
  type AkImage3d (line 82) | typedef struct AkImage3d {
  type AkImageCube (line 88) | typedef struct AkImageCube {
  type AkImage (line 94) | typedef struct AkImage {
  type AkImageData (line 115) | typedef AkImageData* (*AkImageLoadFromFileFn)(AkHeap     * __restrict heap,
  type AkImageData (line 120) | typedef AkImageData* (*AkImageLoadFromMemoryFn)(AkHeap   * __restrict heap,

FILE: include/ak/instance.h
  type AkInstanceListItem (line 26) | typedef struct AkInstanceListItem {
  type AkInstanceList (line 33) | typedef struct AkInstanceList {

FILE: include/ak/library.h
  type AkLibrary (line 27) | typedef struct AkLibrary {

FILE: include/ak/light.h
  type AkLightType (line 25) | typedef enum AkLightType {
  type AkLightBase (line 33) | typedef struct AkLightBase {
  type AkLightBase (line 42) | typedef AkLightBase AkAmbientLight;
  type AkLightBase (line 43) | typedef AkLightBase AkDirectionalLight;
  type AkPointLight (line 45) | typedef struct AkPointLight {
  type AkSpotLight (line 52) | typedef struct AkSpotLight {
  type AkLight (line 63) | typedef struct AkLight {

FILE: include/ak/map.h
  type AkMapItem (line 31) | typedef struct AkMapItem {
  type AkMap (line 38) | typedef struct AkMap {
  type AkHeapSrchCmpFn (line 43) | typedef AkHeapSrchCmpFn AkMapCmp;

FILE: include/ak/material.h
  type AkBindMaterial (line 26) | struct AkBindMaterial
  type AkMeshPrimitive (line 27) | struct AkMeshPrimitive
  type AkEffect (line 28) | struct AkEffect
  type AkInstanceMaterial (line 29) | struct AkInstanceMaterial
  type AkMaterial (line 30) | struct AkMaterial
  type AkDoc (line 31) | struct AkDoc
  type AkTreeNode (line 32) | struct AkTreeNode
  type AkMaterialVariant (line 37) | typedef struct AkMaterialVariant {
  type AkMaterialVariantMapping (line 46) | typedef struct AkMaterialVariantMapping {
  type AkDoc (line 54) | struct AkDoc
  type AkOpaque (line 57) | typedef enum AkOpaque {
  type AkMaterialType (line 68) | typedef enum AkMaterialType {
  type AkColorDesc (line 87) | typedef struct AkColorDesc {
  type AkTransparent (line 93) | typedef struct AkTransparent {
  type AkReflective (line 100) | typedef struct AkReflective {
  type AkOcclusion (line 105) | typedef struct AkOcclusion {
  type AkNormalMap (line 111) | typedef struct AkNormalMap {
  type AkMaterialMetallicProp (line 116) | typedef struct AkMaterialMetallicProp {
  type AkMaterialSpecularProp (line 122) | typedef struct AkMaterialSpecularProp {
  type AkMaterialClearcoat (line 132) | typedef struct AkMaterialClearcoat {
  type AkMaterialEmissionProp (line 144) | typedef struct AkMaterialEmissionProp {
  type AkMaterialTransmissionProp (line 150) | typedef struct AkMaterialTransmissionProp {
  type AkMaterialSheen (line 156) | typedef struct AkMaterialSheen {
  type AkMaterialIridescence (line 163) | typedef struct AkMaterialIridescence {
  type AkMaterialVolume (line 174) | typedef struct AkMaterialVolume {
  type AkMaterialAnisotropy (line 182) | typedef struct AkMaterialAnisotropy {
  type AkMaterialDispersion (line 188) | typedef struct AkMaterialDispersion {
  type AkMaterialDiffuseTransmission (line 192) | typedef struct AkMaterialDiffuseTransmission {
  type AkTechniqueFxCommon (line 199) | typedef struct AkTechniqueFxCommon {
  type AkBindMaterial (line 250) | struct AkBindMaterial
  type AkMeshPrimitive (line 251) | struct AkMeshPrimitive
  type AkInstanceMaterial (line 252) | struct AkInstanceMaterial

FILE: include/ak/memory.h
  type AkObject (line 29) | typedef struct AkObject {
  type AkHeapAllocator (line 51) | typedef struct AkHeapAllocator {
  type AkHeapSrchCtx (line 61) | typedef struct AkHeapSrchCtx AkHeapSrchCtx;
  type AkHeapNode (line 62) | typedef struct AkHeapNode    AkHeapNode;
  type AkHeap (line 63) | typedef struct AkHeap        AkHeap;
  type AkURL (line 64) | struct AkURL
  type AkHeapFlags (line 71) | typedef enum AkHeapFlags {
  type AkHeapNodeFlags (line 77) | typedef enum AkHeapNodeFlags {
  type AkURL (line 243) | struct AkURL

FILE: include/ak/node.h
  type AkInstanceMorph (line 25) | struct AkInstanceMorph
  type AkAccessor (line 26) | struct AkAccessor
  type AkNodeFlags (line 28) | typedef enum AkNodeFlags {
  type AkInstanceAttribs (line 35) | typedef struct AkInstanceAttribs {
  type AkNodeType (line 42) | typedef enum AkNodeType {
  type AkListIter (line 48) | typedef struct AkListIter {
  type AkTreeWithParentIter (line 53) | typedef struct AkTreeWithParentIter {
  type AkTreeIter (line 60) | typedef struct AkTreeIter {
  type AkNode (line 66) | typedef struct AkNode {
  type AkVisualScene (line 213) | struct AkVisualScene
  type AkVisualScene (line 227) | struct AkVisualScene

FILE: include/ak/options.h
  type AkOption (line 26) | typedef enum AkOption {

FILE: include/ak/path.h
  type AkHeap (line 26) | struct AkHeap
  type AkDoc (line 27) | struct AkDoc
  type AkHeap (line 50) | struct AkHeap
  type AkDoc (line 56) | struct AkDoc

FILE: include/ak/profile.h
  type AkEffect (line 26) | struct AkEffect
  type AkProfileType (line 28) | typedef enum AkProfileType {
  type AkTechniqueFx (line 34) | typedef struct AkTechniqueFx {
  type AkTechniqueOverride (line 42) | typedef struct AkTechniqueOverride {
  type AkTechniqueHint (line 47) | typedef struct AkTechniqueHint {
  type AkNewParam (line 55) | struct AkNewParam
  type AkProfile (line 57) | typedef struct AkProfile {
  type AkProfile (line 66) | typedef AkProfile AkProfileCommon;
  type AkProfile (line 67) | typedef AkProfile AkProfileGLTF;
  type AkEffect (line 70) | struct AkEffect
  type AkEffect (line 74) | struct AkEffect
  type AkEffect (line 91) | struct AkEffect
  type AkEffect (line 95) | struct AkEffect

FILE: include/ak/source.h
  type AkTechnique (line 36) | struct AkTechnique
  type AkBuffer (line 37) | struct AkBuffer
  type AkComponentSize (line 42) | typedef enum AkComponentSize {
  type AkDataParam (line 53) | typedef struct AkDataParam {
  type AkBuffer (line 62) | typedef struct AkBuffer {
  type AkAccessor (line 68) | typedef struct AkAccessor {
  type AkSource (line 97) | typedef struct AkSource {
  type AkDuplicatorRange (line 108) | typedef struct AkDuplicatorRange {
  type AkDuplicator (line 116) | typedef struct AkDuplicator {
  type AkSourceBuffState (line 124) | typedef struct AkSourceBuffState {
  type AkSourceEditHelper (line 132) | typedef struct AkSourceEditHelper {

FILE: include/ak/texture.h
  type AkWrapMode (line 23) | typedef enum AkWrapMode {
  type AkMinFilter (line 31) | typedef enum AkMinFilter {
  type AkMagFilter (line 42) | typedef enum AkMagFilter {
  type AkMipFilter (line 47) | typedef enum AkMipFilter {
  type AkTextureColorSpace (line 53) | typedef enum AkTextureColorSpace {
  type AkTextureChannels (line 59) | typedef enum AkTextureChannels {
  type AkSampler (line 74) | typedef struct AkSampler {
  type AkTexture (line 96) | typedef struct AkTexture {
  type AkTextureTransform (line 104) | typedef struct AkTextureTransform {
  type AkTextureRef (line 112) | typedef struct AkTextureRef {
  function AK_INLINE (line 130) | AK_INLINE
  function AK_INLINE (line 143) | AK_INLINE

FILE: include/ak/transform.h
  type AkTransform (line 25) | typedef struct AkTransform {
  type AkLookAt (line 30) | typedef struct AkLookAt {
  type AkMatrix (line 36) | typedef struct AkMatrix {
  type AkRotate (line 42) | typedef struct AkRotate {
  type AkScale (line 47) | typedef struct AkScale {
  type AkSkew (line 52) | typedef struct AkSkew {
  type AkTranslate (line 59) | typedef struct AkTranslate {
  type AkQuaternion (line 64) | typedef struct AkQuaternion {

FILE: include/ak/type.h
  type AkTypeId (line 23) | typedef enum AkTypeId {
  type AkTypeDesc (line 102) | typedef struct AkTypeDesc {

FILE: include/ak/url.h
  type AkURL (line 25) | typedef struct AkURL {

FILE: src/accessor.c
  function AkAccessor (line 22) | AkAccessor*
  function AK_INLINE (line 40) | AK_INLINE
  function AK_EXPORT (line 83) | AK_EXPORT
  function AK_EXPORT (line 128) | AK_EXPORT

FILE: src/accessor.h
  function AK_INLINE (line 25) | AK_INLINE

FILE: src/anim/bake.c
  type ChannelBind (line 74) | typedef struct ChannelBind {
  function bake_floatcmp (line 90) | static int
  function bake_payloadFloatCount (line 98) | static size_t
  function bake_sampleScalar (line 117) | static float
  function bake_collectChannels (line 145) | static void
  function AK_EXPORT (line 217) | AK_EXPORT
  function AK_EXPORT (line 238) | AK_EXPORT

FILE: src/anim/conflict.c
  function AK_EXPORT (line 51) | AK_EXPORT
  function AK_EXPORT (line 80) | AK_EXPORT
  function AK_EXPORT (line 117) | AK_EXPORT
  function AK_EXPORT (line 135) | AK_EXPORT

FILE: src/array.c
  function ak_strarray_is_sep (line 20) | static bool
  function ak_strarray_count (line 25) | static size_t
  function AK_HIDE (line 49) | AK_HIDE
  function AK_HIDE (line 118) | AK_HIDE

FILE: src/asset.c
  function AkTree (line 23) | static
  function AK_EXPORT (line 60) | AK_EXPORT
  function AK_EXPORT (line 79) | AK_EXPORT
  function AK_EXPORT (line 100) | AK_EXPORT
  function AK_EXPORT (line 124) | AK_EXPORT
  function AK_EXPORT (line 131) | AK_EXPORT

FILE: src/assetkit.c
  type floader_t (line 31) | typedef struct {
  function AK_EXPORT (line 36) | AK_EXPORT

FILE: src/base64.c
  function AK_HIDE (line 258) | AK_HIDE

FILE: src/bbox/bbox.c
  function ak_bbox_pick (line 20) | void
  function ak_bbox_pick_pbox (line 26) | void
  function ak_bbox_pick_pbox2 (line 33) | void
  function ak_bbox_center (line 44) | void
  function ak_bbox_radius (line 50) | float

FILE: src/bbox/bbox.h
  function AK_INLINE (line 23) | AK_INLINE

FILE: src/bbox/geom.c
  function ak_bbox_geom (line 19) | void

FILE: src/bbox/mesh.c
  function ak_bbox_mesh (line 19) | void

FILE: src/bbox/mesh_prim.c
  function ak_bbox_mesh_prim (line 21) | void

FILE: src/bbox/scene.c
  function ak_bbox_node (line 28) | static
  function ak_bbox_scene (line 106) | void

FILE: src/bitwise/bitwise.h
  function AK_INLINE (line 23) | AK_INLINE
  function AK_INLINE (line 38) | AK_INLINE
  function AK_INLINE (line 48) | AK_INLINE

FILE: src/camera/cam.c
  function AK_EXPORT (line 21) | AK_EXPORT
  function AK_EXPORT (line 111) | AK_EXPORT
  function AK_EXPORT (line 143) | AK_EXPORT
  function AK_EXPORT (line 176) | AK_EXPORT

FILE: src/common.c
  function AK_HIDE (line 21) | AK_HIDE int
  function AK_HIDE (line 27) | AK_HIDE int
  function AK_HIDE (line 32) | AK_HIDE int

FILE: src/common.h
  type ak_enumpair (line 85) | typedef struct ak_enumpair {
  type dae_enum (line 90) | typedef struct {

FILE: src/coord/camera.c
  function AK_HIDE (line 30) | AK_HIDE
  function AK_EXPORT (line 96) | AK_EXPORT
  function AK_EXPORT (line 125) | AK_EXPORT

FILE: src/coord/common.c
  function ak_coordAxisOri (line 22) | void
  function ak_coordAxisOriAbs (line 42) | void

FILE: src/coord/common.h
  function AK_INLINE (line 54) | AK_INLINE
  function AK_INLINE (line 80) | AK_INLINE

FILE: src/coord/doc.c
  function AK_EXPORT (line 19) | AK_EXPORT

FILE: src/coord/geom.c
  function AK_EXPORT (line 19) | AK_EXPORT

FILE: src/coord/mesh.c
  function AK_EXPORT (line 21) | AK_EXPORT

FILE: src/coord/node.c
  function AK_HIDE (line 29) | AK_HIDE
  function AK_EXPORT (line 57) | AK_EXPORT

FILE: src/coord/scene.c
  function AK_EXPORT (line 22) | AK_EXPORT

FILE: src/coord/transform.c
  function AK_EXPORT (line 22) | AK_EXPORT
  function AK_EXPORT (line 77) | AK_EXPORT

FILE: src/coord/transforms.c
  function AK_EXPORT (line 21) | AK_EXPORT

FILE: src/coord/vector.c
  function AK_EXPORT (line 20) | AK_EXPORT
  function AK_EXPORT (line 32) | AK_EXPORT
  function AK_EXPORT (line 48) | AK_EXPORT

FILE: src/data.c
  function AkDataContext (line 20) | AkDataContext*
  function ak_data_append (line 39) | int
  function ak_data_append_unq (line 77) | int
  function ak_data_walk (line 88) | void
  function ak_data_exists (line 111) | int
  function ak_data_join (line 147) | size_t

FILE: src/data.h
  type AkDataContext (line 22) | struct AkDataContext
  type AkDataContext (line 24) | struct AkDataContext
  type AkDataChunk (line 28) | typedef struct AkDataChunk {
  type AkDataContext (line 34) | typedef struct AkDataContext {

FILE: src/decoders/gltf/draco/assetkit_draco.cc
  type AkHeap (line 31) | struct AkHeap
  type AkMeshPrimitive (line 32) | struct AkMeshPrimitive
  type FListItem (line 33) | struct FListItem
  type RBTree (line 34) | struct RBTree
  type AkTypeId (line 36) | enum AkTypeId {
  type json_type (line 47) | enum json_type {
  type json_t (line 53) | struct json_t {
    type json_t (line 54) | struct json_t
    type json_t (line 55) | struct json_t
  type AkBuffer (line 63) | struct AkBuffer {
  type AkAccessor (line 69) | struct AkAccessor {
  type AkLibrary (line 89) | struct AkLibrary {
    type AkLibrary (line 90) | struct AkLibrary
  type AkLibraries (line 97) | struct AkLibraries {
  type AkDoc (line 117) | struct AkDoc {
  type AkBufferView (line 128) | struct AkBufferView {
  type AkGLTFState (line 136) | struct AkGLTFState {
  function ak_draco_json_int32 (line 166) | static
  function json_t (line 183) | static
    type json_t (line 54) | struct json_t
    type json_t (line 55) | struct json_t
  function json_t (line 206) | static
    type json_t (line 54) | struct json_t
    type json_t (line 55) | struct json_t
  function ak_draco_component_size (line 225) | static
  function ak_draco_store_value (line 246) | static
  function ak_draco_fill_attribute (line 283) | static
  function ak_draco_write_index (line 334) | static
  function ak_draco_fill_indices (line 358) | static
  function ak_draco_fill_primitive (line 419) | static
  function AK_DRACO_EXPORT (line 476) | AK_DRACO_EXPORT

FILE: src/decoders/gltf/ktx2/assetkit_ktx2.cc
  type AkKTX2MipLevel (line 63) | struct AkKTX2MipLevel {
  type AkKTX2DecodedImage (line 70) | struct AkKTX2DecodedImage {
  type AkKTX2Decoder (line 84) | struct AkKTX2Decoder {
  function ktx2_decode_to_rgba8 (line 111) | int
  function AK_KTX2_EXPORT (line 199) | AK_KTX2_EXPORT
  function AK_KTX2_EXPORT (line 207) | AK_KTX2_EXPORT

FILE: src/decoders/gltf/meshopt/assetkit_meshoptimizer.cc
  type AkMeshoptMode (line 27) | enum AkMeshoptMode {
  type AkMeshoptFilter (line 34) | enum AkMeshoptFilter {
  function AK_MESHOPT_EXPORT (line 42) | AK_MESHOPT_EXPORT

FILE: src/decoders/gltf/spz/assetkit_spz.cc
  type json_t (line 59) | struct json_t
  type GLTFStateLite (line 72) | struct GLTFStateLite {
  function AkBuffer (line 81) | AkBuffer*
  function AkAccessor (line 95) | AkAccessor*
  function AkInput (line 125) | AkInput*
  function AK_GSPLAT_EXPORT (line 164) | AK_GSPLAT_EXPORT
  function AK_GSPLAT_EXPORT (line 195) | AK_GSPLAT_EXPORT
  function AK_GSPLAT_EXPORT (line 213) | AK_GSPLAT_EXPORT

FILE: src/default/cam.c
  function AkCamera (line 42) | const AkCamera*

FILE: src/default/cmp.c
  function AK_EXPORT (line 20) | AK_EXPORT
  function AK_EXPORT (line 26) | AK_EXPORT
  function AK_EXPORT (line 36) | AK_EXPORT
  function AK_EXPORT (line 47) | AK_EXPORT
  function AK_EXPORT (line 73) | AK_EXPORT
  function AK_EXPORT (line 99) | AK_EXPORT

FILE: src/default/light.c
  function AkLight (line 34) | const AkLight*

FILE: src/default/opt.c
  function AK_EXPORT (line 69) | AK_EXPORT
  function AK_EXPORT (line 77) | AK_EXPORT
  function AK_EXPORT (line 85) | AK_EXPORT

FILE: src/default/opt.h
  type AkOptionItem (line 22) | typedef struct AkOptionItem {

FILE: src/default/semantic.c
  function AkInputSemanticPair (line 66) | const AkInputSemanticPair**
  function ak_def_semanticc (line 71) | uint32_t

FILE: src/default/semantic.h
  type AkInputSemanticPair (line 22) | typedef struct AkInputSemanticPair {

FILE: src/default/type.c
  function AkTypeDesc (line 67) | const AkTypeDesc*

FILE: src/endian.h
  function AK_INLINE (line 43) | AK_INLINE
  function AK_INLINE (line 53) | AK_INLINE
  function AK_INLINE (line 71) | AK_INLINE

FILE: src/find.c
  function AK_EXPORT (line 19) | AK_EXPORT
  function AK_EXPORT (line 25) | AK_EXPORT
  function AK_EXPORT (line 33) | AK_EXPORT
  function AK_EXPORT (line 50) | AK_EXPORT

FILE: src/geom/mesh.c
  function AK_EXPORT (line 19) | AK_EXPORT

FILE: src/id.c
  function AK_HIDE (line 23) | AK_HIDE
  function AK_EXPORT (line 42) | AK_EXPORT
  function AK_HIDE (line 52) | AK_HIDE

FILE: src/image/image.c
  type AkImageConf (line 28) | typedef struct AkImageConf {
  function AK_EXPORT (line 35) | AK_EXPORT
  function AK_EXPORT (line 43) | AK_EXPORT

FILE: src/instance/inst.c
  function AK_EXPORT (line 20) | AK_EXPORT
  function AK_EXPORT (line 35) | AK_EXPORT
  function AK_EXPORT (line 68) | AK_EXPORT
  function AK_EXPORT (line 80) | AK_EXPORT
  function AK_EXPORT (line 93) | AK_EXPORT
  function AK_EXPORT (line 106) | AK_EXPORT
  function AK_EXPORT (line 125) | AK_EXPORT
  function AK_EXPORT (line 175) | AK_EXPORT

FILE: src/instance/list.c
  function AK_EXPORT (line 22) | AK_EXPORT
  function AK_EXPORT (line 49) | AK_EXPORT
  function AK_EXPORT (line 70) | AK_EXPORT

FILE: src/io/3mf/imp/3mf.c
  function AK_HIDE (line 20) | AK_HIDE

FILE: src/io/3mf/imp/common.h
  type _3MFState (line 31) | typedef AK_ALIGN(16) struct _3MFState {

FILE: src/io/common/postscript.c
  function AK_HIDE (line 20) | AK_HIDE

FILE: src/io/common/util.c
  function AK_HIDE (line 19) | AK_HIDE
  function AK_HIDE (line 46) | AK_HIDE
  function AK_HIDE (line 100) | AK_HIDE
  function AK_HIDE (line 129) | AK_HIDE

FILE: src/io/dae/1.4/dae14.c
  function AK_HIDE (line 21) | AK_HIDE
  function AK_HIDE (line 47) | AK_HIDE

FILE: src/io/dae/1.4/dae14.h
  type AkDae14LoadJobType (line 22) | typedef enum AkDae14LoadJobType {
  type AkDae14LoadJob (line 26) | typedef struct AkDae14LoadJob {
  type AkDae14SurfaceFrom (line 34) | typedef struct AkDae14SurfaceFrom {
  type AkDae14Surface (line 41) | typedef struct AkDae14Surface {

FILE: src/io/dae/1.4/image.c
  function AK_HIDE (line 21) | AK_HIDE

FILE: src/io/dae/1.4/surface.c
  function AK_HIDE (line 21) | AK_HIDE

FILE: src/io/dae/brep/brep.c
  function AK_HIDE (line 24) | AK_HIDE

FILE: src/io/dae/brep/curve.c
  function AK_HIDE (line 21) | AK_HIDE
  function AK_HIDE (line 153) | AK_HIDE

FILE: src/io/dae/brep/nurb.c
  function AK_HIDE (line 22) | AK_HIDE
  function AK_HIDE (line 57) | AK_HIDE

FILE: src/io/dae/brep/surface.c
  function AK_HIDE (line 22) | AK_HIDE
  function AK_HIDE (line 181) | AK_HIDE

FILE: src/io/dae/brep/topology.c
  function AK_HIDE (line 21) | AK_HIDE AkEdges*
  function AK_HIDE (line 90) | AK_HIDE AkWires*
  function AK_HIDE (line 166) | AK_HIDE AkFaces*
  function AK_HIDE (line 242) | AK_HIDE AkPCurves*
  function AK_HIDE (line 318) | AK_HIDE AkShells*
  function AK_HIDE (line 394) | AK_HIDE AkSolids*

FILE: src/io/dae/bugfix/scenekit.c
  function dae_strcase_contains (line 22) | static
  function dae_scenekit_authored (line 51) | static
  function dae_colordesc_has_texture (line 67) | static
  function dae_scenekit_is_red_fill (line 77) | static
  function AkTechniqueFxCommon (line 102) | static
  function dae_scenekit_primitive_has_texture (line 124) | static
  function dae_scenekit_is_textured_twin (line 137) | static
  function dae_scenekit_should_drop_primitive (line 150) | static
  function dae_scenekit_unmap_material (line 175) | static
  function dae_scenekit_fix_mesh (line 206) | static
  function dae_scenekit_fix_node (line 240) | static
  function AK_HIDE (line 266) | AK_HIDE

FILE: src/io/dae/bugfix/transp.c
  function AK_HIDE (line 21) | AK_HIDE

FILE: src/io/dae/common.h
  type AkCOLLADAVersion (line 39) | typedef enum AkCOLLADAVersion {
  type AkControllerType (line 45) | typedef enum AkControllerType {
  type AkURLQueue (line 50) | typedef struct AkURLQueue {
  type AkDAEVerticesMapItem (line 55) | typedef struct AkDAEVerticesMapItem {
  type DAEState (line 60) | typedef AK_ALIGN(16) struct DAEState {
  type AkDaeMeshInfo (line 88) | typedef struct AkDaeMeshInfo {
  type AkDAETextureRef (line 93) | typedef struct AkDAETextureRef {
  type AkNewParam (line 100) | typedef struct AkNewParam {
  type AkController (line 108) | typedef struct AkController {
  type AkInstanceController (line 117) | typedef struct AkInstanceController {
  type AkAccessorDAE (line 125) | typedef struct AkAccessorDAE {
  type AkSkinJointsDAE (line 133) | typedef struct AkSkinJointsDAE {
  type AkSkinWeightsDAE (line 138) | typedef struct AkSkinWeightsDAE {
  type AkSkinDAE (line 144) | typedef struct AkSkinDAE {
  type AkMorphDAE (line 154) | typedef struct AkMorphDAE {
  function AK_INLINE (line 161) | AK_INLINE
  function AK_INLINE (line 175) | AK_INLINE
  function AK_INLINE (line 188) | AK_INLINE
  function AK_INLINE (line 216) | AK_INLINE
  function AK_INLINE (line 232) | AK_INLINE

FILE: src/io/dae/core/anim.c
  function AK_HIDE (line 22) | AK_HIDE
  function AK_HIDE (line 76) | AK_HIDE
  function AK_HIDE (line 159) | AK_HIDE

FILE: src/io/dae/core/asset.c
  function AK_HIDE (line 19) | AK_HIDE

FILE: src/io/dae/core/cam.c
  function AK_HIDE (line 21) | AK_HIDE

FILE: src/io/dae/core/color.c
  function AK_HIDE (line 19) | AK_HIDE

FILE: src/io/dae/core/ctlr.c
  function AK_HIDE (line 22) | AK_HIDE

FILE: src/io/dae/core/enum.c
  function AK_HIDE (line 22) | AK_HIDE AkEnum
  function AK_HIDE (line 70) | AK_HIDE AkEnum
  function AK_HIDE (line 96) | AK_HIDE AkEnum
  function AK_HIDE (line 122) | AK_HIDE AkEnum
  function AK_HIDE (line 152) | AK_HIDE AkEnum
  function AK_HIDE (line 182) | AK_HIDE AkEnum
  function AK_HIDE (line 211) | AK_HIDE AkEnum
  function AK_HIDE (line 238) | AK_HIDE AkEnum
  function AK_HIDE (line 265) | AK_HIDE AkEnum
  function AK_HIDE (line 291) | AK_HIDE AkEnum
  function AK_HIDE (line 321) | AK_HIDE AkEnum
  function AK_HIDE (line 349) | AK_HIDE AkEnum
  function AK_HIDE (line 383) | AK_HIDE AkEnum
  function AK_HIDE (line 412) | AK_HIDE AkEnum

FILE: src/io/dae/core/geom.c
  function AK_HIDE (line 23) | AK_HIDE

FILE: src/io/dae/core/light.c
  function AK_HIDE (line 24) | AK_HIDE

FILE: src/io/dae/core/line.c
  function AK_HIDE (line 21) | AK_HIDE

FILE: src/io/dae/core/mesh.c
  function AK_INLINE (line 24) | AK_INLINE
  function AK_HIDE (line 39) | AK_HIDE

FILE: src/io/dae/core/morph.c
  function AK_HIDE (line 22) | AK_HIDE

FILE: src/io/dae/core/node.c
  function AK_HIDE (line 27) | AK_HIDE
  function AK_HIDE (line 35) | AK_HIDE

FILE: src/io/dae/core/param.c
  function AK_HIDE (line 20) | AK_HIDE
  function AK_HIDE (line 48) | AK_HIDE

FILE: src/io/dae/core/poly.c
  function AK_HIDE (line 22) | AK_HIDE

FILE: src/io/dae/core/poly.h
  type AkPolygonMode (line 22) | typedef enum AkPolygonMode {

FILE: src/io/dae/core/scene.c
  function AK_HIDE (line 31) | AK_HIDE
  function AK_HIDE (line 105) | AK_HIDE
  function AkEvaluateScene (line 124) | static
  function AK_HIDE (line 197) | AK_HIDE

FILE: src/io/dae/core/skin.c
  function AK_HIDE (line 22) | AK_HIDE

FILE: src/io/dae/core/source.c
  function AK_HIDE (line 23) | AK_HIDE

FILE: src/io/dae/core/spline.c
  function AK_HIDE (line 22) | AK_HIDE

FILE: src/io/dae/core/techn.c
  function AkTechnique (line 20) | AkTechnique*

FILE: src/io/dae/core/triangle.c
  function AK_HIDE (line 21) | AK_HIDE

FILE: src/io/dae/core/value.c
  type valpair (line 23) | typedef struct valpair {
  function AK_HIDE (line 73) | AK_HIDE
  function AK_HIDE (line 104) | AK_HIDE
  function valpair_cmp1 (line 218) | static
  function valpair_cmp2 (line 224) | static
  function valpair_cmpxt (line 230) | static int

FILE: src/io/dae/core/vert.c
  function AK_HIDE (line 20) | AK_HIDE

FILE: src/io/dae/ctlr.c
  function AK_EXPORT (line 19) | AK_EXPORT

FILE: src/io/dae/dae.c
  function AK_HIDE (line 60) | AK_HIDE
  function ak_daeFreeDupl (line 218) | static
  function dae_lib (line 226) | static

FILE: src/io/dae/fixup/angle.c
  function dae_cvtAnglesAt (line 31) | static
  function AK_HIDE (line 59) | AK_HIDE
  function dae_fixAngleTangent (line 82) | static
  function AK_HIDE (line 120) | AK_HIDE

FILE: src/io/dae/fixup/channel.c
  type DAEMatrixAnimFix (line 21) | typedef struct DAEMatrixAnimFix {
  function dae_parseChannelTargetIndexed (line 37) | static
  function AkInstanceMorph (line 86) | static
  function AkInstanceMorph (line 106) | static
  function AkController (line 127) | static
  function AkInstanceMorph (line 151) | static
  function dae_resolveMatrixElement (line 180) | static
  function AkInput (line 251) | static
  function dae_matrixAnimFixed (line 276) | static
  function dae_matrixAnimMark (line 288) | static
  function dae_transposeMat4Output (line 301) | static
  function dae_fixupMatrixAccessor (line 329) | static
  function dae_fixupMatrixChannel (line 346) | static
  function dae_fixup_channel_walk (line 382) | static
  function AK_HIDE (line 430) | AK_HIDE

FILE: src/io/dae/fixup/ctlr.c
  function AK_INLINE (line 31) | AK_INLINE
  function AK_INLINE (line 63) | AK_INLINE
  function AK_HIDE (line 83) | AK_HIDE
  function AK_HIDE (line 358) | AK_HIDE
  function AkResult (line 550) | static

FILE: src/io/dae/fixup/geom.c
  function AK_HIDE (line 20) | AK_HIDE
  function AK_HIDE (line 40) | AK_HIDE

FILE: src/io/dae/fixup/mesh.c
  function AK_HIDE (line 21) | AK_HIDE

FILE: src/io/dae/fixup/node.c
  function AK_HIDE (line 25) | AK_HIDE
  function AK_HIDE (line 78) | AK_HIDE

FILE: src/io/dae/fixup/tex.c
  function AK_HIDE (line 23) | AK_HIDE
  function AK_HIDE (line 29) | AK_HIDE

FILE: src/io/dae/fx/colortex.c
  function AK_HIDE (line 22) | AK_HIDE

FILE: src/io/dae/fx/colortex.h
  function AK_INLINE (line 29) | AK_INLINE

FILE: src/io/dae/fx/effect.c
  function AK_HIDE (line 26) | AK_HIDE
  function AK_HIDE (line 76) | AK_HIDE

FILE: src/io/dae/fx/fltprm.c
  function AK_HIDE (line 20) | AK_HIDE

FILE: src/io/dae/fx/img.c
  function AK_HIDE (line 52) | AK_HIDE
  function AK_HIDE (line 105) | AK_HIDE
  function AkInitFrom (line 123) | static
  function AkImageFormat (line 165) | static
  function AkImage2d (line 200) | static
  function AkImage3d (line 254) | static
  function AkImageCube (line 289) | static

FILE: src/io/dae/fx/mat.c
  function AK_HIDE (line 23) | AK_HIDE
  function AK_HIDE (line 62) | AK_HIDE
  function AK_HIDE (line 117) | AK_HIDE

FILE: src/io/dae/fx/profile.c
  function AK_HIDE (line 24) | AK_HIDE

FILE: src/io/dae/fx/samp.c
  function AK_HIDE (line 25) | AK_HIDE

FILE: src/io/dae/fx/techn.c
  function AK_HIDE (line 34) | AK_HIDE
  function dae_colorDescTextureUsage (line 72) | static
  function AkTextureChannels (line 89) | static
  function AkTechniqueFxCommon (line 105) | static

FILE: src/io/dae/postscript.c
  function AK_HIDE (line 47) | AK_HIDE
  function AK_HIDE (line 113) | AK_HIDE void
  function AK_HIDE (line 185) | AK_HIDE void
  function dae_attach_orphan_morphs_node (line 230) | static
  function AK_HIDE (line 258) | AK_HIDE void
  function AK_HIDE (line 271) | AK_HIDE void
  function AK_HIDE (line 304) | AK_HIDE void
  function AK_HIDE (line 403) | AK_HIDE void
  function AK_HIDE (line 419) | AK_HIDE void

FILE: src/io/gltf/common.h
  type AkBufferView (line 33) | typedef struct AkBufferView {
  type AkGLTFMeshoptLib (line 41) | typedef struct AkGLTFMeshoptLib AkGLTFMeshoptLib;
  type AkGLTFDracoLib (line 42) | typedef struct AkGLTFDracoLib   AkGLTFDracoLib;
  type AkGLTFSPZLib (line 43) | typedef struct AkGLTFSPZLib     AkGLTFSPZLib;
  type AkGLTFKTX2Lib (line 44) | typedef struct AkGLTFKTX2Lib    AkGLTFKTX2Lib;
  type AkGLTFState (line 46) | typedef struct AkGLTFState {

FILE: src/io/gltf/imp/core/accessor.c
  function AK_HIDE (line 33) | AK_HIDE

FILE: src/io/gltf/imp/core/anim.c
  function gltf_animSegEq (line 29) | static
  function gltf_animPtrSeg (line 37) | static
  function gltf_animPtrIndex (line 57) | static
  function gltf_animPtrReadSeg (line 78) | static
  function gltf_animSetTarget (line 96) | static
  function gltf_animSetFloatArrayTarget (line 116) | static
  function gltf_animSetFloatTarget (line 135) | static
  function AkTextureTransform (line 147) | static
  function AkTextureRef (line 167) | static
  function gltf_animResolveTexTransform (line 184) | static
  function gltf_animResolveNodePointer (line 226) | static
  function AkTechniqueFxCommon (line 339) | static
  function gltf_animSetColorDefault (line 354) | static
  function AkColor (line 367) | static
  function AkMaterialMetallicProp (line 390) | static
  function AkMaterialSheen (line 403) | static
  function AkMaterialIridescence (line 420) | static
  function AkMaterialVolume (line 437) | static
  function AkMaterialAnisotropy (line 456) | static
  function AkMaterialDispersion (line 470) | static
  function AkMaterialDiffuseTransmission (line 484) | static
  function gltf_animResolveMaterialPBR (line 501) | static
  function gltf_animResolveMaterialExt (line 580) | static
  function gltf_animResolveMaterialPointer (line 913) | static
  function gltf_animResolveCameraPointer (line 1038) | static
  function gltf_animResolveLightPointer (line 1107) | static
  function gltf_animResolvePointer (line 1181) | static
  function AK_HIDE (line 1207) | AK_HIDE

FILE: src/io/gltf/imp/core/asset.c
  function gltf_asset (line 19) | void

FILE: src/io/gltf/imp/core/buffer.c
  function gltf_bufferViews (line 22) | void
  function gltf_buffers (line 72) | void

FILE: src/io/gltf/imp/core/camera.c
  function AK_HIDE (line 25) | AK_HIDE

FILE: src/io/gltf/imp/core/enum.c
  function AK_HIDE (line 19) | AK_HIDE AkEnum
  function AK_HIDE (line 48) | AK_HIDE AkEnum
  function AK_HIDE (line 62) | AK_HIDE int
  function AK_HIDE (line 75) | AK_HIDE AkComponentSize
  function AK_HIDE (line 104) | AK_HIDE AkEnum
  function AK_HIDE (line 119) | AK_HIDE AkEnum
  function AK_HIDE (line 129) | AK_HIDE AkEnum
  function AK_HIDE (line 140) | AK_HIDE AkOpaque
  function AK_HIDE (line 165) | AK_HIDE AkInterpolationType

FILE: src/io/gltf/imp/core/ext.c
  type AkGLTFExtName (line 23) | typedef struct AkGLTFExtName {
  function gltf_extNameCmp (line 30) | static
  function gltf_extNameSearch (line 55) | static inline
  function gltf_ext_preserved_supported (line 67) | static
  function gltf_ext_supported (line 107) | static
  function AK_HIDE (line 156) | AK_HIDE
  function AK_HIDE (line 180) | AK_HIDE
  function AK_HIDE (line 205) | AK_HIDE
  function AK_HIDE (line 232) | AK_HIDE

FILE: src/io/gltf/imp/core/image.c
  function AK_HIDE (line 51) | AK_HIDE

FILE: src/io/gltf/imp/core/material.c
  function AK_HIDE (line 25) | AK_HIDE
  function AkColorDesc (line 89) | static
  function AkTextureRef (line 110) | static
  function gltf_materialParseSpecular (line 122) | static
  function gltf_materialParseClearcoat (line 164) | static
  function gltf_materialParseTransmission (line 212) | static
  function gltf_materialParseSheen (line 242) | static
  function gltf_materialParseIridescence (line 282) | static
  function gltf_materialParseVolume (line 327) | static
  function gltf_materialParseAnisotropy (line 366) | static
  function gltf_materialParseDispersion (line 397) | static
  function gltf_materialParseDiffuseTransmission (line 412) | static
  function AK_HIDE (line 451) | AK_HIDE

FILE: src/io/gltf/imp/core/mesh.c
  function gltf_attrIndexedSemantic (line 33) | static
  function gltf_inputSemantic (line 58) | static
  function AkMorphPreset (line 79) | static
  function AK_HIDE (line 136) | AK_HIDE
  function AK_HIDE (line 525) | AK_HIDE
  function AK_HIDE (line 584) | AK_HIDE

FILE: src/io/gltf/imp/core/node.c
  function AK_HIDE (line 38) | AK_HIDE
  function AK_HIDE (line 111) | AK_HIDE

FILE: src/io/gltf/imp/core/profile.c
  function AK_HIDE (line 19) | AK_HIDE

FILE: src/io/gltf/imp/core/sampler.c
  function AK_HIDE (line 22) | AK_HIDE

FILE: src/io/gltf/imp/core/scene.c
  function AK_HIDE (line 30) | AK_HIDE
  function AK_HIDE (line 124) | AK_HIDE
  function AkNode (line 152) | static AkNode *
  function AkNode (line 171) | static AkNode *
  function gltf_setFirstCamera (line 182) | static

FILE: src/io/gltf/imp/core/skin.c
  function AK_HIDE (line 20) | AK_HIDE

FILE: src/io/gltf/imp/core/texture.c
  function AK_INLINE (line 23) | AK_INLINE
  function AK_HIDE (line 44) | AK_HIDE
  function AK_HIDE (line 105) | AK_HIDE

FILE: src/io/gltf/imp/ext/compression.c
  type AkGLTFMeshoptMode (line 10) | typedef enum AkGLTFMeshoptMode {
  type AkGLTFMeshoptFilter (line 17) | typedef enum AkGLTFMeshoptFilter {
  function AkGLTFMeshoptMode (line 24) | static
  function AkGLTFMeshoptFilter (line 40) | static
  function AK_HIDE (line 56) | AK_HIDE

FILE: src/io/gltf/imp/ext/decoder.c
  type AkGLTFMeshoptLib (line 27) | struct AkGLTFMeshoptLib {
  type AkGLTFDracoLib (line 33) | struct AkGLTFDracoLib {
  type AkGLTFSPZLib (line 39) | struct AkGLTFSPZLib {
  type AkKTX2MipLevel (line 45) | typedef struct AkKTX2MipLevel {
  type AkKTX2DecodedImage (line 52) | typedef struct AkKTX2DecodedImage {
  type AkGLTFKTX2Lib (line 68) | struct AkGLTFKTX2Lib {
  function AK_HIDE (line 91) | AK_HIDE
  function AK_HIDE (line 121) | AK_HIDE
  function AK_HIDE (line 152) | AK_HIDE
  function AK_HIDE (line 180) | AK_HIDE
  function AK_HIDE (line 186) | AK_HIDE
  function AK_HIDE (line 215) | AK_HIDE
  function AK_HIDE (line 227) | AK_HIDE
  function AK_HIDE (line 252) | AK_HIDE
  function AK_HIDE (line 290) | AK_HIDE

FILE: src/io/gltf/imp/ext/gsplat.c
  function AkGaussianSplatColorSpace (line 11) | static
  function AkGaussianSplatProjection (line 30) | static
  function AkGaussianSplatSortingMethod (line 47) | static
  function AK_HIDE (line 64) | AK_HIDE

FILE: src/io/gltf/imp/ext/instancing.c
  function gltf_ext_instanceAccOK (line 9) | static
  function AK_HIDE (line 22) | AK_HIDE

FILE: src/io/gltf/imp/ext/lights.c
  function AkLightType (line 10) | static
  function AK_HIDE (line 26) | AK_HIDE
  function AK_HIDE (line 78) | AK_HIDE

FILE: src/io/gltf/imp/ext/variants.c
  function AK_HIDE (line 14) | AK_HIDE
  function AK_HIDE (line 51) | AK_HIDE

FILE: src/io/gltf/imp/extra.c
  function AkTreeNodeAttr (line 9) | static
  function gltf_treeAppend (line 31) | static
  function AkTreeNode (line 64) | static
  function AkTreeNode (line 117) | static
  function AK_HIDE (line 135) | AK_HIDE
  function AK_HIDE (line 152) | AK_HIDE

FILE: src/io/gltf/imp/gltf.c
  function AK_HIDE (line 51) | AK_HIDE
  function AK_HIDE (line 122) | AK_HIDE
  function AkResult (line 141) | static
  function ak_gltfFreeDupl (line 292) | static

FILE: src/io/gltf/imp/mesh_fixup.c
  function AK_HIDE (line 21) | AK_HIDE

FILE: src/io/gltf/imp/postscript.c
  function AK_HIDE (line 25) | AK_HIDE
  function AK_HIDE (line 59) | AK_HIDE

FILE: src/io/obj/common.h
  type WOMtl (line 30) | typedef struct WOMtl {
  type WOMtlLib (line 57) | typedef struct WOMtlLib {
  type WOPrim (line 62) | typedef struct WOPrim {
  type WOObject (line 72) | typedef struct WOObject {
  type WOState (line 78) | typedef struct WOState {

FILE: src/io/obj/group.c
  function wobj_finishPrim (line 29) | static
  function AK_HIDE (line 102) | AK_HIDE
  function AK_HIDE (line 122) | AK_HIDE
  function AK_HIDE (line 161) | AK_HIDE
  function AK_HIDE (line 173) | AK_HIDE

FILE: src/io/obj/mtl.c
  function AK_HIDE (line 46) | AK_HIDE
  function AkProfileCommon (line 256) | static
  function AK_INLINE (line 284) | AK_INLINE
  function AK_INLINE (line 305) | AK_INLINE
  function wobj_handleMaterial (line 333) | static
  function AkTextureRef (line 443) | static

FILE: src/io/obj/obj.c
  function AK_HIDE (line 39) | AK_HIDE
  function ak_wobjFreeDupl (line 281) | static

FILE: src/io/obj/util.c
  function AK_HIDE (line 21) | AK_HIDE
  function AK_HIDE (line 58) | AK_HIDE
  function AK_HIDE (line 83) | AK_HIDE

FILE: src/io/ply/ascii.c
  function AK_HIDE (line 23) | AK_HIDE

FILE: src/io/ply/bin.c
  function AK_HIDE (line 24) | AK_HIDE

FILE: src/io/ply/common.h
  type PLYPropertyType (line 30) | typedef enum PLYPropertyType {
  type PLYProperty (line 45) | typedef struct PLYProperty {
  type PLYElementType (line 60) | typedef enum PLYElementType {
  type PLYElement (line 66) | typedef struct PLYElement {
  type PLYState (line 77) | typedef struct PLYState {

FILE: src/io/ply/ply.c
  function AK_HIDE (line 36) | AK_HIDE
  function AK_HIDE (line 457) | AK_HIDE

FILE: src/io/stl/common.h
  type STLState (line 30) | typedef struct STLState {

FILE: src/io/stl/stl.c
  function AK_HIDE (line 34) | AK_HIDE
  function AK_HIDE (line 122) | AK_HIDE
  function AK_HIDE (line 168) | AK_HIDE
  function AK_HIDE (line 236) | AK_HIDE

FILE: src/json.h
  function AK_INLINE (line 26) | AK_INLINE
  function AK_INLINE (line 37) | AK_INLINE

FILE: src/lib/geom.c
  function AK_EXPORT (line 19) | AK_EXPORT

FILE: src/lib/lib.c
  function AK_EXPORT (line 19) | AK_EXPORT
  function AK_EXPORT (line 48) | AK_EXPORT
  function AK_EXPORT (line 74) | AK_EXPORT
  function AK_EXPORT (line 98) | AK_EXPORT
  function AK_EXPORT (line 117) | AK_EXPORT

FILE: src/light/light.c
  function AK_EXPORT (line 27) | AK_EXPORT
  function AK_EXPORT (line 94) | AK_EXPORT

FILE: src/main.c
  function ak__init (line 36) | ak__init(void) {
  function ak__cleanup (line 47) | ak__cleanup(void) {

FILE: src/map.c
  function AkMap (line 21) | AkMap *
  function ak_map_addptr (line 35) | void
  function AkMapItem (line 66) | AkMapItem*
  function ak_map_add (line 78) | void
  function ak_multimap_add (line 102) | void
  function ak_map_destroy (line 144) | void

FILE: src/mat/mat.c
  function AK_EXPORT (line 20) | AK_EXPORT
  function AK_EXPORT (line 39) | AK_EXPORT

FILE: src/mem/common.h
  type AkHeapSrchNode (line 39) | typedef struct AkHeapSrchNode {
  type AkHeapSrchCtx (line 44) | struct AkHeapSrchCtx {
  type AkSIDNode (line 51) | typedef struct AkSIDNode {
  type AkUrlNode (line 61) | typedef struct AkUrlNode {
  type AkMemoryMapNode (line 66) | typedef struct AkMemoryMapNode {
  type AkHeapNode (line 83) | struct AkHeapNode {
  type AkHeapNodeExt (line 108) | typedef struct AkHeapNodeExt {
  type AkHeap (line 114) | struct AkHeap {

FILE: src/mem/ext.c
  function AK_INLINE (line 33) | AK_INLINE
  function AK_INLINE (line 53) | AK_INLINE
  function AK_INLINE (line 70) | AK_INLINE
  function ak_heap_ext_rm (line 170) | void
  function ak_heap_ext_free (line 251) | void

FILE: src/mem/intr.c
  function AK_HIDE (line 19) | AK_HIDE

FILE: src/mem/lt.c
  function AkHeapBucket (line 36) | static
  function AkHeapBucket (line 59) | static
  function ak__heap_lt_entry_in_bucket (line 68) | static
  function ak__heap_lt_clear_last_used (line 76) | static
  function ak_heap_lt_init (line 90) | void
  function ak_heap_lt_insert (line 106) | void
  function AkHeap (line 155) | AkHeap *
  function ak_heap_lt_remove (line 182) | void
  function ak_heap_lt_cleanup (line 233) | void

FILE: src/mem/lt.h
  type AkHeapBucketEntry (line 24) | typedef struct AkHeapBucketEntry {
  type AkHeapBucket (line 29) | typedef struct AkHeapBucket {
  type AkHeapLookupTable (line 37) | typedef struct AkHeapLookupTable {

FILE: src/mem/mem.c
  function ak__heap_srch_cmp (line 68) | static
  function ak__heap_srch_print (line 75) | static
  function AK_EXPORT (line 97) | AK_EXPORT
  function AK_EXPORT (line 119) | AK_EXPORT
  function AK_EXPORT (line 136) | AK_EXPORT
  function AK_EXPORT (line 142) | AK_EXPORT
  function AK_EXPORT (line 148) | AK_EXPORT
  function AK_EXPORT (line 156) | AK_EXPORT
  function AK_EXPORT (line 175) | AK_EXPORT
  function AK_EXPORT (line 183) | AK_EXPORT
  function AK_EXPORT (line 207) | AK_EXPORT
  function AK_EXPORT (line 214) | AK_EXPORT
  function AK_EXPORT (line 220) | AK_EXPORT
  function AK_EXPORT (line 289) | AK_EXPORT
  function AK_EXPORT (line 330) | AK_EXPORT
  function AK_EXPORT (line 375) | AK_EXPORT
  function AK_EXPORT (line 390) | AK_EXPORT
  function AK_EXPORT (line 452) | AK_EXPORT
  function AK_EXPORT (line 461) | AK_EXPORT
  function AK_EXPORT (line 474) | AK_EXPORT
  function AK_EXPORT (line 495) | AK_EXPORT
  function AK_HIDE (line 537) | AK_HIDE
  function AK_EXPORT (line 562) | AK_EXPORT
  function AK_EXPORT (line 584) | AK_EXPORT
  function AK_HIDE (line 592) | AK_HIDE
  function AK_EXPORT (line 605) | AK_EXPORT
  function AK_EXPORT (line 681) | AK_EXPORT
  function AK_EXPORT (line 688) | AK_EXPORT
  function AK_EXPORT (line 703) | AK_EXPORT
  function AK_EXPORT (line 733) | AK_EXPORT
  function AK_EXPORT (line 752) | AK_EXPORT
  function AK_EXPORT (line 765) | AK_EXPORT
  function AK_EXPORT (line 784) | AK_EXPORT
  function AK_EXPORT (line 796) | AK_EXPORT
  function AK_EXPORT (line 809) | AK_EXPORT
  function AK_EXPORT (line 825) | AK_EXPORT
  function AK_EXPORT (line 831) | AK_EXPORT
  function AK_EXPORT (line 837) | AK_EXPORT
  function AK_EXPORT (line 863) | AK_EXPORT
  function AK_EXPORT (line 869) | AK_EXPORT
  function AK_EXPORT (line 875) | AK_EXPORT
  function AK_EXPORT (line 890) | AK_EXPORT
  function AK_EXPORT (line 908) | AK_EXPORT
  function AK_EXPORT (line 927) | AK_EXPORT
  function AK_EXPORT (line 935) | AK_EXPORT
  function AK_EXPORT (line 949) | AK_EXPORT
  function AK_EXPORT (line 958) | AK_EXPORT
  function AK_EXPORT (line 972) | AK_EXPORT
  function AK_EXPORT (line 983) | AK_EXPORT
  function AK_EXPORT (line 1005) | AK_EXPORT
  function AK_EXPORT (line 1011) | AK_EXPORT
  function AK_EXPORT (line 1018) | AK_EXPORT
  function AK_EXPORT (line 1025) | AK_EXPORT
  function AK_EXPORT (line 1050) | AK_EXPORT
  function AK_EXPORT (line 1078) | AK_EXPORT
  function AK_EXPORT (line 1098) | AK_EXPORT
  function AK_EXPORT (line 1118) | AK_EXPORT
  function AK_EXPORT (line 1129) | AK_EXPORT
  function ak_mem_init (line 1138) | void
  function ak_mem_deinit (line 1147) | void

FILE: src/mem/mmap.c
  function AK_EXPORT (line 27) | AK_EXPORT
  function AK_EXPORT (line 52) | AK_EXPORT
  function AK_EXPORT (line 63) | AK_EXPORT
  function AK_EXPORT (line 87) | AK_EXPORT

FILE: src/mem/rb.c
  function ak_heap_rb_assert (line 48) | int
  function ak_heap_rb_insert (line 95) | void
  function ak_heap_rb_remove (line 214) | void
  function AkHeapSrchNode (line 395) | AkHeapSrchNode *
  function ak_heap_rb_parent (line 416) | int
  function ak_heap_rb_printNode (line 447) | void
  function ak_heap_rb_print (line 459) | void

FILE: src/mesh/duplicator.c
  function AK_EXPORT (line 22) | AK_EXPORT
  function AK_EXPORT (line 161) | AK_EXPORT

FILE: src/mesh/edit.c
  function AK_EXPORT (line 24) | AK_EXPORT
  function AK_EXPORT (line 32) | AK_EXPORT
  function AK_EXPORT (line 80) | AK_EXPORT

FILE: src/mesh/edit_buff.c
  function ak_meshFreeRsvBuff (line 27) | void
  function AK_EXPORT (line 38) | AK_EXPORT
  function AK_EXPORT (line 92) | AK_EXPORT
  function AK_EXPORT (line 147) | AK_EXPORT
  function AK_EXPORT (line 161) | AK_EXPORT
  function AK_EXPORT (line 181) | AK_EXPORT

FILE: src/mesh/edit_buff_fixup.c
  function AK_EXPORT (line 23) | AK_EXPORT

FILE: src/mesh/edit_common.h
  type AkPrimProxy (line 22) | typedef struct AkPrimProxy {
  type AkInputDesc (line 39) | typedef struct AkInputDesc {

FILE: src/mesh/edit_index.c
  function AK_EXPORT (line 23) | AK_EXPORT
  function AK_EXPORT (line 78) | AK_EXPORT

FILE: src/mesh/index.c
  function AK_HIDE (line 25) | AK_HIDE
  function AK_HIDE (line 80) | AK_HIDE
  function AK_HIDE (line 98) | AK_HIDE
  function AK_HIDE (line 112) | AK_HIDE

FILE: src/mesh/input.c
  function ak_meshReIndexInputs (line 23) | void
  function ak_inputNameIndexed (line 83) | void
  function AK_EXPORT (line 95) | AK_EXPORT
  function AK_EXPORT (line 110) | AK_EXPORT

FILE: src/mesh/isolate.c
  function AK_EXPORT (line 19) | AK_EXPORT
  function AK_EXPORT (line 42) | AK_EXPORT
  function AK_EXPORT (line 57) | AK_EXPORT
  function AK_EXPORT (line 68) | AK_EXPORT

FILE: src/mesh/material.c
  function AK_EXPORT (line 20) | AK_EXPORT

FILE: src/mesh/normal.c
  function AK_EXPORT (line 29) | AK_EXPORT
  function AK_EXPORT (line 57) | AK_EXPORT
  function AK_HIDE (line 75) | AK_HIDE
  function AK_EXPORT (line 304) | AK_EXPORT

FILE: src/mesh/triangulate.c
  function AK_INLINE (line 23) | AK_INLINE
  function AK_HIDE (line 34) | AK_HIDE
  function AK_EXPORT (line 108) | AK_EXPORT
  function AK_EXPORT (line 186) | AK_EXPORT

FILE: src/miniz/miniz.c
  function mz_ulong (line 40) | mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf...
  function mz_ulong (line 70) | mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len)
  function mz_ulong (line 95) | mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len)
  function mz_free (line 162) | void mz_free(void *p)
  function MINIZ_EXPORT (line 167) | MINIZ_EXPORT void *miniz_def_alloc_func(void *opaque, size_t items, size...
  function MINIZ_EXPORT (line 172) | MINIZ_EXPORT void miniz_def_free_func(void *opaque, void *address)
  function MINIZ_EXPORT (line 177) | MINIZ_EXPORT void *miniz_def_realloc_func(void *opaque, void *address, s...
  function mz_deflateInit (line 190) | int mz_deflateInit(mz_streamp pStream, int level)
  function mz_deflateInit2 (line 195) | int mz_deflateInit2(mz_streamp pStream, int level, int method, int windo...
  function mz_deflateReset (line 231) | int mz_deflateReset(mz_streamp pStream)
  function mz_deflate (line 240) | int mz_deflate(mz_streamp pStream, int flush)
  function mz_deflateEnd (line 298) | int mz_deflateEnd(mz_streamp pStream)
  function mz_ulong (line 310) | mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len)
  function mz_compress2 (line 317) | int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsign...
  function mz_compress (line 347) | int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, const unsigne...
  function mz_ulong (line 352) | mz_ulong mz_compressBound(mz_ulong source_len)
  type inflate_state (line 357) | typedef struct
  function mz_inflateInit2 (line 366) | int mz_inflateInit2(mz_streamp pStream, int window_bits)
  function mz_inflateInit (line 402) | int mz_inflateInit(mz_streamp pStream)
  function mz_inflateReset (line 407) | int mz_inflateReset(mz_streamp pStream)
  function mz_inflate (line 433) | int mz_inflate(mz_streamp pStream, int flush)
  function mz_inflateEnd (line 545) | int mz_inflateEnd(mz_streamp pStream)
  function mz_uncompress2 (line 556) | int mz_uncompress2(unsigned char *pDest, mz_ulong *pDest_len, const unsi...
  function mz_uncompress (line 587) | int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsig...
  type tdefl_sym_freq (line 739) | typedef struct
  function tdefl_sym_freq (line 743) | static tdefl_sym_freq *tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym...
  function tdefl_calculate_minimum_redundancy (line 777) | static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n)
  function tdefl_huffman_enforce_max_code_size (line 837) | static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int cod...
  function tdefl_optimize_huffman_table (line 861) | static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_...
  function tdefl_start_dynamic_block (line 980) | static void tdefl_start_dynamic_block(tdefl_compressor *d)
  function tdefl_start_static_block (line 1067) | static void tdefl_start_static_block(tdefl_compressor *d)
  function mz_bool (line 1092) | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d)
  function mz_bool (line 1186) | static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d)
  function mz_bool (line 1234) | static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_...
  function tdefl_flush_block (line 1243) | static int tdefl_flush_block(tdefl_compressor *d, int flush)
  function mz_uint16 (line 1380) | static mz_uint16 TDEFL_READ_UNALIGNED_WORD(const mz_uint8* p)
  function mz_uint16 (line 1386) | static mz_uint16 TDEFL_READ_UNALIGNED_WORD2(const mz_uint16* p)
  function MZ_FORCEINLINE (line 1396) | static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint...
  function MZ_FORCEINLINE (line 1449) | static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint...
  function mz_uint32 (line 1496) | static mz_uint32 TDEFL_READ_UNALIGNED_WORD32(const mz_uint8* p)
  function mz_bool (line 1505) | static mz_bool tdefl_compress_fast(tdefl_compressor *d)
  function MZ_FORCEINLINE (line 1679) | static MZ_FORCEINLINE void tdefl_record_literal(tdefl_compressor *d, mz_...
  function MZ_FORCEINLINE (line 1692) | static MZ_FORCEINLINE void tdefl_record_match(tdefl_compressor *d, mz_ui...
  function mz_bool (line 1720) | static mz_bool tdefl_compress_normal(tdefl_compressor *d)
  function tdefl_status (line 1865) | static tdefl_status tdefl_flush_output_buffer(tdefl_compressor *d)
  function tdefl_status (line 1886) | tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, si...
  function tdefl_status (line 1954) | tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_...
  function tdefl_status (line 1960) | tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut...
  function tdefl_status (line 1996) | tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d)
  function mz_uint32 (line 2001) | mz_uint32 tdefl_get_adler32(tdefl_compressor *d)
  function mz_bool (line 2006) | mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, t...
  type tdefl_output_buffer (line 2021) | typedef struct
  function mz_bool (line 2028) | static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, voi...
  function tdefl_compress_mem_to_mem (line 2068) | size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, con...
  function mz_uint (line 2084) | mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bi...
  function tdefl_compressor (line 2200) | tdefl_compressor *tdefl_compressor_alloc()
  function tdefl_compressor_free (line 2205) | void tdefl_compressor_free(tdefl_compressor *pComp)
  function tinfl_status (line 2391) | tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn...
  function tinfl_decompress_mem_to_mem (line 2902) | size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, c...
  function tinfl_decompress_mem_to_callback (line 2911) | int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_bu...
  function tinfl_decompressor (line 2941) | tinfl_decompressor *tinfl_decompressor_alloc()
  function tinfl_decompressor_free (line 2949) | void tinfl_decompressor_free(tinfl_decompressor *pDecomp)
  function FILE (line 3000) | static FILE *mz_fopen(const char *pFilename, const char *pMode)
  function FILE (line 3006) | static FILE *mz_freopen(const char *pPath, const char *pMode, FILE *pStr...
  type mz_zip_array (line 3204) | typedef struct
  type mz_zip_internal_state_tag (line 3211) | struct mz_zip_internal_state_tag
  function MZ_FORCEINLINE (line 3238) | static MZ_FORCEINLINE mz_uint mz_zip_array_range_check(const mz_zip_arra...
  function MZ_FORCEINLINE (line 3248) | static MZ_FORCEINLINE void mz_zip_array_init(mz_zip_array *pArray, mz_ui...
  function MZ_FORCEINLINE (line 3254) | static MZ_FORCEINLINE void mz_zip_array_clear(mz_zip_archive *pZip, mz_z...
  function mz_bool (line 3260) | static mz_bool mz_zip_array_ensure_capacity(mz_zip_archive *pZip, mz_zip...
  function MZ_FORCEINLINE (line 3280) | static MZ_FORCEINLINE mz_bool mz_zip_array_reserve(mz_zip_archive *pZip,...
  function MZ_FORCEINLINE (line 3290) | static MZ_FORCEINLINE mz_bool mz_zip_array_resize(mz_zip_archive *pZip, ...
  function MZ_FORCEINLINE (line 3301) | static MZ_FORCEINLINE mz_bool mz_zip_array_ensure_room(mz_zip_archive *p...
  function MZ_FORCEINLINE (line 3306) | static MZ_FORCEINLINE mz_bool mz_zip_array_push_back(mz_zip_archive *pZi...
  function MZ_TIME_T (line 3317) | static MZ_TIME_T mz_zip_dos_to_time_t(int dos_time, int dos_date)
  function mz_zip_time_t_to_dos_time (line 3332) | static void mz_zip_time_t_to_dos_time(MZ_TIME_T time, mz_uint16 *pDOS_ti...
  function mz_bool (line 3355) | static mz_bool mz_zip_get_file_modified_time(const char *pFilename, MZ_T...
  function mz_bool (line 3369) | static mz_bool mz_zip_set_file_times(const char *pFilename, MZ_TIME_T ac...
  function MZ_FORCEINLINE (line 3382) | static MZ_FORCEINLINE mz_bool mz_zip_set_error(mz_zip_archive *pZip, mz_...
  function mz_bool (line 3389) | static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, mz_uint...
  function MZ_FORCEINLINE (line 3423) | static MZ_FORCEINLINE mz_bool mz_zip_reader_filename_less(const mz_zip_a...
  function mz_zip_reader_sort_central_dir_offsets_by_filename (line 3452) | static void mz_zip_reader_sort_central_dir_offsets_by_filename(mz_zip_ar...
  function mz_bool (line 3504) | static mz_bool mz_zip_reader_locate_header_sig(mz_zip_archive *pZip, mz_...
  function mz_bool (line 3550) | static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, mz_u...
  function mz_zip_zero_struct (line 3802) | void mz_zip_zero_struct(mz_zip_archive *pZip)
  function mz_bool (line 3808) | static mz_bool mz_zip_reader_end_internal(mz_zip_archive *pZip, mz_bool ...
  function mz_bool (line 3855) | mz_bool mz_zip_reader_end(mz_zip_archive *pZip)
  function mz_bool (line 3859) | mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint...
  function mz_zip_mem_read_func (line 3879) | static size_t mz_zip_mem_read_func(void *pOpaque, mz_uint64 file_ofs, vo...
  function mz_bool (line 3887) | mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, s...
  function mz_zip_file_read_func (line 3922) | static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs, v...
  function mz_bool (line 3935) | mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilen...
  function mz_bool (line 3940) | mz_bool mz_zip_reader_init_file_v2(mz_zip_archive *pZip, const char *pFi...
  function mz_bool (line 3994) | mz_bool mz_zip_reader_init_cfile(mz_zip_archive *pZip, MZ_FILE *pFile, m...
  function MZ_FORCEINLINE (line 4036) | static MZ_FORCEINLINE const mz_uint8 *mz_zip_get_cdh(mz_zip_archive *pZi...
  function mz_bool (line 4043) | mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint fi...
  function mz_bool (line 4057) | mz_bool mz_zip_reader_is_file_supported(mz_zip_archive *pZip, mz_uint fi...
  function mz_bool (line 4093) | mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint ...
  function mz_bool (line 4125) | static mz_bool mz_zip_file_stat_internal(mz_zip_archive *pZip, mz_uint f...
  function MZ_FORCEINLINE (line 4245) | static MZ_FORCEINLINE mz_bool mz_zip_string_equal(const char *pA, const ...
  function MZ_FORCEINLINE (line 4256) | static MZ_FORCEINLINE int mz_zip_filename_compare(const mz_zip_array *pC...
  function mz_bool (line 4273) | static mz_bool mz_zip_locate_file_binary_search(mz_zip_archive *pZip, co...
  function mz_zip_reader_locate_file (line 4313) | int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, c...
  function mz_bool (line 4322) | mz_bool mz_zip_reader_locate_file_v2(mz_zip_archive *pZip, const char *p...
  function mz_bool (line 4387) | mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, mz_u...
  function mz_bool (line 4530) | mz_bool mz_zip_reader_extract_file_to_mem_no_alloc(mz_zip_archive *pZip,...
  function mz_bool (line 4538) | mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_...
  function mz_bool (line 4543) | mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, const ch...
  function mz_bool (line 4602) | mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint ...
  function mz_bool (line 4802) | mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, con...
  function mz_zip_reader_extract_iter_state (line 4811) | mz_zip_reader_extract_iter_state* mz_zip_reader_extract_iter_new(mz_zip_...
  function mz_zip_reader_extract_iter_state (line 4939) | mz_zip_reader_extract_iter_state* mz_zip_reader_extract_file_iter_new(mz...
  function mz_zip_reader_extract_iter_read (line 4951) | size_t mz_zip_reader_extract_iter_read(mz_zip_reader_extract_iter_state*...
  function mz_bool (line 5068) | mz_bool mz_zip_reader_extract_iter_free(mz_zip_reader_extract_iter_state...
  function mz_zip_file_write_callback (line 5110) | static size_t mz_zip_file_write_callback(void *pOpaque, mz_uint64 ofs, c...
  function mz_bool (line 5117) | mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file...
  function mz_bool (line 5151) | mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, const c...
  function mz_bool (line 5160) | mz_bool mz_zip_reader_extract_to_cfile(mz_zip_archive *pZip, mz_uint fil...
  function mz_bool (line 5173) | mz_bool mz_zip_reader_extract_file_to_cfile(mz_zip_archive *pZip, const ...
  function mz_zip_compute_crc32_callback (line 5183) | static size_t mz_zip_compute_crc32_callback(void *pOpaque, mz_uint64 fil...
  function mz_bool (line 5191) | mz_bool mz_zip_validate_file(mz_zip_archive *pZip, mz_uint file_index, m...
  function mz_bool (line 5406) | mz_bool mz_zip_validate_archive(mz_zip_archive *pZip, mz_uint flags)
  function mz_bool (line 5459) | mz_bool mz_zip_validate_mem_archive(const void *pMem, size_t size, mz_ui...
  function mz_bool (line 5501) | mz_bool mz_zip_validate_file_archive(const char *pFilename, mz_uint flag...
  function MZ_FORCEINLINE (line 5547) | static MZ_FORCEINLINE void mz_write_le16(mz_uint8 *p, mz_uint16 v)
  function MZ_FORCEINLINE (line 5552) | static MZ_FORCEINLINE void mz_write_le32(mz_uint8 *p, mz_uint32 v)
  function MZ_FORCEINLINE (line 5559) | static MZ_FORCEINLINE void mz_write_le64(mz_uint8 *p, mz_uint64 v)
  function mz_zip_heap_write_func (line 5569) | static size_t mz_zip_heap_write_func(void *pOpaque, mz_uint64 file_ofs, ...
  function mz_bool (line 5607) | static mz_bool mz_zip_writer_end_internal(mz_zip_archive *pZip, mz_bool ...
  function mz_bool (line 5653) | mz_bool mz_zip_writer_init_v2(mz_zip_archive *pZip, mz_uint64 existing_s...
  function mz_bool (line 5702) | mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size)
  function mz_bool (line 5707) | mz_bool mz_zip_writer_init_heap_v2(mz_zip_archive *pZip, size_t size_to_...
  function mz_bool (line 5735) | mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, size_t size_to_res...
  function mz_zip_file_write_func (line 5741) | static size_t mz_zip_file_write_func(void *pOpaque, mz_uint64 file_ofs, ...
  function mz_bool (line 5757) | mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilen...
  function mz_bool (line 5762) | mz_bool mz_zip_writer_init_file_v2(mz_zip_archive *pZip, const char *pFi...
  function mz_bool (line 5809) | mz_bool mz_zip_writer_init_cfile(mz_zip_archive *pZip, MZ_FILE *pFile, m...
  function mz_bool (line 5830) | mz_bool mz_zip_writer_init_from_reader_v2(mz_zip_archive *pZip, const ch...
  function mz_bool (line 5917) | mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, const char ...
  function mz_bool (line 5923) | mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive...
  type mz_zip_writer_add_state (line 5928) | typedef struct
  function mz_bool (line 5935) | static mz_bool mz_zip_writer_add_put_buf_callback(const void *pBuf, int ...
  function mz_uint32 (line 5948) | static mz_uint32 mz_zip_writer_create_zip64_extra_data(mz_uint8 *pBuf, m...
  function mz_bool (line 5983) | static mz_bool mz_zip_writer_create_local_dir_header(mz_zip_archive *pZi...
  function mz_bool (line 6001) | static mz_bool mz_zip_writer_create_central_dir_header(mz_zip_archive *p...
  function mz_bool (line 6026) | static mz_bool mz_zip_writer_add_to_central_dir(mz_zip_archive *pZip, co...
  function mz_bool (line 6066) | static mz_bool mz_zip_writer_validate_archive_name(const char *pArchive_...
  function mz_uint (line 6077) | static mz_uint mz_zip_writer_compute_padding_needed_for_file_alignment(m...
  function mz_bool (line 6086) | static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, mz_uint64...
  function mz_bool (line 6102) | mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArch...
  function mz_bool (line 6108) | mz_bool mz_zip_writer_add_mem_ex_v2(mz_zip_archive *pZip, const char *pA...
  function mz_bool (line 6394) | mz_bool mz_zip_writer_add_read_buf_callback(mz_zip_archive *pZip, const ...
  function mz_file_read_func_stdio (line 6754) | static size_t mz_file_read_func_stdio(void *pOpaque, mz_uint64 file_ofs,...
  function mz_bool (line 6765) | mz_bool mz_zip_writer_add_cfile(mz_zip_archive *pZip, const char *pArchi...
  function mz_bool (line 6772) | mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchiv...
  function mz_bool (line 6804) | static mz_bool mz_zip_writer_update_zip64_extension_block(mz_zip_array *...
  function mz_bool (line 6884) | mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, mz_zip_a...
  function mz_bool (line 7246) | mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip)
  function mz_bool (line 7334) | mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void *...
  function mz_bool (line 7359) | mz_bool mz_zip_writer_end(mz_zip_archive *pZip)
  function mz_bool (line 7365) | mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filenam...
  function mz_bool (line 7370) | mz_bool mz_zip_add_mem_to_archive_file_in_place_v2(const char *pZip_file...
  function mz_zip_mode (line 7513) | mz_zip_mode mz_zip_get_mode(mz_zip_archive *pZip)
  function mz_zip_type (line 7518) | mz_zip_type mz_zip_get_type(mz_zip_archive *pZip)
  function mz_zip_error (line 7523) | mz_zip_error mz_zip_set_last_error(mz_zip_archive *pZip, mz_zip_error er...
  function mz_zip_error (line 7536) | mz_zip_error mz_zip_peek_last_error(mz_zip_archive *pZip)
  function mz_zip_error (line 7544) | mz_zip_error mz_zip_clear_last_error(mz_zip_archive *pZip)
  function mz_zip_error (line 7549) | mz_zip_error mz_zip_get_last_error(mz_zip_archive *pZip)
  function mz_bool (line 7638) | mz_bool mz_zip_is_zip64(mz_zip_archive *pZip)
  function mz_zip_get_central_dir_size (line 7646) | size_t mz_zip_get_central_dir_size(mz_zip_archive *pZip)
  function mz_uint (line 7654) | mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip)
  function mz_uint64 (line 7659) | mz_uint64 mz_zip_get_archive_size(mz_zip_archive *pZip)
  function mz_uint64 (line 7666) | mz_uint64 mz_zip_get_archive_file_start_offset(mz_zip_archive *pZip)
  function MZ_FILE (line 7673) | MZ_FILE *mz_zip_get_cfile(mz_zip_archive *pZip)
  function mz_zip_read_archive_data (line 7680) | size_t mz_zip_read_archive_data(mz_zip_archive *pZip, mz_uint64 file_ofs...
  function mz_uint (line 7688) | mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_in...
  function mz_bool (line 7709) | mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index...
  function mz_bool (line 7714) | mz_bool mz_zip_end(mz_zip_archive *pZip)

FILE: src/miniz/miniz.h
  type mz_ulong (line 206) | typedef unsigned long mz_ulong;
  type mz_internal_state (line 287) | struct mz_internal_state
  type mz_stream (line 290) | typedef struct mz_stream_s
  type mz_stream (line 312) | typedef mz_stream *mz_streamp;
  type Byte (line 409) | typedef unsigned char Byte;
  type uInt (line 410) | typedef unsigned int uInt;
  type mz_ulong (line 411) | typedef mz_ulong uLong;
  type Byte (line 412) | typedef Byte Bytef;
  type uInt (line 413) | typedef uInt uIntf;
  type charf (line 414) | typedef char charf;
  type intf (line 415) | typedef int intf;
  type uLong (line 417) | typedef uLong uLongf;
  type mz_uint8 (line 502) | typedef unsigned char mz_uint8;
  type mz_int16 (line 503) | typedef signed short mz_int16;
  type mz_uint16 (line 504) | typedef unsigned short mz_uint16;
  type mz_uint32 (line 505) | typedef unsigned int mz_uint32;
  type mz_uint (line 506) | typedef unsigned int mz_uint;
  type mz_int64 (line 507) | typedef int64_t mz_int64;
  type mz_uint64 (line 508) | typedef uint64_t mz_uint64;
  type mz_bool (line 509) | typedef int mz_bool;
  type mz_dummy_time_t (line 529) | typedef struct mz_dummy_time_t_tag
  type mz_bool (line 656) | typedef mz_bool (*tdefl_put_buf_func_ptr)(const void *pBuf, int len, voi...
  type tdefl_status (line 699) | typedef enum {
  type tdefl_flush (line 707) | typedef enum {
  type tdefl_compressor (line 715) | typedef struct
  type tinfl_decompressor_tag (line 816) | struct tinfl_decompressor_tag
  type tinfl_decompressor (line 817) | typedef struct tinfl_decompressor_tag tinfl_decompressor;
  type tinfl_status (line 831) | typedef enum {
  type tinfl_huff_table (line 888) | typedef struct
  type mz_uint64 (line 901) | typedef mz_uint64 tinfl_bit_buf_t;
  type mz_uint32 (line 904) | typedef mz_uint32 tinfl_bit_buf_t;
  type tinfl_decompressor_tag (line 908) | struct tinfl_decompressor_tag
  type mz_zip_archive_file_stat (line 940) | typedef struct
  type mz_bool (line 998) | typedef mz_bool (*mz_file_needs_keepalive)(void *pOpaque);
  type mz_zip_internal_state_tag (line 1000) | struct mz_zip_internal_state_tag
  type mz_zip_internal_state (line 1001) | typedef struct mz_zip_internal_state_tag mz_zip_internal_state;
  type mz_zip_mode (line 1003) | typedef enum {
  type mz_zip_flags (line 1010) | typedef enum {
  type mz_zip_type (line 1025) | typedef enum {
  type mz_zip_error (line 1036) | typedef enum {
  type mz_zip_archive (line 1072) | typedef struct
  type mz_zip_reader_extract_iter_state (line 1099) | typedef struct

FILE: src/morph/intr.c
  function AK_EXPORT (line 49) | AK_EXPORT
  function AK_EXPORT (line 68) | AK_EXPORT
  function AK_INLINE (line 105) | AK_INLINE
  function AK_INLINE (line 124) | AK_INLINE
  function AK_INLINE (line 142) | AK_INLINE
  function AK_INLINE (line 162) | AK_INLINE
  function AK_INLINE (line 184) | AK_INLINE
  function AK_INLINE (line 204) | AK_INLINE
  function AK_INLINE (line 221) | AK_INLINE
  function AK_EXPORT (line 236) | AK_EXPORT
  function AK_EXPORT (line 526) | AK_EXPORT
  function AkResult (line 649) | static
  function AK_EXPORT (line 770) | AK_EXPORT
  function AK_EXPORT (line 784) | AK_EXPORT

FILE: src/node/node.c
  function AK_EXPORT (line 25) | AK_EXPORT
  function AK_EXPORT (line 60) | AK_EXPORT
  function AK_EXPORT (line 89) | AK_EXPORT
  function AK_EXPORT (line 105) | AK_EXPORT
  function AK_EXPORT (line 118) | AK_EXPORT
  function AK_EXPORT (line 149) | AK_EXPORT
  function AK_EXPORT (line 174) | AK_EXPORT
  function AK_EXPORT (line 205) | AK_EXPORT
  function AK_EXPORT (line 221) | AK_EXPORT

FILE: src/platform/dylib.c
  function AK_HIDE (line 32) | AK_HIDE
  function AK_HIDE (line 106) | AK_HIDE
  function AK_HIDE (line 133) | AK_HIDE
  function AK_HIDE (line 147) | AK_HIDE

FILE: src/profile.c
  function AkProfile (line 27) | AkProfile*
  function AkProfileType (line 57) | AkProfileType
  function ak_supportedProfiles (line 98) | uint32_t
  function ak_setSupportedProfiles (line 104) | void
  function ak_setPlatform (line 137) | void
  function AK_HIDE (line 142) | AK_HIDE
  function AK_HIDE (line 153) | AK_HIDE
  function AK_EXPORT (line 159) | AK_EXPORT
  function AK_EXPORT (line 174) | AK_EXPORT

FILE: src/resc/path.c
  function AK_EXPORT (line 48) | AK_EXPORT
  function AK_EXPORT (line 54) | AK_EXPORT
  function AK_EXPORT (line 73) | AK_EXPORT
  function AK_EXPORT (line 92) | AK_EXPORT
  function AK_EXPORT (line 138) | AK_EXPORT
  function AK_EXPORT (line 221) | AK_EXPORT

FILE: src/resc/resource.c
  function AK_EXPORT (line 35) | AK_EXPORT
  function AkResource (line 41) | AkResource *
  function ak_resc_ref (line 123) | void
  function ak_resc_unref (line 128) | int
  function ak_resc_unref_url (line 143) | int
  function ak_resc_print (line 166) | void
  function AK_HIDE (line 171) | AK_HIDE
  function AK_HIDE (line 177) | AK_HIDE

FILE: src/resc/resource.h
  type AkResource (line 23) | typedef struct AkResource {

FILE: src/resc/url.c
  function ak_url_init (line 32) | void
  function ak_url_dup (line 57) | void
  function ak_url_init_with_id (line 75) | void
  function ak_url_ref (line 97) | void
  function ak_url_unref (line 105) | void
  function AK_EXPORT (line 116) | AK_EXPORT
  function AK_EXPORT (line 155) | AK_EXPORT
  function AK_EXPORT (line 206) | AK_EXPORT

FILE: src/sid.c
  function AK_EXPORT (line 31) | AK_EXPORT
  function AK_EXPORT (line 46) | AK_EXPORT
  function AK_EXPORT (line 77) | AK_EXPORT
  function AK_EXPORT (line 104) | AK_EXPORT
  function AK_EXPORT (line 158) | AK_EXPORT
  function ak_sid_destroy (line 167) | void
  function AK_HIDE (line 180) | AK_HIDE
  function AK_HIDE (line 298) | AK_HIDE
  function AK_HIDE (line 340) | AK_HIDE
  function AK_HIDE (line 419) | AK_HIDE
  function AK_EXPORT (line 447) | AK_EXPORT
  function AK_EXPORT (line 623) | AK_EXPORT
  function AK_EXPORT (line 642) | AK_EXPORT
  function AK_EXPORT (line 665) | AK_EXPORT
  function AK_HIDE (line 710) | AK_HIDE
  function AK_HIDE (line 720) | AK_HIDE

FILE: src/sid.h
  type AkSidConstrItem (line 22) | typedef struct AkSidConstrItem {
  type AkSidConstr (line 29) | typedef struct AkSidConstr {

FILE: src/sid_constr.c
  function AkSidConstr (line 50) | AkSidConstr*
  function ak_sidConstraintTo (line 64) | void
  function ak_sidInitConstr (line 93) | void

FILE: src/simd/base64.h
  function AK_INLINE (line 24) | AK_INLINE
  function AK_INLINE (line 115) | AK_INLINE

FILE: src/skin/fix.c
  function AkBoneWeights (line 19) | static
  function AK_HIDE (line 49) | AK_HIDE

FILE: src/skin/skin.c
  type AkSkinAccessorPair (line 21) | typedef struct AkSkinAccessorPair {
  type AkSkinInspectPrimitive (line 31) | typedef struct AkSkinInspectPrimitive {
  type AkSkinInspectView (line 39) | typedef struct AkSkinInspectView {
  function AK_INLINE (line 43) | AK_INLINE
  function AK_INLINE (line 58) | AK_INLINE
  function AK_INLINE (line 88) | AK_INLINE
  function AK_INLINE (line 103) | AK_INLINE
  function AkSkinInspectPrimitive (line 177) | static
  function AK_INLINE (line 229) | AK_INLINE
  function AK_INLINE (line 239) | AK_INLINE
  function AK_INLINE (line 259) | AK_INLINE
  function AK_INLINE (line 274) | AK_INLINE
  function AK_INLINE (line 292) | AK_INLINE
  function AK_INLINE (line 305) | AK_INLINE
  function AK_EXPORT (line 347) | AK_EXPORT
  function AK_EXPORT (line 450) | AK_EXPORT
  function AK_EXPORT (line 561) | AK_EXPORT

FILE: src/string.c
  function AK_EXPORT (line 24) | AK_EXPORT
  function AK_EXPORT (line 50) | AK_EXPORT
  function AK_EXPORT (line 95) | AK_EXPORT
  function ak_strtof (line 148) | AK_EXPORT
  function ak_strtof_line (line 192) | AK_EXPORT
  function ak_strtod (line 236) | AK_EXPORT
  function ak_strtoui (line 280) | AK_EXPORT
  function ak_strtoi (line 339) | AK_EXPORT
  function ak_strtoi_line (line 383) | AK_EXPORT
  function ak_strtob (line 427) | AK_EXPORT
  function AK_EXPORT (line 471) | AK_EXPORT
  function AK_EXPORT (line 479) | AK_EXPORT

FILE: src/topo/topo.c
  function AK_HIDE (line 22) | AK_HIDE
  function AK_HIDE (line 152) | AK_HIDE
  function AK_HIDE (line 287) | AK_HIDE

FILE: src/transform/dup.c
  function AK_EXPORT (line 20) | AK_EXPORT

FILE: src/transform/trans.c
  function AK_EXPORT (line 31) | AK_EXPORT
  function AK_EXPORT (line 56) | AK_EXPORT
  function AK_EXPORT (line 148) | AK_EXPORT
  function AK_EXPORT (line 163) | AK_EXPORT

FILE: src/transform/traverse.c
  function AK_EXPORT (line 20) | AK_EXPORT

FILE: src/trash.c
  type AkTrashItem (line 26) | typedef struct AkTrashItem {
  function ak__trash_cmp (line 39) | static
  function AK_EXPORT (line 50) | AK_EXPORT
  function AK_EXPORT (line 71) | AK_EXPORT
  function AK_HIDE (line 84) | AK_HIDE
  function AK_HIDE (line 90) | AK_HIDE

FILE: src/tree.c
  function AK_HIDE (line 23) | AK_HIDE

FILE: src/type.c
  function AK_EXPORT (line 27) | AK_EXPORT
  function AK_EXPORT (line 33) | AK_EXPORT
  function AK_EXPORT (line 42) | AK_EXPORT
  function AK_EXPORT (line 52) | AK_EXPORT
  function AK_EXPORT (line 67) | AK_EXPORT
  function AK_EXPORT (line 73) | AK_EXPORT
  function AK_EXPORT (line 79) | AK_EXPORT
  function AK_HIDE (line 88) | AK_HIDE
  function AK_HIDE (line 106) | AK_HIDE

FILE: src/utils.c
  type tm (line 34) | struct tm
  function AkResult (line 36) | AkResult
  function time_t (line 108) | time_t
  function AK_EXPORT (line 126) | AK_EXPORT
  function AK_HIDE (line 135) | AK_HIDE

FILE: src/win32/dllmain.c
  function BOOL (line 32) | BOOL APIENTRY DllMain(HMODULE hModule,

FILE: src/win32/strptime.c
  type u_char (line 34) | typedef	unsigned char	u_char;
  type tm (line 84) | struct tm
  type tm (line 87) | struct tm
  function u_char (line 508) | static const u_char *
  function strncasecmp (line 536) | static int
  function u_char (line 552) | static const u_char *

FILE: src/xml.c
  function AK_EXPORT (line 20) | AK_EXPORT
  function xml_strtof_fast (line 49) | AK_EXPORT
  function xml_strtoui_fast (line 77) | AK_EXPORT
  function xml_strtoi_fast (line 107) | AK_EXPORT
  function xml_strtob_fast (line 135) | AK_EXPORT
  function AK_EXPORT (line 164) | AK_EXPORT
  function AK_EXPORT (line 191) | AK_EXPORT
  function AK_EXPORT (line 214) | AK_EXPORT
  function AK_EXPORT (line 236) | AK_EXPORT
  function AK_EXPORT (line 249) | AK_EXPORT
  function AK_EXPORT (line 263) | AK_EXPORT

FILE: test/include/common.h
  type test_status_t (line 24) | typedef struct test_status_t {
  type test_status_t (line 29) | typedef test_status_t (*fntest)(void);
  type test_entry_t (line 31) | typedef struct test_entry_t {

FILE: test/runner.c
  function main (line 26) | int

FILE: test/src/collada/test_dae_load.c
  function TEST_IMPL (line 21) | TEST_IMPL(dae_load_folder) {

FILE: test/src/test_memory.c
  function TEST_IMPL (line 23) | TEST_IMPL(heap) {

FILE: test/tests.h
  function TEST_DECLARE (line 28) | TEST_DECLARE(heap)
Condensed preview — 429 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,949K chars).
[
  {
    "path": ".github/FUNDING.yml",
    "chars": 656,
    "preview": "# These are supported funding model platforms\n\ngithub: [recp]\npatreon: recp\nopen_collective: assetkit\nko_fi: # Replace w"
  },
  {
    "path": ".github/__disabled_workflows/cmake.yml",
    "chars": 1422,
    "preview": "name: CMake\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\nenv:\n  # Customize the CMake"
  },
  {
    "path": ".gitignore",
    "chars": 777,
    "preview": "*.xcodeproj\n*.xcworkspace\n*.sln\n*.vcxproj\n*.vcxproj.*\n*.suo\n*.sdf\n*.opensdf\nipch/\nDebug/\nRelease/\n.DS_Store\n.vs\n*.nupkg\n"
  },
  {
    "path": ".gitmodules",
    "chars": 319,
    "preview": "[submodule \"deps/cglm\"]\n\tpath = deps/cglm\n\turl = https://github.com/recp/cglm.git\n[submodule \"deps/json\"]\n\tpath = deps/j"
  },
  {
    "path": ".travis.yml",
    "chars": 914,
    "preview": "language: c\n\nos:\n  - linux\n  - osx\n\nsudo: required\ndist: trusty\n\ncompiler:\n  - clang\n  - gcc\n\nmatrix:\n  fast_finish: tru"
  },
  {
    "path": "CMakeLists.txt",
    "chars": 22962,
    "preview": "cmake_minimum_required(VERSION 3.16)\nproject(assetkit VERSION 0.3.2 LANGUAGES C)\n\nif(POLICY CMP0076)\n  cmake_policy(SET "
  },
  {
    "path": "EXTENSIONS.md",
    "chars": 2068,
    "preview": "# Extensions\n\nAssetKit handles glTF extensions in three ways:\n\n- Typed support for extensions that affect AssetKit's run"
  },
  {
    "path": "EXTRAS.md",
    "chars": 1502,
    "preview": "# Extras\n\nAssetKit preserves source-format metadata that it does not need to interpret\ndirectly.\n\n- COLLADA: `<extra>`\n-"
  },
  {
    "path": "LICENSE",
    "chars": 11360,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.md",
    "chars": 9860,
    "preview": "<p align=\"center\">\n   <img alt=\"\" src=\"assetkit.png\" width=\"550\" />\n</p>\n<br>\n\n<p align=\"center\">\n    <a href=\"https://g"
  },
  {
    "path": "appveyor.yml",
    "chars": 78,
    "preview": "image: Visual Studio 2017\n\nbuild_script:\n- ps: >-\n    cd win\n\n    .\\build.bat\n"
  },
  {
    "path": "docs/make.bat",
    "chars": 806,
    "preview": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=py"
  },
  {
    "path": "docs/source/api.rst",
    "chars": 122,
    "preview": "API documentation\n================================\n\n.. toctree::\n   :maxdepth: 1\n   :caption: API categories:\n\n   versio"
  },
  {
    "path": "docs/source/build.rst",
    "chars": 3981,
    "preview": "Build AssetKit\n================================\n\n| **AssetKit** core uses bundled submodules. Optional glTF decoder side"
  },
  {
    "path": "docs/source/conf.py",
    "chars": 5868,
    "preview": "# -*- coding: utf-8 -*-\n#\n# AssetKit documentation build configuration file, created by\n# sphinx-quickstart on Tue Jun  "
  },
  {
    "path": "docs/source/getting_started.rst",
    "chars": 324,
    "preview": "Getting Started\n================================\n\nThere are lot of file formats out there. It is not easy to implement e"
  },
  {
    "path": "docs/source/index.rst",
    "chars": 2603,
    "preview": ".. cglm documentation master file, created by\n   sphinx-quickstart on Tue Jun  6 20:31:05 2017.\n   You can adapt this fi"
  },
  {
    "path": "docs/source/opt.rst",
    "chars": 4463,
    "preview": ".. default-domain:: C\n\nOptions\n===============================================================================\n\nCurrentl"
  },
  {
    "path": "docs/source/quick_intro.rst",
    "chars": 8514,
    "preview": "Quick Implementation\n===================================\n\nAssuming you already followed Build instructions and Getting S"
  },
  {
    "path": "docs/source/version.rst",
    "chars": 487,
    "preview": ".. default-domain:: C\n\nversion\n================================================================================\n\nHeader:"
  },
  {
    "path": "include/ak/animation.h",
    "chars": 11190,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/assetkit.h",
    "chars": 14764,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/bbox.h",
    "chars": 2031,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/cam.h",
    "chars": 4879,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/common.h",
    "chars": 3956,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/context.h",
    "chars": 1072,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/controller.h",
    "chars": 20507,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/coord-util.h",
    "chars": 1306,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/coord.h",
    "chars": 4286,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/core-types.h",
    "chars": 2617,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/geom.h",
    "chars": 12638,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/gsplat.h",
    "chars": 4453,
    "preview": "/*\n * Copyright (C) 2026 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/image.h",
    "chars": 3307,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/instance.h",
    "chars": 2371,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/library.h",
    "chars": 1497,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/light.h",
    "chars": 2872,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/map.h",
    "chars": 1615,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/material.h",
    "chars": 7040,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/memory.h",
    "chars": 9786,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/node.h",
    "chars": 7050,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/options.h",
    "chars": 3450,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/path.h",
    "chars": 1420,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/profile.h",
    "chars": 2387,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/sid.h",
    "chars": 1850,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/source.h",
    "chars": 5742,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/string.h",
    "chars": 2688,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/texture.h",
    "chars": 4135,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/transform.h",
    "chars": 2900,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/trash.h",
    "chars": 852,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/type.h",
    "chars": 2835,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/url.h",
    "chars": 1454,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/util.h",
    "chars": 882,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "include/ak/version.h",
    "chars": 773,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "scripts/strpool.py",
    "chars": 879,
    "preview": "#!/usr/bin/python3\n#\n# Copyright (C) 2020 Recep Aslantas\n#\n# Licensed under the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "src/CMakeLists.txt",
    "chars": 698,
    "preview": "FILE(GLOB CSources *.h *.c)\ntarget_sources(${PROJECT_NAME} \n  PRIVATE\n  ${CSources}\n)\n\nadd_subdirectory(anim)\nadd_subdir"
  },
  {
    "path": "src/accessor.c",
    "chars": 5083,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/accessor.h",
    "chars": 1178,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/anim/CMakeLists.txt",
    "chars": 85,
    "preview": "FILE(GLOB CSources *.h *.c)\ntarget_sources(${PROJECT_NAME}\n  PRIVATE\n  ${CSources}\n)\n"
  },
  {
    "path": "src/anim/bake.c",
    "chars": 15563,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/anim/conflict.c",
    "chars": 5274,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/array.c",
    "chars": 4435,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/array.h",
    "chars": 1300,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/asset.c",
    "chars": 3189,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/assetkit.c",
    "chars": 2733,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/base64.c",
    "chars": 8327,
    "preview": "/*\n * Base64 encoding/decoding (RFC1341)\n * Copyright (c) 2005-2011, Jouni Malinen <j@w1.fi>\n *\n * This software may be "
  },
  {
    "path": "src/base64.h",
    "chars": 1112,
    "preview": "/*\n * Base64 encoding/decoding (RFC1341)\n * Copyright (c) 2005, Jouni Malinen <j@w1.fi>\n *\n * This software may be distr"
  },
  {
    "path": "src/bbox/CMakeLists.txt",
    "chars": 104,
    "preview": "target_sources(${PROJECT_NAME} \n  PRIVATE\n  bbox.h\n  bbox.c\n  geom.c\n  mesh_prim.c\n  mesh.c\n  scene.c\n)\n"
  },
  {
    "path": "src/bbox/bbox.c",
    "chars": 1532,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/bbox/bbox.h",
    "chars": 1185,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/bbox/geom.c",
    "chars": 957,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/bbox/mesh.c",
    "chars": 1583,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/bbox/mesh_prim.c",
    "chars": 3528,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/bbox/scene.c",
    "chars": 3329,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/bitwise/CMakeLists.txt",
    "chars": 56,
    "preview": "target_sources(${PROJECT_NAME} \n  PRIVATE\n  bitwise.h\n)\n"
  },
  {
    "path": "src/bitwise/bitwise.h",
    "chars": 1222,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/camera/CMakeLists.txt",
    "chars": 52,
    "preview": "target_sources(${PROJECT_NAME} \n  PRIVATE\n  cam.c\n)\n"
  },
  {
    "path": "src/camera/cam.c",
    "chars": 5671,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/common.c",
    "chars": 1140,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/common.h",
    "chars": 2868,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/CMakeLists.txt",
    "chars": 162,
    "preview": "target_sources(${PROJECT_NAME} \n  PRIVATE\n  camera.c\n  common.h\n  common.c\n  doc.c\n  geom.c\n  mesh.c\n  node.c\n  scene.c\n"
  },
  {
    "path": "src/coord/camera.c",
    "chars": 5468,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/common.c",
    "chars": 1533,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/common.h",
    "chars": 4572,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/doc.c",
    "chars": 1043,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/geom.c",
    "chars": 1044,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/mesh.c",
    "chars": 2043,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/node.c",
    "chars": 4300,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/scene.c",
    "chars": 1379,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/transform.c",
    "chars": 5513,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/transforms.c",
    "chars": 3212,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/coord/vector.c",
    "chars": 1843,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/data.c",
    "chars": 3644,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/data.h",
    "chars": 2641,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/decoders/gltf/draco/assetkit_draco.cc",
    "chars": 13086,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/decoders/gltf/ktx2/assetkit_ktx2.cc",
    "chars": 7567,
    "preview": "/*\n * Copyright (C) 2026 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/decoders/gltf/meshopt/assetkit_meshoptimizer.cc",
    "chars": 3287,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/decoders/gltf/spz/assetkit_spz.cc",
    "chars": 15266,
    "preview": "/*\n * Copyright (C) 2026 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/CMakeLists.txt",
    "chars": 191,
    "preview": "target_sources(${PROJECT_NAME} \n  PRIVATE\n  semantic.h\n  type.c\n  type.h\n  opt.c\n  opt.h\n  semantic.c\n  material.c\n  mat"
  },
  {
    "path": "src/default/cam.c",
    "chars": 1095,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/cam.h",
    "chars": 735,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/cmp.c",
    "chars": 2141,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/coord.c",
    "chars": 1245,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/id.c",
    "chars": 665,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/light.c",
    "chars": 1021,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/light.h",
    "chars": 739,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/material.c",
    "chars": 871,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/material.h",
    "chars": 760,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/opt.c",
    "chars": 3846,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/opt.h",
    "chars": 781,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/semantic.c",
    "chars": 2403,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/semantic.h",
    "chars": 935,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/type.c",
    "chars": 2943,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/default/type.h",
    "chars": 742,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/endian.h",
    "chars": 9497,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/find.c",
    "chars": 1455,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/geom/CMakeLists.txt",
    "chars": 53,
    "preview": "target_sources(${PROJECT_NAME} \n  PRIVATE\n  mesh.c\n)\n"
  },
  {
    "path": "src/geom/mesh.c",
    "chars": 879,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/id.c",
    "chars": 2692,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/id.h",
    "chars": 884,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/image/CMakeLists.txt",
    "chars": 54,
    "preview": "target_sources(${PROJECT_NAME} \n  PRIVATE\n  image.c\n)\n"
  },
  {
    "path": "src/image/image.c",
    "chars": 2418,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/instance/CMakeLists.txt",
    "chars": 62,
    "preview": "target_sources(${PROJECT_NAME} \n  PRIVATE\n  inst.c\n  list.c\n)\n"
  },
  {
    "path": "src/instance/inst.c",
    "chars": 5647,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/instance/list.c",
    "chars": 3002,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/3mf/CMakeLists.txt",
    "chars": 109,
    "preview": "FILE(GLOB CSources *.h *.c)\ntarget_sources(${PROJECT_NAME} \n  PRIVATE\n  ${CSources}\n)\n\nadd_subdirectory(imp)\n"
  },
  {
    "path": "src/io/3mf/README.md",
    "chars": 38,
    "preview": "# AssetKit: 3mf Status\n\n- [ ] 3mf XML\n"
  },
  {
    "path": "src/io/3mf/imp/3mf.c",
    "chars": 7023,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/3mf/imp/3mf.h",
    "chars": 763,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/3mf/imp/CMakeLists.txt",
    "chars": 86,
    "preview": "FILE(GLOB CSources *.h *.c)\ntarget_sources(${PROJECT_NAME} \n  PRIVATE\n  ${CSources}\n)\n"
  },
  {
    "path": "src/io/3mf/imp/common.h",
    "chars": 1100,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/CMakeLists.txt",
    "chars": 158,
    "preview": "add_subdirectory(common)\nadd_subdirectory(dae)\nadd_subdirectory(gltf)\nadd_subdirectory(obj)\nadd_subdirectory(stl)\nadd_su"
  },
  {
    "path": "src/io/common/CMakeLists.txt",
    "chars": 86,
    "preview": "FILE(GLOB CSources *.h *.c)\ntarget_sources(${PROJECT_NAME} \n  PRIVATE\n  ${CSources}\n)\n"
  },
  {
    "path": "src/io/common/postscript.c",
    "chars": 1831,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/common/postscript.h",
    "chars": 781,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/common/util.c",
    "chars": 4466,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/common/util.h",
    "chars": 2011,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/1.4/CMakeLists.txt",
    "chars": 86,
    "preview": "FILE(GLOB CSources *.h *.c)\ntarget_sources(${PROJECT_NAME} \n  PRIVATE\n  ${CSources}\n)\n"
  },
  {
    "path": "src/io/dae/1.4/dae14.c",
    "chars": 4946,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/1.4/dae14.h",
    "chars": 1818,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/1.4/image.c",
    "chars": 2297,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/1.4/image.h",
    "chars": 854,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/1.4/surface.c",
    "chars": 3495,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/1.4/surface.h",
    "chars": 866,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/CMakeLists.txt",
    "chars": 224,
    "preview": "FILE(GLOB CSources *.h *.c)\ntarget_sources(${PROJECT_NAME} \n  PRIVATE\n  ${CSources}\n)\n\nadd_subdirectory(core)\nadd_subdir"
  },
  {
    "path": "src/io/dae/README.md",
    "chars": 1592,
    "preview": "# AssetKit: COLLADA Status\n\n- [x] Single Interface for glTF and COLLADA\n- [x] COLLADA 1.4 / 1.4.1\n- [x] COLLADA 1.5\n- [x"
  },
  {
    "path": "src/io/dae/brep/CMakeLists.txt",
    "chars": 86,
    "preview": "FILE(GLOB CSources *.h *.c)\ntarget_sources(${PROJECT_NAME} \n  PRIVATE\n  ${CSources}\n)\n"
  },
  {
    "path": "src/io/dae/brep/brep.c",
    "chars": 2456,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/brep/brep.h",
    "chars": 826,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/brep/curve.c",
    "chars": 5249,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/brep/curve.h",
    "chars": 975,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/brep/nurb.c",
    "chars": 2767,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/brep/nurb.h",
    "chars": 997,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/brep/surface.c",
    "chars": 6564,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/brep/surface.h",
    "chars": 997,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/brep/topology.c",
    "chars": 13571,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/brep/topology.h",
    "chars": 1520,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/bugfix/CMakeLists.txt",
    "chars": 86,
    "preview": "FILE(GLOB CSources *.h *.c)\ntarget_sources(${PROJECT_NAME} \n  PRIVATE\n  ${CSources}\n)\n"
  },
  {
    "path": "src/io/dae/bugfix/scenekit.c",
    "chars": 7387,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/bugfix/scenekit.h",
    "chars": 796,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/bugfix/transp.c",
    "chars": 1352,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/bugfix/transp.h",
    "chars": 786,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/bugfix/url.h",
    "chars": 2910,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/common.h",
    "chars": 6418,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/CMakeLists.txt",
    "chars": 86,
    "preview": "FILE(GLOB CSources *.h *.c)\ntarget_sources(${PROJECT_NAME} \n  PRIVATE\n  ${CSources}\n)\n"
  },
  {
    "path": "src/io/dae/core/anim.c",
    "chars": 4868,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/anim.h",
    "chars": 1110,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/asset.c",
    "chars": 4354,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/asset.h",
    "chars": 874,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/cam.c",
    "chars": 6179,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/cam.h",
    "chars": 819,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/color.c",
    "chars": 1370,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/color.h",
    "chars": 903,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/ctlr.c",
    "chars": 1609,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/ctlr.h",
    "chars": 834,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/enum.c",
    "chars": 9775,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/enum.h",
    "chars": 1560,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/geom.c",
    "chars": 1871,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/geom.h",
    "chars": 828,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/light.c",
    "chars": 5607,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/light.h",
    "chars": 822,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/line.c",
    "chars": 3130,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/line.h",
    "chars": 863,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/mesh.c",
    "chars": 3253,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/mesh.h",
    "chars": 826,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/morph.c",
    "chars": 2888,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/morph.h",
    "chars": 825,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/node.c",
    "chars": 10176,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/node.h",
    "chars": 1004,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/param.c",
    "chars": 1551,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/param.h",
    "chars": 968,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/poly.c",
    "chars": 4727,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/poly.h",
    "chars": 964,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/scene.c",
    "chars": 6139,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/scene.h",
    "chars": 1082,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/skin.c",
    "chars": 6569,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/skin.h",
    "chars": 818,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/source.c",
    "chars": 7660,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/source.h",
    "chars": 912,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/spline.c",
    "chars": 1585,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  },
  {
    "path": "src/io/dae/core/spline.h",
    "chars": 838,
    "preview": "/*\n * Copyright (C) 2020 Recep Aslantas\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may"
  }
]

// ... and 229 more files (download for full content)

About this extraction

This page contains the full source code of the recp/AssetKit GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 429 files (1.8 MB), approximately 520.9k tokens, and a symbol index with 1405 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!