Add mjmTexture to C API.
PiperOrigin-RevId: 606543622 Change-Id: I2db743c1c40116f0503329fb1d004d9b041e83e7
This commit is contained in:
committed by
Copybara-Service
parent
47bb4a828e
commit
06505f49f9
@@ -15,6 +15,7 @@
|
||||
#include <cstring>
|
||||
#include <mujoco/mjmodel.h>
|
||||
#include <mujoco/mujoco.h>
|
||||
#include "cc/array_safety.h"
|
||||
#include "user/user_api.h"
|
||||
#include "user/user_util.h"
|
||||
|
||||
@@ -191,6 +192,20 @@ void mjm_defaultFlex(mjmFlex& flex) {
|
||||
|
||||
|
||||
|
||||
// default texture attributes
|
||||
void mjm_defaultTexture(mjmTexture& texture) {
|
||||
memset(&texture, 0, sizeof(mjmTexture));
|
||||
texture.type = mjTEXTURE_CUBE;
|
||||
mjuu_setvec(texture.rgb1, 0.8, 0.8, 0.8);
|
||||
mjuu_setvec(texture.rgb2, 0.5, 0.5, 0.5);
|
||||
mjuu_setvec(texture.markrgb, 0, 0, 0);
|
||||
texture.random = 0.01;
|
||||
texture.gridsize[0] = texture.gridsize[1] = 1;
|
||||
mujoco::util::strcpy_arr(texture.gridlayout, "............");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// default material attributes
|
||||
void mjm_defaultMaterial(mjmMaterial& material) {
|
||||
memset(&material, 0, sizeof(mjmMaterial));
|
||||
|
||||
Reference in New Issue
Block a user