Add missing documentation for the asset cache.
Also improve `compile` sample timing logic and documentation. PiperOrigin-RevId: 852855741 Change-Id: I9b2798208198ca68cf4cee9c968772954ada91c5
This commit is contained in:
committed by
Copybara-Service
parent
4a21b0ee01
commit
4830f5a79e
@@ -28,6 +28,7 @@ API function can be classified as:
|
||||
- :ref:`Ray casting<Raycollisions>`.
|
||||
- :ref:`Printing<Printing>` of various quantities.
|
||||
- :ref:`Virtual file system<Virtualfilesystem>`, used to load assets from memory.
|
||||
- :ref:`Asset cache<Assetcache>`, used to speed up model compilation.
|
||||
- :ref:`Initialization<Initialization>` of data structures.
|
||||
- :ref:`Error and memory<Errorandmemory>`.
|
||||
- :ref:`Miscellaneous<Miscellaneous>` functions.
|
||||
|
||||
@@ -1359,12 +1359,6 @@ Add file to VFS. The directory argument is optional and can be NULL or empty. Re
|
||||
|
||||
*Nullable:* ``directory``
|
||||
|
||||
|
||||
.. Assetcache:
|
||||
|
||||
The asset cache is a mechanism for caching assets (e.g. textures, meshes, etc.) to avoid repeated slow recompilation.
|
||||
The following methods provide way to control the capacity of the cache or to disable it altogether.
|
||||
|
||||
.. _mj_addBufferVFS:
|
||||
|
||||
`mj_addBufferVFS <#mj_addBufferVFS>`__
|
||||
@@ -1392,6 +1386,59 @@ Delete file from VFS, return 0: success, -1: not found in VFS.
|
||||
|
||||
Delete all files from VFS and deallocates VFS internal memory.
|
||||
|
||||
.. _Assetcache:
|
||||
|
||||
Asset cache
|
||||
^^^^^^^^^^^
|
||||
|
||||
The asset cache is a mechanism for caching assets (e.g. textures, meshes, etc.) to avoid repeated slow recompilation.
|
||||
The following methods provide way to control the capacity of the cache or to disable it altogether.
|
||||
|
||||
.. _mj_getCacheSize:
|
||||
|
||||
`mj_getCacheSize <#mj_getCacheSize>`__
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mj_getCacheSize
|
||||
|
||||
Get the current size of the asset cache in bytes.
|
||||
|
||||
.. _mj_getCacheCapacity:
|
||||
|
||||
`mj_getCacheCapacity <#mj_getCacheCapacity>`__
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mj_getCacheCapacity
|
||||
|
||||
Get the capacity of the asset cache in bytes.
|
||||
|
||||
.. _mj_setCacheCapacity:
|
||||
|
||||
`mj_setCacheCapacity <#mj_setCacheCapacity>`__
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mj_setCacheCapacity
|
||||
|
||||
Set the capacity of the asset cache in bytes (0 to disable); returns the new capacity.
|
||||
|
||||
.. _mj_getCache:
|
||||
|
||||
`mj_getCache <#mj_getCache>`__
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mj_getCache
|
||||
|
||||
Get the internal asset cache used by the compiler.
|
||||
|
||||
.. _mj_clearCache:
|
||||
|
||||
`mj_clearCache <#mj_clearCache>`__
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mj_clearCache
|
||||
|
||||
Clear the asset cache.
|
||||
|
||||
.. _Initialization:
|
||||
|
||||
Initialization
|
||||
|
||||
@@ -25,8 +25,7 @@ Add file to VFS. The directory argument is optional and can be NULL or empty. Re
|
||||
|
||||
*Nullable:* ``directory``
|
||||
|
||||
|
||||
.. Assetcache:
|
||||
.. _Assetcache:
|
||||
|
||||
The asset cache is a mechanism for caching assets (e.g. textures, meshes, etc.) to avoid repeated slow recompilation.
|
||||
The following methods provide way to control the capacity of the cache or to disable it altogether.
|
||||
|
||||
Reference in New Issue
Block a user