Improve field order and comments in mjdata.h
PiperOrigin-RevId: 792642328 Change-Id: I59330e228a111edec9e86d93d5cdf646b0fab00e
This commit is contained in:
committed by
Copybara-Service
parent
50fa598d93
commit
249b0cd87d
@@ -248,6 +248,7 @@ struct mjData_ {
|
||||
int* flexedge_J_colind; // column indices in sparse Jacobian (nflexedge x nv)
|
||||
mjtNum* flexedge_J; // flex edge Jacobian (nflexedge x nv)
|
||||
mjtNum* flexedge_length; // flex edge lengths (nflexedge x 1)
|
||||
mjtNum* bvh_aabb_dyn; // global bounding box (center, size) (nbvhdynamic x 6)
|
||||
|
||||
// computed by mj_fwdPosition/mj_tendon
|
||||
int* ten_wrapadr; // start address of tendon's path (ntendon x 1)
|
||||
@@ -276,8 +277,7 @@ struct mjData_ {
|
||||
mjtNum* qLD; // L'*D*L factorization of M (sparse) (nC x 1)
|
||||
mjtNum* qLDiagInv; // 1/diag(D) (nv x 1)
|
||||
|
||||
// computed by mj_collisionTree
|
||||
mjtNum* bvh_aabb_dyn; // global bounding box (center, size) (nbvhdynamic x 6)
|
||||
// computed by mj_collision/mj_collideTree
|
||||
mjtByte* bvh_active; // was bounding volume checked for collision (nbvh x 1)
|
||||
|
||||
//-------------------- POSITION, VELOCITY dependent
|
||||
|
||||
@@ -276,6 +276,7 @@ struct mjData_ {
|
||||
int* flexedge_J_colind; // column indices in sparse Jacobian (nflexedge x nv)
|
||||
mjtNum* flexedge_J; // flex edge Jacobian (nflexedge x nv)
|
||||
mjtNum* flexedge_length; // flex edge lengths (nflexedge x 1)
|
||||
mjtNum* bvh_aabb_dyn; // global bounding box (center, size) (nbvhdynamic x 6)
|
||||
|
||||
// computed by mj_fwdPosition/mj_tendon
|
||||
int* ten_wrapadr; // start address of tendon's path (ntendon x 1)
|
||||
@@ -304,8 +305,7 @@ struct mjData_ {
|
||||
mjtNum* qLD; // L'*D*L factorization of M (sparse) (nC x 1)
|
||||
mjtNum* qLDiagInv; // 1/diag(D) (nv x 1)
|
||||
|
||||
// computed by mj_collisionTree
|
||||
mjtNum* bvh_aabb_dyn; // global bounding box (center, size) (nbvhdynamic x 6)
|
||||
// computed by mj_collision/mj_collideTree
|
||||
mjtByte* bvh_active; // was bounding volume checked for collision (nbvh x 1)
|
||||
|
||||
//-------------------- POSITION, VELOCITY dependent
|
||||
|
||||
@@ -651,6 +651,7 @@
|
||||
X ( int, flexedge_J_colind, nflexedge, MJ_M(nv) ) \
|
||||
X ( mjtNum, flexedge_J, nflexedge, MJ_M(nv) ) \
|
||||
X ( mjtNum, flexedge_length, nflexedge, 1 ) \
|
||||
X ( mjtNum, bvh_aabb_dyn, nbvhdynamic, 6 ) \
|
||||
X ( int, ten_wrapadr, ntendon, 1 ) \
|
||||
X ( int, ten_wrapnum, ntendon, 1 ) \
|
||||
X ( int, ten_J_rownnz, ntendon, 1 ) \
|
||||
@@ -670,7 +671,6 @@
|
||||
XNV ( mjtNum, M, nC, 1 ) \
|
||||
XNV ( mjtNum, qLD, nC, 1 ) \
|
||||
X ( mjtNum, qLDiagInv, nv, 1 ) \
|
||||
X ( mjtNum, bvh_aabb_dyn, nbvhdynamic, 6 ) \
|
||||
X ( mjtByte, bvh_active, nbvh, 1 ) \
|
||||
X ( mjtNum, flexedge_velocity, nflexedge, 1 ) \
|
||||
X ( mjtNum, ten_velocity, ntendon, 1 ) \
|
||||
|
||||
@@ -5378,6 +5378,14 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
doc='flex edge lengths',
|
||||
array_extent=('nflexedge',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='bvh_aabb_dyn',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjtNum'),
|
||||
),
|
||||
doc='global bounding box (center, size)',
|
||||
array_extent=('nbvhdynamic', 6),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='ten_wrapadr',
|
||||
type=PointerType(
|
||||
@@ -5530,14 +5538,6 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
doc='1/diag(D)',
|
||||
array_extent=('nv',),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='bvh_aabb_dyn',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjtNum'),
|
||||
),
|
||||
doc='global bounding box (center, size)',
|
||||
array_extent=('nbvhdynamic', 6),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='bvh_active',
|
||||
type=PointerType(
|
||||
|
||||
@@ -4947,6 +4947,7 @@ public unsafe struct mjData_ {
|
||||
public int* flexedge_J_colind;
|
||||
public double* flexedge_J;
|
||||
public double* flexedge_length;
|
||||
public double* bvh_aabb_dyn;
|
||||
public int* ten_wrapadr;
|
||||
public int* ten_wrapnum;
|
||||
public int* ten_J_rownnz;
|
||||
@@ -4966,7 +4967,6 @@ public unsafe struct mjData_ {
|
||||
public double* M;
|
||||
public double* qLD;
|
||||
public double* qLDiagInv;
|
||||
public double* bvh_aabb_dyn;
|
||||
public byte* bvh_active;
|
||||
public double* flexedge_velocity;
|
||||
public double* ten_velocity;
|
||||
|
||||
Reference in New Issue
Block a user