Migrate mjModel size fields from int to mjtSize.
This change updates all size-related members within the `mjModel` struct from `int` to `mjtSize`. This allows MuJoCo to handle models with a larger number of elements. Corresponding changes were made to macros, function signatures, and I/O routines to accommodate the new `mjtSize` type. PiperOrigin-RevId: 860144595 Change-Id: I701c6d607715d240766b6210a9773cd9e4258c59
This commit is contained in:
committed by
Copybara-Service
parent
4a64017a5f
commit
30b903b6c0
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "render/render_context.h"
|
||||
|
||||
#include <inttypes.h> // IWYU pragma: keep
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -1308,7 +1309,7 @@ static void makeMaterial(const mjModel* m, mjrContext* con) {
|
||||
for (int i=0; i < m->ntex; i++) {
|
||||
if (m->tex_type[i] == mjTEXTURE_SKYBOX) {
|
||||
if (m->nmat >= mjMAXMATERIAL-2) {
|
||||
mju_error("With skybox, maximum number of materials is %d, got %d",
|
||||
mju_error("With skybox, maximum number of materials is %d, got %" PRId64,
|
||||
mjMAXMATERIAL-1, m->nmat);
|
||||
}
|
||||
for (int j=0; j < mjNTEXROLE; j++) {
|
||||
@@ -1321,7 +1322,7 @@ static void makeMaterial(const mjModel* m, mjrContext* con) {
|
||||
}
|
||||
|
||||
if (m->nmat >= mjMAXMATERIAL-1) {
|
||||
mju_error("Maximum number of materials is %d, got %d", mjMAXMATERIAL, m->nmat);
|
||||
mju_error("Maximum number of materials is %d, got %" PRId64, mjMAXMATERIAL, m->nmat);
|
||||
}
|
||||
for (int i=0; i < m->nmat; i++) {
|
||||
if (m->mat_texid[i*mjNTEXROLE + mjTEXROLE_RGB] >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user