Move mjCSite attributes to mjmSite struct.
PiperOrigin-RevId: 603051589 Change-Id: I31eeeccffa15b96e7393b8e64f6be8c964fc5948
This commit is contained in:
committed by
Copybara-Service
parent
fae1f3e56d
commit
7a98038e88
@@ -651,7 +651,7 @@ void mjCModel::MakeLists(mjCBody* body) {
|
||||
|
||||
// delete material with given name or all materials if the name is omitted
|
||||
template <class T>
|
||||
static void DeleteMaterial(std::vector<T*>& list, std::string_view name = "") {
|
||||
void mjCModel::DeleteMaterial(std::vector<T*>& list, std::string_view name) {
|
||||
for (T* plist : list) {
|
||||
if (name.empty() || plist->material == name) {
|
||||
plist->material.clear();
|
||||
@@ -660,6 +660,7 @@ static void DeleteMaterial(std::vector<T*>& list, std::string_view name = "") {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// delete texture with given name or all textures if the name is omitted
|
||||
template <class T>
|
||||
static void DeleteTexture(std::vector<T*>& list, std::string_view name = "") {
|
||||
@@ -2900,7 +2901,7 @@ void mjCModel::TryCompile(mjModel*& m, mjData*& d, const mjVFS* vfs) {
|
||||
if (nuser_site == -1) {
|
||||
nuser_site = 0;
|
||||
for (int i=0; i<sites.size(); i++) {
|
||||
nuser_site = mjMAX(nuser_site, sites[i]->userdata.size());
|
||||
nuser_site = mjMAX(nuser_site, sites[i]->spec.userdata.size());
|
||||
}
|
||||
}
|
||||
if (nuser_cam == -1) {
|
||||
|
||||
Reference in New Issue
Block a user