Improved behaviour of mouse-spring interactions.
Also:
- Renamed recently introduced `mjvPerturb` member `reflocalpos` -> `refselpos` and corrected docstring.
- Added `mjvPerturb.localmass`: body spatial inertia at selection point.
- Removed `const` qualifier to `mjData` argument of `mjv_initPerturb()`, to facilitate spatial inertia computation.
- Improved `mj_Object{Velocity, Acceleration}` docstrings, clarifying that rotational velocities precede linear velocities.
- Removed redundant const qualifiers from non pointer arguments to `mju_dot` and `mju_writeNumBytes`.
PiperOrigin-RevId: 511002168
Change-Id: I27400f497947f330072d4abb7c9bf7e71e6c5d49
This commit is contained in:
committed by
Copybara-Service
parent
9756ed0d80
commit
7542c90cd2
@@ -587,7 +587,7 @@ void mjv_addGeoms(const mjModel* m, mjData* d, const mjvOption* vopt,
|
||||
sz[0] = scl * m->vis.scale.constraint;
|
||||
mjv_makeConnector(thisgeom, mjGEOM_CAPSULE, sz[0],
|
||||
selpos[0], selpos[1], selpos[2],
|
||||
pert->reflocalpos[0], pert->reflocalpos[1], pert->reflocalpos[2]);
|
||||
pert->refselpos[0], pert->refselpos[1], pert->refselpos[2]);
|
||||
|
||||
// prepare color
|
||||
mixcolor(rgba, m->vis.rgba.constraint,
|
||||
@@ -605,7 +605,7 @@ void mjv_addGeoms(const mjModel* m, mjData* d, const mjvOption* vopt,
|
||||
sz[0] = 2*sz[0];
|
||||
sz[1] = sz[2] = sz[0];
|
||||
mju_quat2Mat(mat, pert->refquat);
|
||||
mjv_initGeom(thisgeom, mjGEOM_SPHERE, sz, pert->reflocalpos, mat, rgba);
|
||||
mjv_initGeom(thisgeom, mjGEOM_SPHERE, sz, pert->refselpos, mat, rgba);
|
||||
|
||||
FINISH
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user