File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,27 @@ PYBIND11_MODULE(_functions, pymodule) {
52
52
// Virtual file system
53
53
// Skipped entire section
54
54
55
+ // Asset cache
56
+ Def<traits::mj_getCacheSize>(pymodule, [](void * cache) {
57
+ return mj_getCacheSize (static_cast <mjCache*>(cache));
58
+ });
59
+
60
+ Def<traits::mj_getCacheCapacity>(pymodule, [](void * cache) {
61
+ return mj_getCacheCapacity (static_cast <mjCache*>(cache));
62
+ });
63
+
64
+ Def<traits::mj_setCacheCapacity>(pymodule, [](void * cache, std::size_t size) {
65
+ return mj_setCacheCapacity (static_cast <mjCache*>(cache), size);
66
+ });
67
+
68
+ Def<traits::mj_getCache>(pymodule, []() {
69
+ return static_cast <void *>(mj_getCache ());
70
+ });
71
+
72
+ Def<traits::mj_clearCache>(pymodule, [](void * cache) {
73
+ return mj_clearCache (static_cast <mjCache*>(cache));
74
+ });
75
+
55
76
// Parse and compile
56
77
// Skipped: mj_loadXML (have MjModel.from_xml_string)
57
78
DEF_WITH_OMITTED_PY_ARGS (traits::mj_saveLastXML, " error" , " error_sz" )(
Original file line number Diff line number Diff line change 16
16
17
17
#include < Python.h>
18
18
19
+ #include < cstddef>
19
20
#include < cstdint>
20
21
#include < ios>
21
22
#include < iostream>
You can’t perform that action at this time.
0 commit comments