Remove explicit mjModel dependency from engine_util_misc.c
PiperOrigin-RevId: 780123513 Change-Id: I567e09db3cd13a93a4720742affb62b54bfa5426
This commit is contained in:
committed by
Copybara-Service
parent
6ccc4f77bc
commit
783e6499d8
@@ -1193,7 +1193,7 @@ void mjd_ellipsoidFluid(const mjModel* m, mjData* d, int bodyid) {
|
|||||||
for (int j=0; j < m->body_geomnum[bodyid]; j++) {
|
for (int j=0; j < m->body_geomnum[bodyid]; j++) {
|
||||||
const int geomid = m->body_geomadr[bodyid] + j;
|
const int geomid = m->body_geomadr[bodyid] + j;
|
||||||
|
|
||||||
mju_geomSemiAxes(m, geomid, semiaxes);
|
mju_geomSemiAxes(semiaxes, m->geom_size + 3*geomid, m->geom_type[geomid]);
|
||||||
|
|
||||||
readFluidGeomInteraction(
|
readFluidGeomInteraction(
|
||||||
m->geom_fluid + mjNFLUID*geomid, &geom_interaction_coef,
|
m->geom_fluid + mjNFLUID*geomid, &geom_interaction_coef,
|
||||||
|
|||||||
@@ -635,7 +635,7 @@ void mj_ellipsoidFluidModel(const mjModel* m, mjData* d, int bodyid) {
|
|||||||
for (int j=0; j < m->body_geomnum[bodyid]; j++) {
|
for (int j=0; j < m->body_geomnum[bodyid]; j++) {
|
||||||
const int geomid = m->body_geomadr[bodyid] + j;
|
const int geomid = m->body_geomadr[bodyid] + j;
|
||||||
|
|
||||||
mju_geomSemiAxes(m, geomid, semiaxes);
|
mju_geomSemiAxes(semiaxes, m->geom_size + 3*geomid, m->geom_type[geomid]);
|
||||||
|
|
||||||
readFluidGeomInteraction(
|
readFluidGeomInteraction(
|
||||||
m->geom_fluid + mjNFLUID*geomid, &geom_interaction_coef,
|
m->geom_fluid + mjNFLUID*geomid, &geom_interaction_coef,
|
||||||
|
|||||||
@@ -422,9 +422,8 @@ mjtNum mju_wrap(mjtNum wpnt[6], const mjtNum x0[3], const mjtNum x1[3],
|
|||||||
|
|
||||||
|
|
||||||
// all 3 semi-axes of a geom
|
// all 3 semi-axes of a geom
|
||||||
void mju_geomSemiAxes(const mjModel* m, int geom_id, mjtNum semiaxes[3]) {
|
void mju_geomSemiAxes(mjtNum semiaxes[3], const mjtNum size[3], mjtGeom type) {
|
||||||
mjtNum* size = m->geom_size + 3*geom_id;
|
switch (type) {
|
||||||
switch ((mjtGeom) m->geom_type[geom_id]) {
|
|
||||||
case mjGEOM_SPHERE:
|
case mjGEOM_SPHERE:
|
||||||
semiaxes[0] = size[0];
|
semiaxes[0] = size[0];
|
||||||
semiaxes[1] = size[0];
|
semiaxes[1] = size[0];
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ MJAPI mjtNum mju_muscleDynamicsTimescale(mjtNum dctrl, mjtNum tau_act, mjtNum ta
|
|||||||
MJAPI mjtNum mju_muscleDynamics(mjtNum ctrl, mjtNum act, const mjtNum prm[3]);
|
MJAPI mjtNum mju_muscleDynamics(mjtNum ctrl, mjtNum act, const mjtNum prm[3]);
|
||||||
|
|
||||||
// all 3 semi-axes of a geom
|
// all 3 semi-axes of a geom
|
||||||
MJAPI void mju_geomSemiAxes(const mjModel* m, int geom_id, mjtNum semiaxes[3]);
|
MJAPI void mju_geomSemiAxes(mjtNum semiaxes[3], const mjtNum size[3], mjtGeom type);
|
||||||
|
|
||||||
// ----------------------------- Flex interpolation ------------------------------------------------
|
// ----------------------------- Flex interpolation ------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user