Fixes to documentation:
1. Cleaned up changelog, fixed some typos, removed nested admonitions. 2. Added missing documentation for `mjfResourceModified` function type. PiperOrigin-RevId: 562859015 Change-Id: I34dc4f3131561cbe95be3127e6e318cc4b803a24
This commit is contained in:
committed by
Copybara-Service
parent
4929077211
commit
ba66bd4f8b
@@ -1174,6 +1174,20 @@ mjfGetResourceDir
|
|||||||
This callback is for returning the directory of a resource, by setting dir to the directory string with ndir being size
|
This callback is for returning the directory of a resource, by setting dir to the directory string with ndir being size
|
||||||
of directory string.
|
of directory string.
|
||||||
|
|
||||||
|
.. _mjfResourceModified:
|
||||||
|
|
||||||
|
mjfResourceModified
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. code-block:: C
|
||||||
|
|
||||||
|
typedef int (*mjfResourceModified)(const mjResource* resource);
|
||||||
|
|
||||||
|
This callback is for checking if a resource was modified since it was last read.
|
||||||
|
Returns positive value if the resource was modified since last open, 0 if resource was not modified,
|
||||||
|
and negative value if inconclusive.
|
||||||
|
|
||||||
|
|
||||||
.. _tyNotes:
|
.. _tyNotes:
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
|
|||||||
+8
-14
@@ -28,7 +28,8 @@ New features
|
|||||||
- Added new SDF plugin for defining implicit geometries. The plugin must define methods computing an SDF and its
|
- Added new SDF plugin for defining implicit geometries. The plugin must define methods computing an SDF and its
|
||||||
gradient at query points See the :ref:`documentation<exWriting>` for more details.
|
gradient at query points See the :ref:`documentation<exWriting>` for more details.
|
||||||
|
|
||||||
3. Added :ref:`mjThreadPool` and :ref:`mjTask` which allow for multi-threaded operations within MuJoCo engine pipeline.
|
3. Added :ref:`mjThreadPool` and :ref:`mjTask` which allow for multi-threaded operations within the MuJoCo engine
|
||||||
|
pipeline.
|
||||||
|
|
||||||
General
|
General
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
@@ -36,23 +37,16 @@ General
|
|||||||
.. admonition:: Breaking API changes
|
.. admonition:: Breaking API changes
|
||||||
:class: attention
|
:class: attention
|
||||||
|
|
||||||
4. Removed macros ``mjMARKSTACK`` and ``mjFREESTACK``.
|
4. Removed the macros ``mjMARKSTACK`` and ``mjFREESTACK``.
|
||||||
|
|
||||||
.. admonition:: Migration note
|
**Migration:** These macros have been replaced by new functions :ref:`mj_markStack` and
|
||||||
:class: note
|
:ref:`mj_freeStack`. These functions manage the :ref:`mjData stack<siStack>` in a fully encapsulated way (i.e.,
|
||||||
|
without introducing a local variable at the call site).
|
||||||
These macros have been replaced by new functions :ref:`mj_markStack` and :ref:`mj_freeStack`. These functions
|
|
||||||
manages ``mjData`` stack frames in a fully encapsulated way (i.e. without having to introduce a local variable
|
|
||||||
at the call site).
|
|
||||||
|
|
||||||
5. Changed the function :ref:`mj_stackAlloc` to allocate an arbitrary number of bytes, rather than in multiples of
|
5. Changed the function :ref:`mj_stackAlloc` to allocate an arbitrary number of bytes, rather than in multiples of
|
||||||
``sizeof(mjtNum)``, and add an additional argument for specifying the alignment of the returned pointer.
|
``sizeof(mjtNum)``, and added an additional argument for specifying the alignment of the returned pointer.
|
||||||
|
|
||||||
.. admonition:: Migration note
|
**Migration:** The functionality for allocating ``mjtNum`` arrays is available via :ref:`mj_stackAllocNum`.
|
||||||
:class: note
|
|
||||||
|
|
||||||
The old functionality for allocating ``mjtNum`` arrays is still available through a new function
|
|
||||||
:ref:`mj_stackAllocNum`.
|
|
||||||
|
|
||||||
6. Renamed the ``nstack`` field in :ref:`mjModel` and :ref:`mjData` to ``narena``. Changed ``narena``, ``pstack``,
|
6. Renamed the ``nstack`` field in :ref:`mjModel` and :ref:`mjData` to ``narena``. Changed ``narena``, ``pstack``,
|
||||||
and ``maxuse_stack`` to count number of bytes rather than number of :ref:`mjtNum` |-| s.
|
and ``maxuse_stack`` to count number of bytes rather than number of :ref:`mjtNum` |-| s.
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ Resource prefix
|
|||||||
Callbacks
|
Callbacks
|
||||||
There are three callbacks that a resource provider is required to implement: :ref:`open<mjfOpenResource>`,
|
There are three callbacks that a resource provider is required to implement: :ref:`open<mjfOpenResource>`,
|
||||||
:ref:`read<mjfReadResource>`, and :ref:`close<mjfCloseResource>`. The other two callback
|
:ref:`read<mjfReadResource>`, and :ref:`close<mjfCloseResource>`. The other two callback
|
||||||
:ref:`getdir<mjfGetResourceDir>` and :ref:`modified<mjfModifiedResource>` are optional. More details on these callbacks
|
:ref:`getdir<mjfGetResourceDir>` and :ref:`modified<mjfResourceModified>` are optional. More details on these callbacks
|
||||||
are given below.
|
are given below.
|
||||||
|
|
||||||
Data Pointer
|
Data Pointer
|
||||||
@@ -352,7 +352,7 @@ Resource providers work via callbacks:
|
|||||||
- :ref:`mjfGetResourceDir<mjfGetResourceDir>`: This callback is optional and is used to extract the directory from a
|
- :ref:`mjfGetResourceDir<mjfGetResourceDir>`: This callback is optional and is used to extract the directory from a
|
||||||
resource name. For example, the resource name ``http://www.example.com/myasset.obj`` would have
|
resource name. For example, the resource name ``http://www.example.com/myasset.obj`` would have
|
||||||
``http://www.example.com/`` as its directory.
|
``http://www.example.com/`` as its directory.
|
||||||
- :ref:`mjfModifiedResource<mjfModifiedResource>`: This callback is optional and is used to check if an existing
|
- :ref:`mjfResourceModified<mjfResourceModified>`: This callback is optional and is used to check if an existing
|
||||||
opened resource has been modifed from its orginal source.
|
opened resource has been modifed from its orginal source.
|
||||||
|
|
||||||
.. _exProviderUsage:
|
.. _exProviderUsage:
|
||||||
|
|||||||
Reference in New Issue
Block a user