Use num_ prefix consistently in API.

PiperOrigin-RevId: 932391786
Change-Id: I71c7f300fdb84ce1129ea3da6336df2fcffc5712
This commit is contained in:
Haroon Qureshi
2026-06-15 05:07:58 -07:00
committed by Copybara-Service
parent 7c22920720
commit 9e45ce9801
9 changed files with 37 additions and 37 deletions
@@ -125,8 +125,8 @@ static void UpdateSkinFlexMeshData(mjrfMeshData* data, const mjModel* model,
data->attributes[2].usage = mjVERTEX_ATTRIBUTE_USAGE_UV;
data->attributes[2].type = mjVERTEX_ATTRIBUTE_TYPE_FLOAT2;
data->attributes[2].bytes = uvs.data();
data->nvertices = positions.size() / 3;
data->nindices = num_indices;
data->num_vertices = positions.size() / 3;
data->num_indices = num_indices;
data->indices = indices.data();
data->index_type = mjINDEX_TYPE_U32;
data->primitive_type = mjMESH_PRIMITIVE_TYPE_TRIANGLES;
+4 -4
View File
@@ -99,7 +99,7 @@ uintptr_t ImguiBridge::UploadImage(uintptr_t tex_id, const uint8_t* pixels,
mjrfTextureData texture_data;
mjrf_defaultTextureData(&texture_data);
texture_data.bytes = bytes;
texture_data.nbytes = num_bytes;
texture_data.num_bytes = num_bytes;
texture_data.user_data = bytes;
texture_data.release = callback;
@@ -136,7 +136,7 @@ void ImguiBridge::UpdateTexture(ImTextureData* data) {
mjrfTextureData texture_data;
mjrf_defaultTextureData(&texture_data);
texture_data.bytes = data->GetPixels();
texture_data.nbytes = data->Width * data->Height * 4;
texture_data.num_bytes = data->Width * data->Height * 4;
texture_data.user_data = nullptr;
texture_data.release = nullptr;
mjrf_setTextureData(iter->second.get(), &texture_data);
@@ -232,8 +232,8 @@ void ImguiBridge::Update() {
data.attributes[2].type = mjVERTEX_ATTRIBUTE_TYPE_UBYTE4;
data.attributes[2].bytes = cmds->VtxBuffer.Data + sizeof(float) * 4;
data.interleaved = true;
data.nvertices = cmds->VtxBuffer.Size;
data.nindices = cmds->IdxBuffer.Size;
data.num_vertices = cmds->VtxBuffer.Size;
data.num_indices = cmds->IdxBuffer.Size;
data.indices = cmds->IdxBuffer.Data;
data.index_type = mjINDEX_TYPE_U16;
data.primitive_type = mjMESH_PRIMITIVE_TYPE_TRIANGLES;