Remove mjCPlugin from xml_native_reader.
PiperOrigin-RevId: 608546883 Change-Id: Ib529c2756102e4e2185d1d8e9585187c30049011
This commit is contained in:
committed by
Copybara-Service
parent
b56d4bf8a5
commit
78dc5aee9f
+15
-2
@@ -13,7 +13,10 @@
|
||||
// limitations under the License.
|
||||
|
||||
#include "user/user_api.h"
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <mujoco/mujoco.h>
|
||||
@@ -318,8 +321,8 @@ mjmKey* mjm_addKey(mjmModel* model) {
|
||||
mjmPlugin* mjm_addPlugin(mjmModel* model) {
|
||||
mjCModel* modelC = reinterpret_cast<mjCModel*>(model->element);
|
||||
mjCPlugin* plugin = modelC->AddPlugin();
|
||||
plugin->plugin.instance = (mjElement)plugin;
|
||||
return &plugin->plugin;
|
||||
plugin->spec.instance = (mjElement)plugin;
|
||||
return &plugin->spec;
|
||||
}
|
||||
|
||||
|
||||
@@ -508,6 +511,16 @@ const double* mjm_getDouble(const mjDoubleVec source, int* size) {
|
||||
|
||||
|
||||
|
||||
// set plugin attributes
|
||||
void mjm_setPluginAttributes(mjmPlugin* plugin, void* attributes) {
|
||||
mjCPlugin* pluginC = reinterpret_cast<mjCPlugin*>(plugin->instance);
|
||||
std::map<std::string, std::string, std::less<>>* config_attribs =
|
||||
reinterpret_cast<std::map<std::string, std::string, std::less<>>*>(attributes);
|
||||
pluginC->config_attribs = std::move(*config_attribs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute full inertia
|
||||
const char* mjm_setFullInertia(mjmBody* bodyspec, double quat[4], double inertia[3]) {
|
||||
mjCBody* body = reinterpret_cast<mjCBody*>(bodyspec->element);
|
||||
|
||||
Reference in New Issue
Block a user