# Copyright 2023 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Provides information about MuJoCo API structs.

DO NOT EDIT. THIS FILE IS AUTOMATICALLY GENERATED.
"""

from typing import Mapping

from .ast_nodes import AnonymousStructDecl
from .ast_nodes import AnonymousUnionDecl
from .ast_nodes import ArrayType
from .ast_nodes import PointerType
from .ast_nodes import StructDecl
from .ast_nodes import StructFieldDecl
from .ast_nodes import ValueType

STRUCTS: Mapping[str, StructDecl] = dict([
    ('mjLROpt',
     StructDecl(
         name='mjLROpt',
         declname='struct mjLROpt_',
         fields=(
             StructFieldDecl(
                 name='mode',
                 type=ValueType(name='int'),
                 doc='which actuators to process (mjtLRMode)',
             ),
             StructFieldDecl(
                 name='useexisting',
                 type=ValueType(name='int'),
                 doc='use existing length range if available',
             ),
             StructFieldDecl(
                 name='uselimit',
                 type=ValueType(name='int'),
                 doc='use joint and tendon limits if available',
             ),
             StructFieldDecl(
                 name='accel',
                 type=ValueType(name='mjtNum'),
                 doc='target acceleration used to compute force',
             ),
             StructFieldDecl(
                 name='maxforce',
                 type=ValueType(name='mjtNum'),
                 doc='maximum force; 0: no limit',
             ),
             StructFieldDecl(
                 name='timeconst',
                 type=ValueType(name='mjtNum'),
                 doc='time constant for velocity reduction; min 0.01',
             ),
             StructFieldDecl(
                 name='timestep',
                 type=ValueType(name='mjtNum'),
                 doc='simulation timestep; 0: use mjOption.timestep',
             ),
             StructFieldDecl(
                 name='inttotal',
                 type=ValueType(name='mjtNum'),
                 doc='total simulation time interval',
             ),
             StructFieldDecl(
                 name='interval',
                 type=ValueType(name='mjtNum'),
                 doc='evaluation time interval (at the end)',
             ),
             StructFieldDecl(
                 name='tolrange',
                 type=ValueType(name='mjtNum'),
                 doc='convergence tolerance (relative to range)',
             ),
         ),
     )),
    ('mjVFS',
     StructDecl(
         name='mjVFS',
         declname='struct mjVFS_',
         fields=(
             StructFieldDecl(
                 name='nfile',
                 type=ValueType(name='int'),
                 doc='number of files present',
             ),
             StructFieldDecl(
                 name='filename',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(2000, 1000),
                 ),
                 doc='file name without path',
             ),
             StructFieldDecl(
                 name='filesize',
                 type=ArrayType(
                     inner_type=ValueType(name='size_t'),
                     extents=(2000,),
                 ),
                 doc='file size in bytes',
             ),
             StructFieldDecl(
                 name='filedata',
                 type=ArrayType(
                     inner_type=PointerType(
                         inner_type=ValueType(name='void'),
                     ),
                     extents=(2000,),
                 ),
                 doc='buffer with file data',
             ),
         ),
     )),
    ('mjOption',
     StructDecl(
         name='mjOption',
         declname='struct mjOption_',
         fields=(
             StructFieldDecl(
                 name='timestep',
                 type=ValueType(name='mjtNum'),
                 doc='timestep',
             ),
             StructFieldDecl(
                 name='apirate',
                 type=ValueType(name='mjtNum'),
                 doc='update rate for remote API (Hz)',
             ),
             StructFieldDecl(
                 name='impratio',
                 type=ValueType(name='mjtNum'),
                 doc='ratio of friction-to-normal contact impedance',
             ),
             StructFieldDecl(
                 name='tolerance',
                 type=ValueType(name='mjtNum'),
                 doc='main solver tolerance',
             ),
             StructFieldDecl(
                 name='ls_tolerance',
                 type=ValueType(name='mjtNum'),
                 doc='CG/Newton linesearch tolerance',
             ),
             StructFieldDecl(
                 name='noslip_tolerance',
                 type=ValueType(name='mjtNum'),
                 doc='noslip solver tolerance',
             ),
             StructFieldDecl(
                 name='mpr_tolerance',
                 type=ValueType(name='mjtNum'),
                 doc='MPR solver tolerance',
             ),
             StructFieldDecl(
                 name='gravity',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(3,),
                 ),
                 doc='gravitational acceleration',
             ),
             StructFieldDecl(
                 name='wind',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(3,),
                 ),
                 doc='wind (for lift, drag and viscosity)',
             ),
             StructFieldDecl(
                 name='magnetic',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(3,),
                 ),
                 doc='global magnetic flux',
             ),
             StructFieldDecl(
                 name='density',
                 type=ValueType(name='mjtNum'),
                 doc='density of medium',
             ),
             StructFieldDecl(
                 name='viscosity',
                 type=ValueType(name='mjtNum'),
                 doc='viscosity of medium',
             ),
             StructFieldDecl(
                 name='o_margin',
                 type=ValueType(name='mjtNum'),
                 doc='margin',
             ),
             StructFieldDecl(
                 name='o_solref',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(2,),
                 ),
                 doc='solref',
             ),
             StructFieldDecl(
                 name='o_solimp',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(5,),
                 ),
                 doc='solimp',
             ),
             StructFieldDecl(
                 name='integrator',
                 type=ValueType(name='int'),
                 doc='integration mode (mjtIntegrator)',
             ),
             StructFieldDecl(
                 name='collision',
                 type=ValueType(name='int'),
                 doc='collision mode (mjtCollision)',
             ),
             StructFieldDecl(
                 name='cone',
                 type=ValueType(name='int'),
                 doc='type of friction cone (mjtCone)',
             ),
             StructFieldDecl(
                 name='jacobian',
                 type=ValueType(name='int'),
                 doc='type of Jacobian (mjtJacobian)',
             ),
             StructFieldDecl(
                 name='solver',
                 type=ValueType(name='int'),
                 doc='solver algorithm (mjtSolver)',
             ),
             StructFieldDecl(
                 name='iterations',
                 type=ValueType(name='int'),
                 doc='maximum number of main solver iterations',
             ),
             StructFieldDecl(
                 name='ls_iterations',
                 type=ValueType(name='int'),
                 doc='maximum number of CG/Newton linesearch iterations',
             ),
             StructFieldDecl(
                 name='noslip_iterations',
                 type=ValueType(name='int'),
                 doc='maximum number of noslip solver iterations',
             ),
             StructFieldDecl(
                 name='mpr_iterations',
                 type=ValueType(name='int'),
                 doc='maximum number of MPR solver iterations',
             ),
             StructFieldDecl(
                 name='disableflags',
                 type=ValueType(name='int'),
                 doc='bit flags for disabling standard features',
             ),
             StructFieldDecl(
                 name='enableflags',
                 type=ValueType(name='int'),
                 doc='bit flags for enabling optional features',
             ),
             StructFieldDecl(
                 name='sdf_initpoints',
                 type=ValueType(name='int'),
                 doc='number of starting points for gradient descent',
             ),
             StructFieldDecl(
                 name='sdf_iterations',
                 type=ValueType(name='int'),
                 doc='max number of iterations for gradient descent',
             ),
         ),
     )),
    ('mjVisual',
     StructDecl(
         name='mjVisual',
         declname='struct mjVisual_',
         fields=(
             StructFieldDecl(
                 name='global',
                 type=AnonymousStructDecl(
                     fields=(
                         StructFieldDecl(
                             name='fovy',
                             type=ValueType(name='float'),
                             doc='y-field of view for free camera (degrees)',
                         ),
                         StructFieldDecl(
                             name='ipd',
                             type=ValueType(name='float'),
                             doc='inter-pupilary distance for free camera',
                         ),
                         StructFieldDecl(
                             name='azimuth',
                             type=ValueType(name='float'),
                             doc='initial azimuth of free camera (degrees)',
                         ),
                         StructFieldDecl(
                             name='elevation',
                             type=ValueType(name='float'),
                             doc='initial elevation of free camera (degrees)',
                         ),
                         StructFieldDecl(
                             name='linewidth',
                             type=ValueType(name='float'),
                             doc='line width for wireframe and ray rendering',
                         ),
                         StructFieldDecl(
                             name='glow',
                             type=ValueType(name='float'),
                             doc='glow coefficient for selected body',
                         ),
                         StructFieldDecl(
                             name='realtime',
                             type=ValueType(name='float'),
                             doc='initial real-time factor (1: real time)',
                         ),
                         StructFieldDecl(
                             name='offwidth',
                             type=ValueType(name='int'),
                             doc='width of offscreen buffer',
                         ),
                         StructFieldDecl(
                             name='offheight',
                             type=ValueType(name='int'),
                             doc='height of offscreen buffer',
                         ),
                         StructFieldDecl(
                             name='ellipsoidinertia',
                             type=ValueType(name='int'),
                             doc='geom for inertia visualization (0: box, 1: ellipsoid)',  # pylint: disable=line-too-long
                         ),
                     ),
                 ),
                 doc='',
             ),
             StructFieldDecl(
                 name='quality',
                 type=AnonymousStructDecl(
                     fields=(
                         StructFieldDecl(
                             name='shadowsize',
                             type=ValueType(name='int'),
                             doc='size of shadowmap texture',
                         ),
                         StructFieldDecl(
                             name='offsamples',
                             type=ValueType(name='int'),
                             doc='number of multisamples for offscreen rendering',  # pylint: disable=line-too-long
                         ),
                         StructFieldDecl(
                             name='numslices',
                             type=ValueType(name='int'),
                             doc='number of slices for builtin geom drawing',
                         ),
                         StructFieldDecl(
                             name='numstacks',
                             type=ValueType(name='int'),
                             doc='number of stacks for builtin geom drawing',
                         ),
                         StructFieldDecl(
                             name='numquads',
                             type=ValueType(name='int'),
                             doc='number of quads for box rendering',
                         ),
                     ),
                 ),
                 doc='',
             ),
             StructFieldDecl(
                 name='headlight',
                 type=AnonymousStructDecl(
                     fields=(
                         StructFieldDecl(
                             name='ambient',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(3,),
                             ),
                             doc='ambient rgb (alpha=1)',
                         ),
                         StructFieldDecl(
                             name='diffuse',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(3,),
                             ),
                             doc='diffuse rgb (alpha=1)',
                         ),
                         StructFieldDecl(
                             name='specular',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(3,),
                             ),
                             doc='specular rgb (alpha=1)',
                         ),
                         StructFieldDecl(
                             name='active',
                             type=ValueType(name='int'),
                             doc='is headlight active',
                         ),
                     ),
                 ),
                 doc='',
             ),
             StructFieldDecl(
                 name='map',
                 type=AnonymousStructDecl(
                     fields=(
                         StructFieldDecl(
                             name='stiffness',
                             type=ValueType(name='float'),
                             doc='mouse perturbation stiffness (space->force)',
                         ),
                         StructFieldDecl(
                             name='stiffnessrot',
                             type=ValueType(name='float'),
                             doc='mouse perturbation stiffness (space->torque)',
                         ),
                         StructFieldDecl(
                             name='force',
                             type=ValueType(name='float'),
                             doc='from force units to space units',
                         ),
                         StructFieldDecl(
                             name='torque',
                             type=ValueType(name='float'),
                             doc='from torque units to space units',
                         ),
                         StructFieldDecl(
                             name='alpha',
                             type=ValueType(name='float'),
                             doc='scale geom alphas when transparency is enabled',  # pylint: disable=line-too-long
                         ),
                         StructFieldDecl(
                             name='fogstart',
                             type=ValueType(name='float'),
                             doc='OpenGL fog starts at fogstart * mjModel.stat.extent',  # pylint: disable=line-too-long
                         ),
                         StructFieldDecl(
                             name='fogend',
                             type=ValueType(name='float'),
                             doc='OpenGL fog ends at fogend * mjModel.stat.extent',  # pylint: disable=line-too-long
                         ),
                         StructFieldDecl(
                             name='znear',
                             type=ValueType(name='float'),
                             doc='near clipping plane = znear * mjModel.stat.extent',  # pylint: disable=line-too-long
                         ),
                         StructFieldDecl(
                             name='zfar',
                             type=ValueType(name='float'),
                             doc='far clipping plane = zfar * mjModel.stat.extent',  # pylint: disable=line-too-long
                         ),
                         StructFieldDecl(
                             name='haze',
                             type=ValueType(name='float'),
                             doc='haze ratio',
                         ),
                         StructFieldDecl(
                             name='shadowclip',
                             type=ValueType(name='float'),
                             doc='directional light: shadowclip * mjModel.stat.extent',  # pylint: disable=line-too-long
                         ),
                         StructFieldDecl(
                             name='shadowscale',
                             type=ValueType(name='float'),
                             doc='spot light: shadowscale * light.cutoff',
                         ),
                         StructFieldDecl(
                             name='actuatortendon',
                             type=ValueType(name='float'),
                             doc='scale tendon width',
                         ),
                     ),
                 ),
                 doc='',
             ),
             StructFieldDecl(
                 name='scale',
                 type=AnonymousStructDecl(
                     fields=(
                         StructFieldDecl(
                             name='forcewidth',
                             type=ValueType(name='float'),
                             doc='width of force arrow',
                         ),
                         StructFieldDecl(
                             name='contactwidth',
                             type=ValueType(name='float'),
                             doc='contact width',
                         ),
                         StructFieldDecl(
                             name='contactheight',
                             type=ValueType(name='float'),
                             doc='contact height',
                         ),
                         StructFieldDecl(
                             name='connect',
                             type=ValueType(name='float'),
                             doc='autoconnect capsule width',
                         ),
                         StructFieldDecl(
                             name='com',
                             type=ValueType(name='float'),
                             doc='com radius',
                         ),
                         StructFieldDecl(
                             name='camera',
                             type=ValueType(name='float'),
                             doc='camera object',
                         ),
                         StructFieldDecl(
                             name='light',
                             type=ValueType(name='float'),
                             doc='light object',
                         ),
                         StructFieldDecl(
                             name='selectpoint',
                             type=ValueType(name='float'),
                             doc='selection point',
                         ),
                         StructFieldDecl(
                             name='jointlength',
                             type=ValueType(name='float'),
                             doc='joint length',
                         ),
                         StructFieldDecl(
                             name='jointwidth',
                             type=ValueType(name='float'),
                             doc='joint width',
                         ),
                         StructFieldDecl(
                             name='actuatorlength',
                             type=ValueType(name='float'),
                             doc='actuator length',
                         ),
                         StructFieldDecl(
                             name='actuatorwidth',
                             type=ValueType(name='float'),
                             doc='actuator width',
                         ),
                         StructFieldDecl(
                             name='framelength',
                             type=ValueType(name='float'),
                             doc='bodyframe axis length',
                         ),
                         StructFieldDecl(
                             name='framewidth',
                             type=ValueType(name='float'),
                             doc='bodyframe axis width',
                         ),
                         StructFieldDecl(
                             name='constraint',
                             type=ValueType(name='float'),
                             doc='constraint width',
                         ),
                         StructFieldDecl(
                             name='slidercrank',
                             type=ValueType(name='float'),
                             doc='slidercrank width',
                         ),
                     ),
                 ),
                 doc='',
             ),
             StructFieldDecl(
                 name='rgba',
                 type=AnonymousStructDecl(
                     fields=(
                         StructFieldDecl(
                             name='fog',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='fog',
                         ),
                         StructFieldDecl(
                             name='haze',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='haze',
                         ),
                         StructFieldDecl(
                             name='force',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='external force',
                         ),
                         StructFieldDecl(
                             name='inertia',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='inertia box',
                         ),
                         StructFieldDecl(
                             name='joint',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='joint',
                         ),
                         StructFieldDecl(
                             name='actuator',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='actuator, neutral',
                         ),
                         StructFieldDecl(
                             name='actuatornegative',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='actuator, negative limit',
                         ),
                         StructFieldDecl(
                             name='actuatorpositive',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='actuator, positive limit',
                         ),
                         StructFieldDecl(
                             name='com',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='center of mass',
                         ),
                         StructFieldDecl(
                             name='camera',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='camera object',
                         ),
                         StructFieldDecl(
                             name='light',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='light object',
                         ),
                         StructFieldDecl(
                             name='selectpoint',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='selection point',
                         ),
                         StructFieldDecl(
                             name='connect',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='auto connect',
                         ),
                         StructFieldDecl(
                             name='contactpoint',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='contact point',
                         ),
                         StructFieldDecl(
                             name='contactforce',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='contact force',
                         ),
                         StructFieldDecl(
                             name='contactfriction',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='contact friction force',
                         ),
                         StructFieldDecl(
                             name='contacttorque',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='contact torque',
                         ),
                         StructFieldDecl(
                             name='contactgap',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='contact point in gap',
                         ),
                         StructFieldDecl(
                             name='rangefinder',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='rangefinder ray',
                         ),
                         StructFieldDecl(
                             name='constraint',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='constraint',
                         ),
                         StructFieldDecl(
                             name='slidercrank',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='slidercrank',
                         ),
                         StructFieldDecl(
                             name='crankbroken',
                             type=ArrayType(
                                 inner_type=ValueType(name='float'),
                                 extents=(4,),
                             ),
                             doc='used when crank must be stretched/broken',
                         ),
                     ),
                 ),
                 doc='',
             ),
         ),
     )),
    ('mjStatistic',
     StructDecl(
         name='mjStatistic',
         declname='struct mjStatistic_',
         fields=(
             StructFieldDecl(
                 name='meaninertia',
                 type=ValueType(name='mjtNum'),
                 doc='mean diagonal inertia',
             ),
             StructFieldDecl(
                 name='meanmass',
                 type=ValueType(name='mjtNum'),
                 doc='mean body mass',
             ),
             StructFieldDecl(
                 name='meansize',
                 type=ValueType(name='mjtNum'),
                 doc='mean body size',
             ),
             StructFieldDecl(
                 name='extent',
                 type=ValueType(name='mjtNum'),
                 doc='spatial extent',
             ),
             StructFieldDecl(
                 name='center',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(3,),
                 ),
                 doc='center of model',
             ),
         ),
     )),
    ('mjModel',
     StructDecl(
         name='mjModel',
         declname='struct mjModel_',
         fields=(
             StructFieldDecl(
                 name='nq',
                 type=ValueType(name='int'),
                 doc='number of generalized coordinates = dim(qpos)',
             ),
             StructFieldDecl(
                 name='nv',
                 type=ValueType(name='int'),
                 doc='number of degrees of freedom = dim(qvel)',
             ),
             StructFieldDecl(
                 name='nu',
                 type=ValueType(name='int'),
                 doc='number of actuators/controls = dim(ctrl)',
             ),
             StructFieldDecl(
                 name='na',
                 type=ValueType(name='int'),
                 doc='number of activation states = dim(act)',
             ),
             StructFieldDecl(
                 name='nbody',
                 type=ValueType(name='int'),
                 doc='number of bodies',
             ),
             StructFieldDecl(
                 name='nbvh',
                 type=ValueType(name='int'),
                 doc='number of bounding volumes in all bodies',
             ),
             StructFieldDecl(
                 name='njnt',
                 type=ValueType(name='int'),
                 doc='number of joints',
             ),
             StructFieldDecl(
                 name='ngeom',
                 type=ValueType(name='int'),
                 doc='number of geoms',
             ),
             StructFieldDecl(
                 name='nsite',
                 type=ValueType(name='int'),
                 doc='number of sites',
             ),
             StructFieldDecl(
                 name='ncam',
                 type=ValueType(name='int'),
                 doc='number of cameras',
             ),
             StructFieldDecl(
                 name='nlight',
                 type=ValueType(name='int'),
                 doc='number of lights',
             ),
             StructFieldDecl(
                 name='nmesh',
                 type=ValueType(name='int'),
                 doc='number of meshes',
             ),
             StructFieldDecl(
                 name='nmeshvert',
                 type=ValueType(name='int'),
                 doc='number of vertices in all meshes',
             ),
             StructFieldDecl(
                 name='nmeshnormal',
                 type=ValueType(name='int'),
                 doc='number of normals in all meshes',
             ),
             StructFieldDecl(
                 name='nmeshtexcoord',
                 type=ValueType(name='int'),
                 doc='number of texcoords in all meshes',
             ),
             StructFieldDecl(
                 name='nmeshface',
                 type=ValueType(name='int'),
                 doc='number of triangular faces in all meshes',
             ),
             StructFieldDecl(
                 name='nmeshgraph',
                 type=ValueType(name='int'),
                 doc='number of ints in mesh auxiliary data',
             ),
             StructFieldDecl(
                 name='nskin',
                 type=ValueType(name='int'),
                 doc='number of skins',
             ),
             StructFieldDecl(
                 name='nskinvert',
                 type=ValueType(name='int'),
                 doc='number of vertices in all skins',
             ),
             StructFieldDecl(
                 name='nskintexvert',
                 type=ValueType(name='int'),
                 doc='number of vertiex with texcoords in all skins',
             ),
             StructFieldDecl(
                 name='nskinface',
                 type=ValueType(name='int'),
                 doc='number of triangular faces in all skins',
             ),
             StructFieldDecl(
                 name='nskinbone',
                 type=ValueType(name='int'),
                 doc='number of bones in all skins',
             ),
             StructFieldDecl(
                 name='nskinbonevert',
                 type=ValueType(name='int'),
                 doc='number of vertices in all skin bones',
             ),
             StructFieldDecl(
                 name='nhfield',
                 type=ValueType(name='int'),
                 doc='number of heightfields',
             ),
             StructFieldDecl(
                 name='nhfielddata',
                 type=ValueType(name='int'),
                 doc='number of data points in all heightfields',
             ),
             StructFieldDecl(
                 name='ntex',
                 type=ValueType(name='int'),
                 doc='number of textures',
             ),
             StructFieldDecl(
                 name='ntexdata',
                 type=ValueType(name='int'),
                 doc='number of bytes in texture rgb data',
             ),
             StructFieldDecl(
                 name='nmat',
                 type=ValueType(name='int'),
                 doc='number of materials',
             ),
             StructFieldDecl(
                 name='npair',
                 type=ValueType(name='int'),
                 doc='number of predefined geom pairs',
             ),
             StructFieldDecl(
                 name='nexclude',
                 type=ValueType(name='int'),
                 doc='number of excluded geom pairs',
             ),
             StructFieldDecl(
                 name='neq',
                 type=ValueType(name='int'),
                 doc='number of equality constraints',
             ),
             StructFieldDecl(
                 name='ntendon',
                 type=ValueType(name='int'),
                 doc='number of tendons',
             ),
             StructFieldDecl(
                 name='nwrap',
                 type=ValueType(name='int'),
                 doc='number of wrap objects in all tendon paths',
             ),
             StructFieldDecl(
                 name='nsensor',
                 type=ValueType(name='int'),
                 doc='number of sensors',
             ),
             StructFieldDecl(
                 name='nnumeric',
                 type=ValueType(name='int'),
                 doc='number of numeric custom fields',
             ),
             StructFieldDecl(
                 name='nnumericdata',
                 type=ValueType(name='int'),
                 doc='number of mjtNums in all numeric fields',
             ),
             StructFieldDecl(
                 name='ntext',
                 type=ValueType(name='int'),
                 doc='number of text custom fields',
             ),
             StructFieldDecl(
                 name='ntextdata',
                 type=ValueType(name='int'),
                 doc='number of mjtBytes in all text fields',
             ),
             StructFieldDecl(
                 name='ntuple',
                 type=ValueType(name='int'),
                 doc='number of tuple custom fields',
             ),
             StructFieldDecl(
                 name='ntupledata',
                 type=ValueType(name='int'),
                 doc='number of objects in all tuple fields',
             ),
             StructFieldDecl(
                 name='nkey',
                 type=ValueType(name='int'),
                 doc='number of keyframes',
             ),
             StructFieldDecl(
                 name='nmocap',
                 type=ValueType(name='int'),
                 doc='number of mocap bodies',
             ),
             StructFieldDecl(
                 name='nplugin',
                 type=ValueType(name='int'),
                 doc='number of plugin instances',
             ),
             StructFieldDecl(
                 name='npluginattr',
                 type=ValueType(name='int'),
                 doc='number of chars in all plugin config attributes',
             ),
             StructFieldDecl(
                 name='nuser_body',
                 type=ValueType(name='int'),
                 doc='number of mjtNums in body_user',
             ),
             StructFieldDecl(
                 name='nuser_jnt',
                 type=ValueType(name='int'),
                 doc='number of mjtNums in jnt_user',
             ),
             StructFieldDecl(
                 name='nuser_geom',
                 type=ValueType(name='int'),
                 doc='number of mjtNums in geom_user',
             ),
             StructFieldDecl(
                 name='nuser_site',
                 type=ValueType(name='int'),
                 doc='number of mjtNums in site_user',
             ),
             StructFieldDecl(
                 name='nuser_cam',
                 type=ValueType(name='int'),
                 doc='number of mjtNums in cam_user',
             ),
             StructFieldDecl(
                 name='nuser_tendon',
                 type=ValueType(name='int'),
                 doc='number of mjtNums in tendon_user',
             ),
             StructFieldDecl(
                 name='nuser_actuator',
                 type=ValueType(name='int'),
                 doc='number of mjtNums in actuator_user',
             ),
             StructFieldDecl(
                 name='nuser_sensor',
                 type=ValueType(name='int'),
                 doc='number of mjtNums in sensor_user',
             ),
             StructFieldDecl(
                 name='nnames',
                 type=ValueType(name='int'),
                 doc='number of chars in all names',
             ),
             StructFieldDecl(
                 name='nnames_map',
                 type=ValueType(name='int'),
                 doc='number of slots in the names hash map',
             ),
             StructFieldDecl(
                 name='nM',
                 type=ValueType(name='int'),
                 doc='number of non-zeros in sparse inertia matrix',
             ),
             StructFieldDecl(
                 name='nD',
                 type=ValueType(name='int'),
                 doc='number of non-zeros in sparse dof-dof matrix',
             ),
             StructFieldDecl(
                 name='nB',
                 type=ValueType(name='int'),
                 doc='number of non-zeros in sparse body-dof matrix',
             ),
             StructFieldDecl(
                 name='ntree',
                 type=ValueType(name='int'),
                 doc='number of kinematic trees under world body',
             ),
             StructFieldDecl(
                 name='nemax',
                 type=ValueType(name='int'),
                 doc='number of potential equality-constraint rows',
             ),
             StructFieldDecl(
                 name='njmax',
                 type=ValueType(name='int'),
                 doc='number of available rows in constraint Jacobian',
             ),
             StructFieldDecl(
                 name='nconmax',
                 type=ValueType(name='int'),
                 doc='number of potential contacts in contact list',
             ),
             StructFieldDecl(
                 name='nuserdata',
                 type=ValueType(name='int'),
                 doc='number of extra fields in mjData',
             ),
             StructFieldDecl(
                 name='nsensordata',
                 type=ValueType(name='int'),
                 doc='number of fields in sensor data vector',
             ),
             StructFieldDecl(
                 name='npluginstate',
                 type=ValueType(name='int'),
                 doc='number of fields in plugin state vector',
             ),
             StructFieldDecl(
                 name='narena',
                 type=ValueType(name='size_t'),
                 doc='number of bytes in the mjData arena (inclusive of stack)',
             ),
             StructFieldDecl(
                 name='nbuffer',
                 type=ValueType(name='size_t'),
                 doc='number of bytes in buffer',
             ),
             StructFieldDecl(
                 name='opt',
                 type=ValueType(name='mjOption'),
                 doc='physics options',
             ),
             StructFieldDecl(
                 name='vis',
                 type=ValueType(name='mjVisual'),
                 doc='visualization options',
             ),
             StructFieldDecl(
                 name='stat',
                 type=ValueType(name='mjStatistic'),
                 doc='model statistics',
             ),
             StructFieldDecl(
                 name='buffer',
                 type=PointerType(
                     inner_type=ValueType(name='void'),
                 ),
                 doc='main buffer; all pointers point in it    (nbuffer)',
             ),
             StructFieldDecl(
                 name='qpos0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='qpos values at default pose              (nq x 1)',
             ),
             StructFieldDecl(
                 name='qpos_spring',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='reference pose for springs               (nq x 1)',
             ),
             StructFieldDecl(
                 name='body_parentid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of body's parent                      (nbody x 1)",
             ),
             StructFieldDecl(
                 name='body_rootid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of root above body                    (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_weldid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of body that this body is welded to   (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_mocapid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of mocap data; -1: none               (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_jntnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of joints for this body           (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_jntadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='start addr of joints; -1: no joints      (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_dofnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of motion degrees of freedom      (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_dofadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='start addr of dofs; -1: no dofs          (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_treeid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of body's kinematic tree; -1: static  (nbody x 1)",
             ),
             StructFieldDecl(
                 name='body_geomnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of geoms                          (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_geomadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='start addr of geoms; -1: no geoms        (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_simple',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='body is simple (has diagonal M)          (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_sameframe',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='inertial frame is same as body frame     (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_pos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='position offset rel. to parent body      (nbody x 3)',
             ),
             StructFieldDecl(
                 name='body_quat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='orientation offset rel. to parent body   (nbody x 4)',
             ),
             StructFieldDecl(
                 name='body_ipos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='local position of center of mass         (nbody x 3)',
             ),
             StructFieldDecl(
                 name='body_iquat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='local orientation of inertia ellipsoid   (nbody x 4)',
             ),
             StructFieldDecl(
                 name='body_mass',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='mass                                     (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_subtreemass',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='mass of subtree starting at this body    (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_inertia',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='diagonal inertia in ipos/iquat frame     (nbody x 3)',
             ),
             StructFieldDecl(
                 name='body_invweight0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='mean inv inert in qpos0 (trn, rot)       (nbody x 2)',
             ),
             StructFieldDecl(
                 name='body_gravcomp',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='antigravity force, units of body weight  (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_user',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='user data                                (nbody x nuser_body)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='body_plugin',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='plugin instance id; -1: not in use       (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_bvhadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address of bvh root                      (nbody x 1)',
             ),
             StructFieldDecl(
                 name='body_bvhnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of bounding volumes               (nbody x 1)',
             ),
             StructFieldDecl(
                 name='bvh_depth',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='depth in the bounding volume hierarchy   (nbvh x 1)',
             ),
             StructFieldDecl(
                 name='bvh_child',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='left and right children in tree          (nbvh x 2)',
             ),
             StructFieldDecl(
                 name='bvh_geomid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='geom id of the node; -1: non-leaf        (nbvh x 1)',
             ),
             StructFieldDecl(
                 name='bvh_aabb',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='bounding box of node (center, size)      (nbvh x 6)',
             ),
             StructFieldDecl(
                 name='jnt_type',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='type of joint (mjtJoint)                 (njnt x 1)',
             ),
             StructFieldDecl(
                 name='jnt_qposadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="start addr in 'qpos' for joint's data    (njnt x 1)",
             ),
             StructFieldDecl(
                 name='jnt_dofadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="start addr in 'qvel' for joint's data    (njnt x 1)",
             ),
             StructFieldDecl(
                 name='jnt_bodyid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of joint's body                       (njnt x 1)",
             ),
             StructFieldDecl(
                 name='jnt_group',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='group for visibility                     (njnt x 1)',
             ),
             StructFieldDecl(
                 name='jnt_limited',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='does joint have limits                   (njnt x 1)',
             ),
             StructFieldDecl(
                 name='jnt_actfrclimited',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='does joint have actuator force limits    (njnt x 1)',
             ),
             StructFieldDecl(
                 name='jnt_solref',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver reference: limit       (njnt x mjNREF)',
             ),
             StructFieldDecl(
                 name='jnt_solimp',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver impedance: limit       (njnt x mjNIMP)',
             ),
             StructFieldDecl(
                 name='jnt_pos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='local anchor position                    (njnt x 3)',
             ),
             StructFieldDecl(
                 name='jnt_axis',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='local joint axis                         (njnt x 3)',
             ),
             StructFieldDecl(
                 name='jnt_stiffness',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='stiffness coefficient                    (njnt x 1)',
             ),
             StructFieldDecl(
                 name='jnt_range',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='joint limits                             (njnt x 2)',
             ),
             StructFieldDecl(
                 name='jnt_actfrcrange',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='range of total actuator force            (njnt x 2)',
             ),
             StructFieldDecl(
                 name='jnt_margin',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='min distance for limit detection         (njnt x 1)',
             ),
             StructFieldDecl(
                 name='jnt_user',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='user data                                (njnt x nuser_jnt)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='dof_bodyid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of dof's body                         (nv x 1)",
             ),
             StructFieldDecl(
                 name='dof_jntid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of dof's joint                        (nv x 1)",
             ),
             StructFieldDecl(
                 name='dof_parentid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of dof's parent; -1: none             (nv x 1)",
             ),
             StructFieldDecl(
                 name='dof_treeid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of dof's kinematic tree               (nv x 1)",
             ),
             StructFieldDecl(
                 name='dof_Madr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='dof address in M-diagonal                (nv x 1)',
             ),
             StructFieldDecl(
                 name='dof_simplenum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of consecutive simple dofs        (nv x 1)',
             ),
             StructFieldDecl(
                 name='dof_solref',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver reference:frictionloss (nv x mjNREF)',
             ),
             StructFieldDecl(
                 name='dof_solimp',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver impedance:frictionloss (nv x mjNIMP)',
             ),
             StructFieldDecl(
                 name='dof_frictionloss',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='dof friction loss                        (nv x 1)',
             ),
             StructFieldDecl(
                 name='dof_armature',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='dof armature inertia/mass                (nv x 1)',
             ),
             StructFieldDecl(
                 name='dof_damping',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='damping coefficient                      (nv x 1)',
             ),
             StructFieldDecl(
                 name='dof_invweight0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='diag. inverse inertia in qpos0           (nv x 1)',
             ),
             StructFieldDecl(
                 name='dof_M0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='diag. inertia in qpos0                   (nv x 1)',
             ),
             StructFieldDecl(
                 name='geom_type',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='geometric type (mjtGeom)                 (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_contype',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='geom contact type                        (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_conaffinity',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='geom contact affinity                    (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_condim',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='contact dimensionality (1, 3, 4, 6)      (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_bodyid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of geom's body                        (ngeom x 1)",
             ),
             StructFieldDecl(
                 name='geom_dataid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of geom's mesh/hfield; -1: none       (ngeom x 1)",
             ),
             StructFieldDecl(
                 name='geom_matid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='material id for rendering; -1: none      (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_group',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='group for visibility                     (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_priority',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='geom contact priority                    (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_plugin',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='plugin instance id; -1: not in use       (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_sameframe',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='same as body frame (1) or iframe (2)     (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_solmix',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='mixing coef for solref/imp in geom pair  (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_solref',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver reference: contact     (ngeom x mjNREF)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='geom_solimp',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver impedance: contact     (ngeom x mjNIMP)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='geom_size',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='geom-specific size parameters            (ngeom x 3)',
             ),
             StructFieldDecl(
                 name='geom_aabb',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='bounding box, (center, size)             (ngeom x 6)',
             ),
             StructFieldDecl(
                 name='geom_rbound',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='radius of bounding sphere                (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_pos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='local position offset rel. to body       (ngeom x 3)',
             ),
             StructFieldDecl(
                 name='geom_quat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='local orientation offset rel. to body    (ngeom x 4)',
             ),
             StructFieldDecl(
                 name='geom_friction',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='friction for (slide, spin, roll)         (ngeom x 3)',
             ),
             StructFieldDecl(
                 name='geom_margin',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='detect contact if dist<margin(ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_gap',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='include in solver if dist<margin-gap     (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='geom_fluid',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='fluid interaction parameters             (ngeom x mjNFLUID)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='geom_user',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='user data                                (ngeom x nuser_geom)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='geom_rgba',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='rgba when material is omitted            (ngeom x 4)',
             ),
             StructFieldDecl(
                 name='site_type',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='geom type for rendering (mjtGeom)        (nsite x 1)',
             ),
             StructFieldDecl(
                 name='site_bodyid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of site's body                        (nsite x 1)",
             ),
             StructFieldDecl(
                 name='site_matid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='material id for rendering; -1: none      (nsite x 1)',
             ),
             StructFieldDecl(
                 name='site_group',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='group for visibility                     (nsite x 1)',
             ),
             StructFieldDecl(
                 name='site_sameframe',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='same as body frame (1) or iframe (2)     (nsite x 1)',
             ),
             StructFieldDecl(
                 name='site_size',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='geom size for rendering                  (nsite x 3)',
             ),
             StructFieldDecl(
                 name='site_pos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='local position offset rel. to body       (nsite x 3)',
             ),
             StructFieldDecl(
                 name='site_quat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='local orientation offset rel. to body    (nsite x 4)',
             ),
             StructFieldDecl(
                 name='site_user',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='user data                                (nsite x nuser_site)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='site_rgba',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='rgba when material is omitted            (nsite x 4)',
             ),
             StructFieldDecl(
                 name='cam_mode',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='camera tracking mode (mjtCamLight)       (ncam x 1)',
             ),
             StructFieldDecl(
                 name='cam_bodyid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of camera's body                      (ncam x 1)",
             ),
             StructFieldDecl(
                 name='cam_targetbodyid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of targeted body; -1: none            (ncam x 1)',
             ),
             StructFieldDecl(
                 name='cam_pos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='position rel. to body frame              (ncam x 3)',
             ),
             StructFieldDecl(
                 name='cam_quat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='orientation rel. to body frame           (ncam x 4)',
             ),
             StructFieldDecl(
                 name='cam_poscom0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='global position rel. to sub-com in qpos0 (ncam x 3)',
             ),
             StructFieldDecl(
                 name='cam_pos0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='global position rel. to body in qpos0    (ncam x 3)',
             ),
             StructFieldDecl(
                 name='cam_mat0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='global orientation in qpos0              (ncam x 9)',
             ),
             StructFieldDecl(
                 name='cam_resolution',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='[width, height] in pixels                (ncam x 2)',
             ),
             StructFieldDecl(
                 name='cam_fovy',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='y-field of view (deg)                    (ncam x 1)',
             ),
             StructFieldDecl(
                 name='cam_ipd',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='inter-pupilary distance                  (ncam x 1)',
             ),
             StructFieldDecl(
                 name='cam_user',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='user data                                (ncam x nuser_cam)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='light_mode',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='light tracking mode (mjtCamLight)        (nlight x 1)',
             ),
             StructFieldDecl(
                 name='light_bodyid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="id of light's body                       (nlight x 1)",
             ),
             StructFieldDecl(
                 name='light_targetbodyid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of targeted body; -1: none            (nlight x 1)',
             ),
             StructFieldDecl(
                 name='light_directional',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='directional light                        (nlight x 1)',
             ),
             StructFieldDecl(
                 name='light_castshadow',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='does light cast shadows                  (nlight x 1)',
             ),
             StructFieldDecl(
                 name='light_active',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='is light on                              (nlight x 1)',
             ),
             StructFieldDecl(
                 name='light_pos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='position rel. to body frame              (nlight x 3)',
             ),
             StructFieldDecl(
                 name='light_dir',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='direction rel. to body frame             (nlight x 3)',
             ),
             StructFieldDecl(
                 name='light_poscom0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='global position rel. to sub-com in qpos0 (nlight x 3)',
             ),
             StructFieldDecl(
                 name='light_pos0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='global position rel. to body in qpos0    (nlight x 3)',
             ),
             StructFieldDecl(
                 name='light_dir0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='global direction in qpos0                (nlight x 3)',
             ),
             StructFieldDecl(
                 name='light_attenuation',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='OpenGL attenuation (quadratic model)     (nlight x 3)',
             ),
             StructFieldDecl(
                 name='light_cutoff',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='OpenGL cutoff                            (nlight x 1)',
             ),
             StructFieldDecl(
                 name='light_exponent',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='OpenGL exponent                          (nlight x 1)',
             ),
             StructFieldDecl(
                 name='light_ambient',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='ambient rgb (alpha=1)                    (nlight x 3)',
             ),
             StructFieldDecl(
                 name='light_diffuse',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='diffuse rgb (alpha=1)                    (nlight x 3)',
             ),
             StructFieldDecl(
                 name='light_specular',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='specular rgb (alpha=1)                   (nlight x 3)',
             ),
             StructFieldDecl(
                 name='mesh_vertadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='first vertex address                     (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_vertnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of vertices                       (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_faceadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='first face address                       (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_facenum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of faces                          (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_bvhadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address of bvh root                      (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_bvhnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of bvh                            (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_normaladr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='first normal address                     (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_normalnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of normals                        (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_texcoordadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='texcoord data address; -1: no texcoord   (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_texcoordnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of texcoord                       (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_graphadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='graph data address; -1: no graph         (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='mesh_pos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='translation applied to asset vertices    (nmesh x 3)',
             ),
             StructFieldDecl(
                 name='mesh_quat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='rotation applied to asset vertices       (nmesh x 4)',
             ),
             StructFieldDecl(
                 name='mesh_vert',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='vertex positions for all meshes          (nmeshvert x 3)',
             ),
             StructFieldDecl(
                 name='mesh_normal',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='normals for all meshes                   (nmeshnormal x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='mesh_texcoord',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='vertex texcoords for all meshes          (nmeshtexcoord x 2)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='mesh_face',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='vertex face data                         (nmeshface x 3)',
             ),
             StructFieldDecl(
                 name='mesh_facenormal',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='normal face data                         (nmeshface x 3)',
             ),
             StructFieldDecl(
                 name='mesh_facetexcoord',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='texture face data                        (nmeshface x 3)',
             ),
             StructFieldDecl(
                 name='mesh_graph',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='convex graph data                        (nmeshgraph x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='skin_matid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='skin material id; -1: none               (nskin x 1)',
             ),
             StructFieldDecl(
                 name='skin_group',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='group for visibility                     (nskin x 1)',
             ),
             StructFieldDecl(
                 name='skin_rgba',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='skin rgba                                (nskin x 4)',
             ),
             StructFieldDecl(
                 name='skin_inflate',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='inflate skin in normal direction         (nskin x 1)',
             ),
             StructFieldDecl(
                 name='skin_vertadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='first vertex address                     (nskin x 1)',
             ),
             StructFieldDecl(
                 name='skin_vertnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of vertices                       (nskin x 1)',
             ),
             StructFieldDecl(
                 name='skin_texcoordadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='texcoord data address; -1: no texcoord   (nskin x 1)',
             ),
             StructFieldDecl(
                 name='skin_faceadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='first face address                       (nskin x 1)',
             ),
             StructFieldDecl(
                 name='skin_facenum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of faces                          (nskin x 1)',
             ),
             StructFieldDecl(
                 name='skin_boneadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='first bone in skin                       (nskin x 1)',
             ),
             StructFieldDecl(
                 name='skin_bonenum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of bones in skin                  (nskin x 1)',
             ),
             StructFieldDecl(
                 name='skin_vert',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='vertex positions for all skin meshes     (nskinvert x 3)',
             ),
             StructFieldDecl(
                 name='skin_texcoord',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='vertex texcoords for all skin meshes     (nskintexvert x 2)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='skin_face',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='triangle faces for all skin meshes       (nskinface x 3)',
             ),
             StructFieldDecl(
                 name='skin_bonevertadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='first vertex in each bone                (nskinbone x 1)',
             ),
             StructFieldDecl(
                 name='skin_bonevertnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of vertices in each bone          (nskinbone x 1)',
             ),
             StructFieldDecl(
                 name='skin_bonebindpos',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='bind pos of each bone                    (nskinbone x 3)',
             ),
             StructFieldDecl(
                 name='skin_bonebindquat',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='bind quat of each bone                   (nskinbone x 4)',
             ),
             StructFieldDecl(
                 name='skin_bonebodyid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='body id of each bone                     (nskinbone x 1)',
             ),
             StructFieldDecl(
                 name='skin_bonevertid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='mesh ids of vertices in each bone        (nskinbonevert x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='skin_bonevertweight',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='weights of vertices in each bone         (nskinbonevert x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='hfield_size',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='(x, y, z_top, z_bottom)                  (nhfield x 4)',
             ),
             StructFieldDecl(
                 name='hfield_nrow',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of rows in grid                   (nhfield x 1)',
             ),
             StructFieldDecl(
                 name='hfield_ncol',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of columns in grid                (nhfield x 1)',
             ),
             StructFieldDecl(
                 name='hfield_adr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address in hfield_data                   (nhfield x 1)',
             ),
             StructFieldDecl(
                 name='hfield_data',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='elevation data                           (nhfielddata x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='tex_type',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='texture type (mjtTexture)                (ntex x 1)',
             ),
             StructFieldDecl(
                 name='tex_height',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of rows in texture image          (ntex x 1)',
             ),
             StructFieldDecl(
                 name='tex_width',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of columns in texture image       (ntex x 1)',
             ),
             StructFieldDecl(
                 name='tex_adr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address in rgb                           (ntex x 1)',
             ),
             StructFieldDecl(
                 name='tex_rgb',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='rgb (alpha = 1)                          (ntexdata x 1)',
             ),
             StructFieldDecl(
                 name='mat_texid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='texture id; -1: none                     (nmat x 1)',
             ),
             StructFieldDecl(
                 name='mat_texuniform',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='make texture cube uniform                (nmat x 1)',
             ),
             StructFieldDecl(
                 name='mat_texrepeat',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='texture repetition for 2d mapping        (nmat x 2)',
             ),
             StructFieldDecl(
                 name='mat_emission',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='emission (x rgb)                         (nmat x 1)',
             ),
             StructFieldDecl(
                 name='mat_specular',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='specular (x white)                       (nmat x 1)',
             ),
             StructFieldDecl(
                 name='mat_shininess',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='shininess coef                           (nmat x 1)',
             ),
             StructFieldDecl(
                 name='mat_reflectance',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='reflectance (0: disable)                 (nmat x 1)',
             ),
             StructFieldDecl(
                 name='mat_rgba',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='rgba                                     (nmat x 4)',
             ),
             StructFieldDecl(
                 name='pair_dim',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='contact dimensionality                   (npair x 1)',
             ),
             StructFieldDecl(
                 name='pair_geom1',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of geom1                              (npair x 1)',
             ),
             StructFieldDecl(
                 name='pair_geom2',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of geom2                              (npair x 1)',
             ),
             StructFieldDecl(
                 name='pair_signature',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='(body1+1)<<16 + body2+1                (npair x 1)',
             ),
             StructFieldDecl(
                 name='pair_solref',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='solver reference: contact normal         (npair x mjNREF)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='pair_solreffriction',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='solver reference: contact friction       (npair x mjNREF)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='pair_solimp',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='solver impedance: contact                (npair x mjNIMP)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='pair_margin',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='detect contact if dist<margin(npair x 1)',
             ),
             StructFieldDecl(
                 name='pair_gap',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='include in solver if dist<margin-gap     (npair x 1)',
             ),
             StructFieldDecl(
                 name='pair_friction',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='tangent1, 2, spin, roll1, 2              (npair x 5)',
             ),
             StructFieldDecl(
                 name='exclude_signature',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='(body1+1)<<16 + body2+1                (nexclude x 1)',
             ),
             StructFieldDecl(
                 name='eq_type',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='constraint type (mjtEq)                  (neq x 1)',
             ),
             StructFieldDecl(
                 name='eq_obj1id',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of object 1                           (neq x 1)',
             ),
             StructFieldDecl(
                 name='eq_obj2id',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of object 2                           (neq x 1)',
             ),
             StructFieldDecl(
                 name='eq_active',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='enable/disable constraint                (neq x 1)',
             ),
             StructFieldDecl(
                 name='eq_solref',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver reference              (neq x mjNREF)',
             ),
             StructFieldDecl(
                 name='eq_solimp',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver impedance              (neq x mjNIMP)',
             ),
             StructFieldDecl(
                 name='eq_data',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='numeric data for constraint              (neq x mjNEQDATA)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='tendon_adr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="address of first object in tendon's path (ntendon x 1)",
             ),
             StructFieldDecl(
                 name='tendon_num',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="number of objects in tendon's path       (ntendon x 1)",
             ),
             StructFieldDecl(
                 name='tendon_matid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='material id for rendering                (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='tendon_group',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='group for visibility                     (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='tendon_limited',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='does tendon have length limits           (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='tendon_width',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='width for rendering                      (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='tendon_solref_lim',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver reference: limit       (ntendon x mjNREF)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='tendon_solimp_lim',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver impedance: limit       (ntendon x mjNIMP)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='tendon_solref_fri',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver reference: friction    (ntendon x mjNREF)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='tendon_solimp_fri',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint solver impedance: friction    (ntendon x mjNIMP)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='tendon_range',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='tendon length limits                     (ntendon x 2)',
             ),
             StructFieldDecl(
                 name='tendon_margin',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='min distance for limit detection         (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='tendon_stiffness',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='stiffness coefficient                    (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='tendon_damping',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='damping coefficient                      (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='tendon_frictionloss',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='loss due to friction                     (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='tendon_lengthspring',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='spring resting length range              (ntendon x 2)',
             ),
             StructFieldDecl(
                 name='tendon_length0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='tendon length in qpos0                   (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='tendon_invweight0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='inv. weight in qpos0                     (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='tendon_user',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='user data                                (ntendon x nuser_tendon)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='tendon_rgba',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='rgba when material is omitted            (ntendon x 4)',
             ),
             StructFieldDecl(
                 name='wrap_type',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='wrap object type (mjtWrap)               (nwrap x 1)',
             ),
             StructFieldDecl(
                 name='wrap_objid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='object id: geom, site, joint             (nwrap x 1)',
             ),
             StructFieldDecl(
                 name='wrap_prm',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='divisor, joint coef, or site id          (nwrap x 1)',
             ),
             StructFieldDecl(
                 name='actuator_trntype',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='transmission type (mjtTrn)               (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_dyntype',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='dynamics type (mjtDyn)                   (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_gaintype',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='gain type (mjtGain)                      (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_biastype',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='bias type (mjtBias)                      (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_trnid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='transmission id: joint, tendon, site     (nu x 2)',
             ),
             StructFieldDecl(
                 name='actuator_actadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='first activation address; -1: stateless  (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_actnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of activation variables           (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_group',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='group for visibility                     (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_ctrllimited',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='is control limited                       (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_forcelimited',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='is force limited                         (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_actlimited',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='is activation limited                    (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_dynprm',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='dynamics parameters                      (nu x mjNDYN)',
             ),
             StructFieldDecl(
                 name='actuator_gainprm',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='gain parameters                          (nu x mjNGAIN)',
             ),
             StructFieldDecl(
                 name='actuator_biasprm',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='bias parameters                          (nu x mjNBIAS)',
             ),
             StructFieldDecl(
                 name='actuator_actearly',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='step activation before force             (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_ctrlrange',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='range of controls                        (nu x 2)',
             ),
             StructFieldDecl(
                 name='actuator_forcerange',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='range of forces                          (nu x 2)',
             ),
             StructFieldDecl(
                 name='actuator_actrange',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='range of activations                     (nu x 2)',
             ),
             StructFieldDecl(
                 name='actuator_gear',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='scale length and transmitted force       (nu x 6)',
             ),
             StructFieldDecl(
                 name='actuator_cranklength',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='crank length for slider-crank            (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_acc0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='acceleration from unit force in qpos0    (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_length0',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='actuator length in qpos0                 (nu x 1)',
             ),
             StructFieldDecl(
                 name='actuator_lengthrange',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='feasible actuator length range           (nu x 2)',
             ),
             StructFieldDecl(
                 name='actuator_user',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='user data                                (nu x nuser_actuator)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='actuator_plugin',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='plugin instance id; -1: not a plugin     (nu x 1)',
             ),
             StructFieldDecl(
                 name='sensor_type',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='sensor type (mjtSensor)                  (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_datatype',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='numeric data type (mjtDataType)          (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_needstage',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='required compute stage (mjtStage)        (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_objtype',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='type of sensorized object (mjtObj)       (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_objid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of sensorized object                  (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_reftype',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='type of reference frame (mjtObj)         (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_refid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of reference frame; -1: global frame  (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_dim',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of scalar outputs                 (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_adr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address in sensor array                  (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_cutoff',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='cutoff for real and positive; 0: ignore  (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_noise',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='noise standard deviation                 (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='sensor_user',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='user data                                (nsensor x nuser_sensor)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='sensor_plugin',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='plugin instance id; -1: not a plugin     (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='plugin',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='globally registered plugin slot number   (nplugin x 1)',
             ),
             StructFieldDecl(
                 name='plugin_stateadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address in the plugin state array        (nplugin x 1)',
             ),
             StructFieldDecl(
                 name='plugin_statenum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of states in the plugin instance  (nplugin x 1)',
             ),
             StructFieldDecl(
                 name='plugin_attr',
                 type=PointerType(
                     inner_type=ValueType(name='char'),
                 ),
                 doc='config attributes of plugin instances    (npluginattr x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='plugin_attradr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="address to each instance's config attrib (nplugin x 1)",
             ),
             StructFieldDecl(
                 name='numeric_adr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address of field in numeric_data         (nnumeric x 1)',
             ),
             StructFieldDecl(
                 name='numeric_size',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='size of numeric field                    (nnumeric x 1)',
             ),
             StructFieldDecl(
                 name='numeric_data',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='array of all numeric fields              (nnumericdata x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='text_adr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address of text in text_data             (ntext x 1)',
             ),
             StructFieldDecl(
                 name='text_size',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='size of text field (strlen+1)            (ntext x 1)',
             ),
             StructFieldDecl(
                 name='text_data',
                 type=PointerType(
                     inner_type=ValueType(name='char'),
                 ),
                 doc='array of all text fields (0-terminated)  (ntextdata x 1)',
             ),
             StructFieldDecl(
                 name='tuple_adr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address of text in text_data             (ntuple x 1)',
             ),
             StructFieldDecl(
                 name='tuple_size',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of objects in tuple               (ntuple x 1)',
             ),
             StructFieldDecl(
                 name='tuple_objtype',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='array of object types in all tuples      (ntupledata x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='tuple_objid',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='array of object ids in all tuples        (ntupledata x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='tuple_objprm',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='array of object params in all tuples     (ntupledata x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='key_time',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='key time                                 (nkey x 1)',
             ),
             StructFieldDecl(
                 name='key_qpos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='key position                             (nkey x nq)',
             ),
             StructFieldDecl(
                 name='key_qvel',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='key velocity                             (nkey x nv)',
             ),
             StructFieldDecl(
                 name='key_act',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='key activation                           (nkey x na)',
             ),
             StructFieldDecl(
                 name='key_mpos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='key mocap position                       (nkey x 3*nmocap)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='key_mquat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='key mocap quaternion                     (nkey x 4*nmocap)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='key_ctrl',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='key control                              (nkey x nu)',
             ),
             StructFieldDecl(
                 name='name_bodyadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='body name pointers                       (nbody x 1)',
             ),
             StructFieldDecl(
                 name='name_jntadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='joint name pointers                      (njnt x 1)',
             ),
             StructFieldDecl(
                 name='name_geomadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='geom name pointers                       (ngeom x 1)',
             ),
             StructFieldDecl(
                 name='name_siteadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='site name pointers                       (nsite x 1)',
             ),
             StructFieldDecl(
                 name='name_camadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='camera name pointers                     (ncam x 1)',
             ),
             StructFieldDecl(
                 name='name_lightadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='light name pointers                      (nlight x 1)',
             ),
             StructFieldDecl(
                 name='name_meshadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='mesh name pointers                       (nmesh x 1)',
             ),
             StructFieldDecl(
                 name='name_skinadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='skin name pointers                       (nskin x 1)',
             ),
             StructFieldDecl(
                 name='name_hfieldadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='hfield name pointers                     (nhfield x 1)',
             ),
             StructFieldDecl(
                 name='name_texadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='texture name pointers                    (ntex x 1)',
             ),
             StructFieldDecl(
                 name='name_matadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='material name pointers                   (nmat x 1)',
             ),
             StructFieldDecl(
                 name='name_pairadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='geom pair name pointers                  (npair x 1)',
             ),
             StructFieldDecl(
                 name='name_excludeadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='exclude name pointers                    (nexclude x 1)',
             ),
             StructFieldDecl(
                 name='name_eqadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='equality constraint name pointers        (neq x 1)',
             ),
             StructFieldDecl(
                 name='name_tendonadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='tendon name pointers                     (ntendon x 1)',
             ),
             StructFieldDecl(
                 name='name_actuatoradr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='actuator name pointers                   (nu x 1)',
             ),
             StructFieldDecl(
                 name='name_sensoradr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='sensor name pointers                     (nsensor x 1)',
             ),
             StructFieldDecl(
                 name='name_numericadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='numeric name pointers                    (nnumeric x 1)',
             ),
             StructFieldDecl(
                 name='name_textadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='text name pointers                       (ntext x 1)',
             ),
             StructFieldDecl(
                 name='name_tupleadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='tuple name pointers                      (ntuple x 1)',
             ),
             StructFieldDecl(
                 name='name_keyadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='keyframe name pointers                   (nkey x 1)',
             ),
             StructFieldDecl(
                 name='name_pluginadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='plugin instance name pointers            (nplugin x 1)',
             ),
             StructFieldDecl(
                 name='names',
                 type=PointerType(
                     inner_type=ValueType(name='char'),
                 ),
                 doc='names of all objects, 0-terminated       (nnames x 1)',
             ),
             StructFieldDecl(
                 name='names_map',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='internal hash map of names               (nnames_map x 1)',  # pylint: disable=line-too-long
             ),
         ),
     )),
    ('mjContact',
     StructDecl(
         name='mjContact',
         declname='struct mjContact_',
         fields=(
             StructFieldDecl(
                 name='dist',
                 type=ValueType(name='mjtNum'),
                 doc='distance between nearest points; neg: penetration',
             ),
             StructFieldDecl(
                 name='pos',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(3,),
                 ),
                 doc='position of contact point: midpoint between geoms',
             ),
             StructFieldDecl(
                 name='frame',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(9,),
                 ),
                 doc='normal is in [0-2]',
             ),
             StructFieldDecl(
                 name='includemargin',
                 type=ValueType(name='mjtNum'),
                 doc='include if dist<includemargin=margin-gap',
             ),
             StructFieldDecl(
                 name='friction',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(5,),
                 ),
                 doc='tangent1, 2, spin, roll1, 2',
             ),
             StructFieldDecl(
                 name='solref',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(2,),
                 ),
                 doc='constraint solver reference, normal direction',
             ),
             StructFieldDecl(
                 name='solreffriction',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(2,),
                 ),
                 doc='constraint solver reference, friction directions',
             ),
             StructFieldDecl(
                 name='solimp',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(5,),
                 ),
                 doc='constraint solver impedance',
             ),
             StructFieldDecl(
                 name='mu',
                 type=ValueType(name='mjtNum'),
                 doc='friction of regularized cone, set by mj_makeConstraint',
             ),
             StructFieldDecl(
                 name='H',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(36,),
                 ),
                 doc='cone Hessian, set by mj_updateConstraint',
             ),
             StructFieldDecl(
                 name='dim',
                 type=ValueType(name='int'),
                 doc='contact space dimensionality: 1, 3, 4 or 6',
             ),
             StructFieldDecl(
                 name='geom1',
                 type=ValueType(name='int'),
                 doc='id of geom 1',
             ),
             StructFieldDecl(
                 name='geom2',
                 type=ValueType(name='int'),
                 doc='id of geom 2',
             ),
             StructFieldDecl(
                 name='exclude',
                 type=ValueType(name='int'),
                 doc='0: include, 1: in gap, 2: fused, 3: no dofs',
             ),
             StructFieldDecl(
                 name='efc_address',
                 type=ValueType(name='int'),
                 doc='address in efc; -1: not included',
             ),
         ),
     )),
    ('mjWarningStat',
     StructDecl(
         name='mjWarningStat',
         declname='struct mjWarningStat_',
         fields=(
             StructFieldDecl(
                 name='lastinfo',
                 type=ValueType(name='int'),
                 doc='info from last warning',
             ),
             StructFieldDecl(
                 name='number',
                 type=ValueType(name='int'),
                 doc='how many times was warning raised',
             ),
         ),
     )),
    ('mjTimerStat',
     StructDecl(
         name='mjTimerStat',
         declname='struct mjTimerStat_',
         fields=(
             StructFieldDecl(
                 name='duration',
                 type=ValueType(name='mjtNum'),
                 doc='cumulative duration',
             ),
             StructFieldDecl(
                 name='number',
                 type=ValueType(name='int'),
                 doc='how many times was timer called',
             ),
         ),
     )),
    ('mjSolverStat',
     StructDecl(
         name='mjSolverStat',
         declname='struct mjSolverStat_',
         fields=(
             StructFieldDecl(
                 name='improvement',
                 type=ValueType(name='mjtNum'),
                 doc='cost reduction, scaled by 1/trace(M(qpos0))',
             ),
             StructFieldDecl(
                 name='gradient',
                 type=ValueType(name='mjtNum'),
                 doc='gradient norm (primal only, scaled)',
             ),
             StructFieldDecl(
                 name='lineslope',
                 type=ValueType(name='mjtNum'),
                 doc='slope in linesearch',
             ),
             StructFieldDecl(
                 name='nactive',
                 type=ValueType(name='int'),
                 doc='number of active constraints',
             ),
             StructFieldDecl(
                 name='nchange',
                 type=ValueType(name='int'),
                 doc='number of constraint state changes',
             ),
             StructFieldDecl(
                 name='neval',
                 type=ValueType(name='int'),
                 doc='number of cost evaluations in line search',
             ),
             StructFieldDecl(
                 name='nupdate',
                 type=ValueType(name='int'),
                 doc='number of Cholesky updates in line search',
             ),
         ),
     )),
    ('mjData',
     StructDecl(
         name='mjData',
         declname='struct mjData_',
         fields=(
             StructFieldDecl(
                 name='narena',
                 type=ValueType(name='size_t'),
                 doc='size of the arena in bytes (inclusive of the stack)',
             ),
             StructFieldDecl(
                 name='nbuffer',
                 type=ValueType(name='size_t'),
                 doc='size of main buffer in bytes',
             ),
             StructFieldDecl(
                 name='nplugin',
                 type=ValueType(name='int'),
                 doc='number of plugin instances',
             ),
             StructFieldDecl(
                 name='pstack',
                 type=ValueType(name='size_t'),
                 doc='first available mjtNum address in stack',
             ),
             StructFieldDecl(
                 name='pbase',
                 type=ValueType(name='size_t'),
                 doc='value of pstack when mj_markStack was last called',
             ),
             StructFieldDecl(
                 name='parena',
                 type=ValueType(name='size_t'),
                 doc='first available byte in arena',
             ),
             StructFieldDecl(
                 name='maxuse_stack',
                 type=ValueType(name='size_t'),
                 doc='maximum stack allocation',
             ),
             StructFieldDecl(
                 name='maxuse_arena',
                 type=ValueType(name='size_t'),
                 doc='maximum arena allocation',
             ),
             StructFieldDecl(
                 name='maxuse_con',
                 type=ValueType(name='int'),
                 doc='maximum number of contacts',
             ),
             StructFieldDecl(
                 name='maxuse_efc',
                 type=ValueType(name='int'),
                 doc='maximum number of scalar constraints',
             ),
             StructFieldDecl(
                 name='warning',
                 type=ArrayType(
                     inner_type=ValueType(name='mjWarningStat'),
                     extents=(8,),
                 ),
                 doc='warning statistics',
             ),
             StructFieldDecl(
                 name='timer',
                 type=ArrayType(
                     inner_type=ValueType(name='mjTimerStat'),
                     extents=(13,),
                 ),
                 doc='timer statistics',
             ),
             StructFieldDecl(
                 name='solver',
                 type=ArrayType(
                     inner_type=ValueType(name='mjSolverStat'),
                     extents=(4000,),
                 ),
                 doc='solver statistics per island, per iteration',
             ),
             StructFieldDecl(
                 name='solver_nisland',
                 type=ValueType(name='int'),
                 doc='number of islands processed by solver',
             ),
             StructFieldDecl(
                 name='solver_niter',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(20,),
                 ),
                 doc='number of solver iterations, per island',
             ),
             StructFieldDecl(
                 name='solver_nnz',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(20,),
                 ),
                 doc='number of non-zeros in Hessian or efc_AR, per island',
             ),
             StructFieldDecl(
                 name='solver_fwdinv',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(2,),
                 ),
                 doc='forward-inverse comparison: qfrc, efc',
             ),
             StructFieldDecl(
                 name='nbodypair_broad',
                 type=ValueType(name='int'),
                 doc='number of body pairs in collision according to the broad-phase',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='nbodypair_narrow',
                 type=ValueType(name='int'),
                 doc='number of body pairs actually in collision in the narrow-phase',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ngeompair_mid',
                 type=ValueType(name='int'),
                 doc='number of geom pairs in collision according to the mid-phase',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ngeompair_narrow',
                 type=ValueType(name='int'),
                 doc='number of geom pairs actually in collision in the narrow-phase',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ne',
                 type=ValueType(name='int'),
                 doc='number of equality constraints',
             ),
             StructFieldDecl(
                 name='nf',
                 type=ValueType(name='int'),
                 doc='number of friction constraints',
             ),
             StructFieldDecl(
                 name='nl',
                 type=ValueType(name='int'),
                 doc='number of limit constraints',
             ),
             StructFieldDecl(
                 name='nefc',
                 type=ValueType(name='int'),
                 doc='number of constraints',
             ),
             StructFieldDecl(
                 name='nnzJ',
                 type=ValueType(name='int'),
                 doc='number of non-zeros in constraint Jacobian',
             ),
             StructFieldDecl(
                 name='ncon',
                 type=ValueType(name='int'),
                 doc='number of detected contacts',
             ),
             StructFieldDecl(
                 name='nisland',
                 type=ValueType(name='int'),
                 doc='number of detected constraint islands',
             ),
             StructFieldDecl(
                 name='time',
                 type=ValueType(name='mjtNum'),
                 doc='simulation time',
             ),
             StructFieldDecl(
                 name='energy',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(2,),
                 ),
                 doc='potential, kinetic energy',
             ),
             StructFieldDecl(
                 name='buffer',
                 type=PointerType(
                     inner_type=ValueType(name='void'),
                 ),
                 doc='main buffer; all pointers point in it                (nbuffer bytes)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='arena',
                 type=PointerType(
                     inner_type=ValueType(name='void'),
                 ),
                 doc='arena+stack buffer                     (nstack*sizeof(mjtNum) bytes)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qpos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='position                                         (nq x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qvel',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='velocity                                         (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='act',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='actuator activation                              (na x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qacc_warmstart',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='acceleration used for warmstart                  (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='plugin_state',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='plugin state                                     (npluginstate x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ctrl',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='control                                          (nu x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qfrc_applied',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='applied generalized force                        (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='xfrc_applied',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='applied Cartesian force/torque                   (nbody x 6)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='mocap_pos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='positions of mocap bodies                        (nmocap x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='mocap_quat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='orientations of mocap bodies                     (nmocap x 4)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qacc',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='acceleration                                     (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='act_dot',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='time-derivative of actuator activation           (na x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='userdata',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='user data, not touched by engine                 (nuserdata x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='sensordata',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='sensor data array                                (nsensordata x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='plugin',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='copy of m->plugin, required for deletion         (nplugin x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='plugin_data',
                 type=PointerType(
                     inner_type=ValueType(name='uintptr_t'),
                 ),
                 doc='pointer to plugin-managed data structure         (nplugin x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='xpos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian position of body frame                 (nbody x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='xquat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian orientation of body frame              (nbody x 4)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='xmat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian orientation of body frame              (nbody x 9)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='xipos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian position of body com                   (nbody x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ximat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian orientation of body inertia            (nbody x 9)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='xanchor',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian position of joint anchor               (njnt x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='xaxis',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian joint axis                             (njnt x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='geom_xpos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian geom position                          (ngeom x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='geom_xmat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian geom orientation                       (ngeom x 9)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='site_xpos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian site position                          (nsite x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='site_xmat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian site orientation                       (nsite x 9)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='cam_xpos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian camera position                        (ncam x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='cam_xmat',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian camera orientation                     (ncam x 9)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='light_xpos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian light position                         (nlight x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='light_xdir',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian light direction                        (nlight x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='subtree_com',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='center of mass of each subtree                   (nbody x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='cdof',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='com-based motion axis of each dof                (nv x 6)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='cinert',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='com-based body inertia and mass                  (nbody x 10)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ten_wrapadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc="start address of tendon's path                   (ntendon x 1)",  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ten_wrapnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of wrap points in path                    (ntendon x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ten_J_rownnz',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of non-zeros in Jacobian row              (ntendon x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ten_J_rowadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='row start address in colind array                (ntendon x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ten_J_colind',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='column indices in sparse Jacobian                (ntendon x nv)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ten_length',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='tendon lengths                                   (ntendon x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ten_J',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='tendon Jacobian                                  (ntendon x nv)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='wrap_obj',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='geom id; -1: site; -2: pulley                    (nwrap*2 x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='wrap_xpos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='Cartesian 3D points in all path                  (nwrap*2 x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='actuator_length',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='actuator lengths                                 (nu x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='actuator_moment',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='actuator moments                                 (nu x nv)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='crb',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='com-based composite inertia and mass             (nbody x 10)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qM',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='total inertia (sparse)                           (nM x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qLD',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc="L'*D*L factorization of M (sparse)               (nM x 1)",  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qLDiagInv',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='1/diag(D)                                        (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qLDiagSqrtInv',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='1/sqrt(diag(D))                                  (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='bvh_active',
                 type=PointerType(
                     inner_type=ValueType(name='mjtByte'),
                 ),
                 doc='volume has been added to collisions              (nbvh x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='ten_velocity',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='tendon velocities                                (ntendon x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='actuator_velocity',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='actuator velocities                              (nu x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='cvel',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='com-based velocity [3D rot; 3D tran]             (nbody x 6)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='cdof_dot',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='time-derivative of cdof                          (nv x 6)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qfrc_bias',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='C(qpos,qvel)                                     (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qfrc_passive',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='passive force                                    (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='subtree_linvel',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='linear velocity of subtree com                   (nbody x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='subtree_angmom',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='angular momentum about subtree com               (nbody x 3)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qH',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc="L'*D*L factorization of modified M               (nM x 1)",  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qHDiagInv',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='1/diag(D) of modified M                          (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='D_rownnz',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='non-zeros in each row                            (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='D_rowadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address of each row in D_colind                  (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='D_colind',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='column indices of non-zeros                      (nD x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='B_rownnz',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='non-zeros in each row                            (nbody x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='B_rowadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address of each row in B_colind                  (nbody x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='B_colind',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='column indices of non-zeros                      (nB x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qDeriv',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='d (passive + actuator - bias) / d qvel           (nD x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qLU',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='sparse LU of (qM - dt*qDeriv)                    (nD x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='actuator_force',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='actuator force in actuation space                (nu x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qfrc_actuator',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='actuator force                                   (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qfrc_smooth',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='net unconstrained force                          (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qacc_smooth',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='unconstrained acceleration                       (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qfrc_constraint',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint force                                 (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='qfrc_inverse',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc="net external force; should equal:                (nv x 1)qfrc_applied + J'*xfrc_applied + qfrc_actuator",  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='cacc',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='com-based acceleration                           (nbody x 6)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='cfrc_int',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='com-based interaction force with parent          (nbody x 6)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='cfrc_ext',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='com-based external force on body                 (nbody x 6)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='contact',
                 type=PointerType(
                     inner_type=ValueType(name='mjContact'),
                 ),
                 doc='list of all detected contacts                    (ncon x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_type',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='constraint type (mjtConstraint)                  (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_id',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='id of object of specified type                   (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_J_rownnz',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of non-zeros in constraint Jacobian row   (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_J_rowadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='row start address in colind array                (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_J_rowsuper',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of subsequent rows in supernode           (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_J_colind',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='column indices in constraint Jacobian            (nnzJ x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_JT_rownnz',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of non-zeros in constraint Jacobian row T (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_JT_rowadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='row start address in colind array              T (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_JT_rowsuper',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of subsequent rows in supernode         T (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_JT_colind',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='column indices in constraint Jacobian          T (nnzJ x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_J',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint Jacobian                              (nnzJ x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_JT',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint Jacobian transposed                   (nnzJ x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_pos',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint position (equality, contact)          (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_margin',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='inclusion margin (contact)                       (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_frictionloss',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='frictionloss (friction)                          (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_diagApprox',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='approximation to diagonal of A                   (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_KBIP',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc="stiffness, damping, impedance, imp'              (nefc x 4)",  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_D',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint mass                                  (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_R',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='inverse constraint mass                          (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='tendon_efcadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='first efc address involving tendon; -1: none     (ntendon x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='dof_island',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='island id of this dof; -1: none                  (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='island_dofnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of dofs in island                         (nisland x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='island_dofadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='start address in island_dofind                   (nisland x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='island_dofind',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='island dof indices; -1: none                     (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='dof_islandind',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='dof island indices; -1: none                     (nv x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_island',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='island id of this constraint                     (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='island_efcnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of constraints in island                  (nisland x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='island_efcadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='start address in island_efcind                   (nisland x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='island_efcind',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='island constraint indices                        (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_AR_rownnz',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of non-zeros in AR                        (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_AR_rowadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='row start address in colind array                (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_AR_colind',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='column indices in sparse AR                      (nefc x nefc)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_AR',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc="J*inv(M)*J' + R                                  (nefc x nefc)",  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_vel',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='velocity in constraint space: J*qvel             (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_aref',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='reference pseudo-acceleration                    (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_b',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='linear cost term: J*qacc_smooth - aref            (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_force',
                 type=PointerType(
                     inner_type=ValueType(name='mjtNum'),
                 ),
                 doc='constraint force in constraint space              (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='efc_state',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='constraint state (mjtConstraintState)             (nefc x 1)',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='threadpool',
                 type=ValueType(name='uintptr_t'),
                 doc='ThreadPool for multithreaded operations',
             ),
         ),
     )),
    ('mjvPerturb',
     StructDecl(
         name='mjvPerturb',
         declname='struct mjvPerturb_',
         fields=(
             StructFieldDecl(
                 name='select',
                 type=ValueType(name='int'),
                 doc='selected body id; non-positive: none',
             ),
             StructFieldDecl(
                 name='skinselect',
                 type=ValueType(name='int'),
                 doc='selected skin id; negative: none',
             ),
             StructFieldDecl(
                 name='active',
                 type=ValueType(name='int'),
                 doc='perturbation bitmask (mjtPertBit)',
             ),
             StructFieldDecl(
                 name='active2',
                 type=ValueType(name='int'),
                 doc='secondary perturbation bitmask (mjtPertBit)',
             ),
             StructFieldDecl(
                 name='refpos',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(3,),
                 ),
                 doc='reference position for selected object',
             ),
             StructFieldDecl(
                 name='refquat',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(4,),
                 ),
                 doc='reference orientation for selected object',
             ),
             StructFieldDecl(
                 name='refselpos',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(3,),
                 ),
                 doc='reference position for selection point',
             ),
             StructFieldDecl(
                 name='localpos',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(3,),
                 ),
                 doc='selection point in object coordinates',
             ),
             StructFieldDecl(
                 name='localmass',
                 type=ValueType(name='mjtNum'),
                 doc='spatial inertia at selection point',
             ),
             StructFieldDecl(
                 name='scale',
                 type=ValueType(name='mjtNum'),
                 doc='relative mouse motion-to-space scaling (set by initPerturb)',  # pylint: disable=line-too-long
             ),
         ),
     )),
    ('mjvCamera',
     StructDecl(
         name='mjvCamera',
         declname='struct mjvCamera_',
         fields=(
             StructFieldDecl(
                 name='type',
                 type=ValueType(name='int'),
                 doc='camera type (mjtCamera)',
             ),
             StructFieldDecl(
                 name='fixedcamid',
                 type=ValueType(name='int'),
                 doc='fixed camera id',
             ),
             StructFieldDecl(
                 name='trackbodyid',
                 type=ValueType(name='int'),
                 doc='body id to track',
             ),
             StructFieldDecl(
                 name='lookat',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtNum'),
                     extents=(3,),
                 ),
                 doc='lookat point',
             ),
             StructFieldDecl(
                 name='distance',
                 type=ValueType(name='mjtNum'),
                 doc='distance to lookat point or tracked body',
             ),
             StructFieldDecl(
                 name='azimuth',
                 type=ValueType(name='mjtNum'),
                 doc='camera azimuth (deg)',
             ),
             StructFieldDecl(
                 name='elevation',
                 type=ValueType(name='mjtNum'),
                 doc='camera elevation (deg)',
             ),
         ),
     )),
    ('mjvGLCamera',
     StructDecl(
         name='mjvGLCamera',
         declname='struct mjvGLCamera_',
         fields=(
             StructFieldDecl(
                 name='pos',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='position',
             ),
             StructFieldDecl(
                 name='forward',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='forward direction',
             ),
             StructFieldDecl(
                 name='up',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='up direction',
             ),
             StructFieldDecl(
                 name='frustum_center',
                 type=ValueType(name='float'),
                 doc='hor. center (left,right set to match aspect)',
             ),
             StructFieldDecl(
                 name='frustum_bottom',
                 type=ValueType(name='float'),
                 doc='bottom',
             ),
             StructFieldDecl(
                 name='frustum_top',
                 type=ValueType(name='float'),
                 doc='top',
             ),
             StructFieldDecl(
                 name='frustum_near',
                 type=ValueType(name='float'),
                 doc='near',
             ),
             StructFieldDecl(
                 name='frustum_far',
                 type=ValueType(name='float'),
                 doc='far',
             ),
         ),
     )),
    ('mjvGeom',
     StructDecl(
         name='mjvGeom',
         declname='struct mjvGeom_',
         fields=(
             StructFieldDecl(
                 name='type',
                 type=ValueType(name='int'),
                 doc='geom type (mjtGeom)',
             ),
             StructFieldDecl(
                 name='dataid',
                 type=ValueType(name='int'),
                 doc='mesh, hfield or plane id; -1: none',
             ),
             StructFieldDecl(
                 name='objtype',
                 type=ValueType(name='int'),
                 doc='mujoco object type; mjOBJ_UNKNOWN for decor',
             ),
             StructFieldDecl(
                 name='objid',
                 type=ValueType(name='int'),
                 doc='mujoco object id; -1 for decor',
             ),
             StructFieldDecl(
                 name='category',
                 type=ValueType(name='int'),
                 doc='visual category',
             ),
             StructFieldDecl(
                 name='texid',
                 type=ValueType(name='int'),
                 doc='texture id; -1: no texture',
             ),
             StructFieldDecl(
                 name='texuniform',
                 type=ValueType(name='int'),
                 doc='uniform cube mapping',
             ),
             StructFieldDecl(
                 name='texcoord',
                 type=ValueType(name='int'),
                 doc='mesh geom has texture coordinates',
             ),
             StructFieldDecl(
                 name='segid',
                 type=ValueType(name='int'),
                 doc='segmentation id; -1: not shown',
             ),
             StructFieldDecl(
                 name='texrepeat',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(2,),
                 ),
                 doc='texture repetition for 2D mapping',
             ),
             StructFieldDecl(
                 name='size',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='size parameters',
             ),
             StructFieldDecl(
                 name='pos',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='Cartesian position',
             ),
             StructFieldDecl(
                 name='mat',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(9,),
                 ),
                 doc='Cartesian orientation',
             ),
             StructFieldDecl(
                 name='rgba',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(4,),
                 ),
                 doc='color and transparency',
             ),
             StructFieldDecl(
                 name='emission',
                 type=ValueType(name='float'),
                 doc='emission coef',
             ),
             StructFieldDecl(
                 name='specular',
                 type=ValueType(name='float'),
                 doc='specular coef',
             ),
             StructFieldDecl(
                 name='shininess',
                 type=ValueType(name='float'),
                 doc='shininess coef',
             ),
             StructFieldDecl(
                 name='reflectance',
                 type=ValueType(name='float'),
                 doc='reflectance coef',
             ),
             StructFieldDecl(
                 name='label',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(100,),
                 ),
                 doc='text label',
             ),
             StructFieldDecl(
                 name='camdist',
                 type=ValueType(name='float'),
                 doc='distance to camera (used by sorter)',
             ),
             StructFieldDecl(
                 name='modelrbound',
                 type=ValueType(name='float'),
                 doc='geom rbound from model, 0 if not model geom',
             ),
             StructFieldDecl(
                 name='transparent',
                 type=ValueType(name='mjtByte'),
                 doc='treat geom as transparent',
             ),
         ),
     )),
    ('mjvLight',
     StructDecl(
         name='mjvLight',
         declname='struct mjvLight_',
         fields=(
             StructFieldDecl(
                 name='pos',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='position rel. to body frame',
             ),
             StructFieldDecl(
                 name='dir',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='direction rel. to body frame',
             ),
             StructFieldDecl(
                 name='attenuation',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='OpenGL attenuation (quadratic model)',
             ),
             StructFieldDecl(
                 name='cutoff',
                 type=ValueType(name='float'),
                 doc='OpenGL cutoff',
             ),
             StructFieldDecl(
                 name='exponent',
                 type=ValueType(name='float'),
                 doc='OpenGL exponent',
             ),
             StructFieldDecl(
                 name='ambient',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='ambient rgb (alpha=1)',
             ),
             StructFieldDecl(
                 name='diffuse',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='diffuse rgb (alpha=1)',
             ),
             StructFieldDecl(
                 name='specular',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='specular rgb (alpha=1)',
             ),
             StructFieldDecl(
                 name='headlight',
                 type=ValueType(name='mjtByte'),
                 doc='headlight',
             ),
             StructFieldDecl(
                 name='directional',
                 type=ValueType(name='mjtByte'),
                 doc='directional light',
             ),
             StructFieldDecl(
                 name='castshadow',
                 type=ValueType(name='mjtByte'),
                 doc='does light cast shadows',
             ),
         ),
     )),
    ('mjvOption',
     StructDecl(
         name='mjvOption',
         declname='struct mjvOption_',
         fields=(
             StructFieldDecl(
                 name='label',
                 type=ValueType(name='int'),
                 doc='what objects to label (mjtLabel)',
             ),
             StructFieldDecl(
                 name='frame',
                 type=ValueType(name='int'),
                 doc='which frame to show (mjtFrame)',
             ),
             StructFieldDecl(
                 name='geomgroup',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtByte'),
                     extents=(6,),
                 ),
                 doc='geom visualization by group',
             ),
             StructFieldDecl(
                 name='sitegroup',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtByte'),
                     extents=(6,),
                 ),
                 doc='site visualization by group',
             ),
             StructFieldDecl(
                 name='jointgroup',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtByte'),
                     extents=(6,),
                 ),
                 doc='joint visualization by group',
             ),
             StructFieldDecl(
                 name='tendongroup',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtByte'),
                     extents=(6,),
                 ),
                 doc='tendon visualization by group',
             ),
             StructFieldDecl(
                 name='actuatorgroup',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtByte'),
                     extents=(6,),
                 ),
                 doc='actuator visualization by group',
             ),
             StructFieldDecl(
                 name='skingroup',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtByte'),
                     extents=(6,),
                 ),
                 doc='skin visualization by group',
             ),
             StructFieldDecl(
                 name='flags',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtByte'),
                     extents=(27,),
                 ),
                 doc='visualization flags (indexed by mjtVisFlag)',
             ),
             StructFieldDecl(
                 name='bvh_depth',
                 type=ValueType(name='int'),
                 doc='depth of the bounding volume hierarchy to be visualized',
             ),
         ),
     )),
    ('mjvScene',
     StructDecl(
         name='mjvScene',
         declname='struct mjvScene_',
         fields=(
             StructFieldDecl(
                 name='maxgeom',
                 type=ValueType(name='int'),
                 doc='size of allocated geom buffer',
             ),
             StructFieldDecl(
                 name='ngeom',
                 type=ValueType(name='int'),
                 doc='number of geoms currently in buffer',
             ),
             StructFieldDecl(
                 name='geoms',
                 type=PointerType(
                     inner_type=ValueType(name='mjvGeom'),
                 ),
                 doc='buffer for geoms (ngeom)',
             ),
             StructFieldDecl(
                 name='geomorder',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='buffer for ordering geoms by distance to camera (ngeom)',
             ),
             StructFieldDecl(
                 name='nskin',
                 type=ValueType(name='int'),
                 doc='number of skins',
             ),
             StructFieldDecl(
                 name='skinfacenum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of faces in skin (nskin)',
             ),
             StructFieldDecl(
                 name='skinvertadr',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='address of skin vertices (nskin)',
             ),
             StructFieldDecl(
                 name='skinvertnum',
                 type=PointerType(
                     inner_type=ValueType(name='int'),
                 ),
                 doc='number of vertices in skin (nskin)',
             ),
             StructFieldDecl(
                 name='skinvert',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='skin vertex data (nskin)',
             ),
             StructFieldDecl(
                 name='skinnormal',
                 type=PointerType(
                     inner_type=ValueType(name='float'),
                 ),
                 doc='skin normal data (nskin)',
             ),
             StructFieldDecl(
                 name='nlight',
                 type=ValueType(name='int'),
                 doc='number of lights currently in buffer',
             ),
             StructFieldDecl(
                 name='lights',
                 type=ArrayType(
                     inner_type=ValueType(name='mjvLight'),
                     extents=(100,),
                 ),
                 doc='buffer for lights (nlight)',
             ),
             StructFieldDecl(
                 name='camera',
                 type=ArrayType(
                     inner_type=ValueType(name='mjvGLCamera'),
                     extents=(2,),
                 ),
                 doc='left and right camera',
             ),
             StructFieldDecl(
                 name='enabletransform',
                 type=ValueType(name='mjtByte'),
                 doc='enable model transformation',
             ),
             StructFieldDecl(
                 name='translate',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='model translation',
             ),
             StructFieldDecl(
                 name='rotate',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(4,),
                 ),
                 doc='model quaternion rotation',
             ),
             StructFieldDecl(
                 name='scale',
                 type=ValueType(name='float'),
                 doc='model scaling',
             ),
             StructFieldDecl(
                 name='stereo',
                 type=ValueType(name='int'),
                 doc='stereoscopic rendering (mjtStereo)',
             ),
             StructFieldDecl(
                 name='flags',
                 type=ArrayType(
                     inner_type=ValueType(name='mjtByte'),
                     extents=(10,),
                 ),
                 doc='rendering flags (indexed by mjtRndFlag)',
             ),
             StructFieldDecl(
                 name='framewidth',
                 type=ValueType(name='int'),
                 doc='frame pixel width; 0: disable framing',
             ),
             StructFieldDecl(
                 name='framergb',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='frame color',
             ),
         ),
     )),
    ('mjvFigure',
     StructDecl(
         name='mjvFigure',
         declname='struct mjvFigure_',
         fields=(
             StructFieldDecl(
                 name='flg_legend',
                 type=ValueType(name='int'),
                 doc='show legend',
             ),
             StructFieldDecl(
                 name='flg_ticklabel',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(2,),
                 ),
                 doc='show grid tick labels (x,y)',
             ),
             StructFieldDecl(
                 name='flg_extend',
                 type=ValueType(name='int'),
                 doc='automatically extend axis ranges to fit data',
             ),
             StructFieldDecl(
                 name='flg_barplot',
                 type=ValueType(name='int'),
                 doc='isolated line segments (i.e. GL_LINES)',
             ),
             StructFieldDecl(
                 name='flg_selection',
                 type=ValueType(name='int'),
                 doc='vertical selection line',
             ),
             StructFieldDecl(
                 name='flg_symmetric',
                 type=ValueType(name='int'),
                 doc='symmetric y-axis',
             ),
             StructFieldDecl(
                 name='linewidth',
                 type=ValueType(name='float'),
                 doc='line width',
             ),
             StructFieldDecl(
                 name='gridwidth',
                 type=ValueType(name='float'),
                 doc='grid line width',
             ),
             StructFieldDecl(
                 name='gridsize',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(2,),
                 ),
                 doc='number of grid points in (x,y)',
             ),
             StructFieldDecl(
                 name='gridrgb',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='grid line rgb',
             ),
             StructFieldDecl(
                 name='figurergba',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(4,),
                 ),
                 doc='figure color and alpha',
             ),
             StructFieldDecl(
                 name='panergba',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(4,),
                 ),
                 doc='pane color and alpha',
             ),
             StructFieldDecl(
                 name='legendrgba',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(4,),
                 ),
                 doc='legend color and alpha',
             ),
             StructFieldDecl(
                 name='textrgb',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='text color',
             ),
             StructFieldDecl(
                 name='linergb',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(100, 3),
                 ),
                 doc='line colors',
             ),
             StructFieldDecl(
                 name='range',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(2, 2),
                 ),
                 doc='axis ranges; (min>=max) automatic',
             ),
             StructFieldDecl(
                 name='xformat',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(20,),
                 ),
                 doc='x-tick label format for sprintf',
             ),
             StructFieldDecl(
                 name='yformat',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(20,),
                 ),
                 doc='y-tick label format for sprintf',
             ),
             StructFieldDecl(
                 name='minwidth',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(20,),
                 ),
                 doc='string used to determine min y-tick width',
             ),
             StructFieldDecl(
                 name='title',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(1000,),
                 ),
                 doc='figure title; subplots separated with 2+ spaces',
             ),
             StructFieldDecl(
                 name='xlabel',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(100,),
                 ),
                 doc='x-axis label',
             ),
             StructFieldDecl(
                 name='linename',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(100, 100),
                 ),
                 doc='line names for legend',
             ),
             StructFieldDecl(
                 name='legendoffset',
                 type=ValueType(name='int'),
                 doc='number of lines to offset legend',
             ),
             StructFieldDecl(
                 name='subplot',
                 type=ValueType(name='int'),
                 doc='selected subplot (for title rendering)',
             ),
             StructFieldDecl(
                 name='highlight',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(2,),
                 ),
                 doc='if point is in legend rect, highlight line',
             ),
             StructFieldDecl(
                 name='highlightid',
                 type=ValueType(name='int'),
                 doc='if id>=0 and no point, highlight id',
             ),
             StructFieldDecl(
                 name='selection',
                 type=ValueType(name='float'),
                 doc='selection line x-value',
             ),
             StructFieldDecl(
                 name='linepnt',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(100,),
                 ),
                 doc='number of points in line; (0) disable',
             ),
             StructFieldDecl(
                 name='linedata',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(100, 2000),
                 ),
                 doc='line data (x,y)',
             ),
             StructFieldDecl(
                 name='xaxispixel',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(2,),
                 ),
                 doc='range of x-axis in pixels',
             ),
             StructFieldDecl(
                 name='yaxispixel',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(2,),
                 ),
                 doc='range of y-axis in pixels',
             ),
             StructFieldDecl(
                 name='xaxisdata',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(2,),
                 ),
                 doc='range of x-axis in data units',
             ),
             StructFieldDecl(
                 name='yaxisdata',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(2,),
                 ),
                 doc='range of y-axis in data units',
             ),
         ),
     )),
    ('mjvSceneState',
     StructDecl(
         name='mjvSceneState',
         declname='struct mjvSceneState_',
         fields=(
             StructFieldDecl(
                 name='nbuffer',
                 type=ValueType(name='int'),
                 doc='size of the buffer in bytes',
             ),
             StructFieldDecl(
                 name='buffer',
                 type=PointerType(
                     inner_type=ValueType(name='void'),
                 ),
                 doc='heap-allocated memory for all arrays in this struct',
             ),
             StructFieldDecl(
                 name='maxgeom',
                 type=ValueType(name='int'),
                 doc='maximum number of mjvGeom supported by this state object',
             ),
             StructFieldDecl(
                 name='plugincache',
                 type=ValueType(name='mjvScene'),
                 doc='scratch space for vis geoms inserted by plugins',
             ),
             StructFieldDecl(
                 name='model',
                 type=AnonymousStructDecl(
                     fields=(
                         StructFieldDecl(
                             name='nv',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nu',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='na',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nbody',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nbvh',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='njnt',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='ngeom',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nsite',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='ncam',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nlight',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nmesh',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nskin',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nskinvert',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nskinface',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nskinbone',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nskinbonevert',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nmat',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='neq',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='ntendon',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='ntree',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nwrap',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nsensor',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nnames',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nsensordata',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='opt',
                             type=ValueType(name='mjOption'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='vis',
                             type=ValueType(name='mjVisual'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='stat',
                             type=ValueType(name='mjStatistic'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_parentid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_rootid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_weldid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_mocapid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_jntnum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_jntadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_dofnum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_dofadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_geomnum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_geomadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_iquat',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_mass',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_inertia',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_bvhadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='body_bvhnum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='bvh_depth',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='bvh_child',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='bvh_geomid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='bvh_aabb',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='jnt_type',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='jnt_bodyid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='jnt_group',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_type',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_bodyid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_contype',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_conaffinity',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_dataid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_matid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_group',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_size',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_aabb',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_rbound',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_rgba',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='site_type',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='site_bodyid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='site_matid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='site_group',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='site_size',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='site_rgba',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='cam_fovy',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='cam_ipd',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_directional',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtByte'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_castshadow',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtByte'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_active',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtByte'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_attenuation',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_cutoff',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_exponent',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_ambient',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_diffuse',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_specular',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mesh_bvhadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mesh_bvhnum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mesh_texcoordadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mesh_graphadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_matid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_group',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_rgba',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_inflate',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_vertadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_vertnum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_texcoordadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_faceadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_facenum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_boneadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_bonenum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_vert',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_face',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_bonevertadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_bonevertnum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_bonebindpos',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_bonebindquat',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_bonebodyid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_bonevertid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='skin_bonevertweight',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mat_texid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mat_texuniform',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtByte'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mat_texrepeat',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mat_emission',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mat_specular',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mat_shininess',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mat_reflectance',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='mat_rgba',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='eq_type',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='eq_obj1id',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='eq_obj2id',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='eq_active',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtByte'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='eq_data',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_num',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_matid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_group',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_limited',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtByte'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_width',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_range',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_stiffness',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_damping',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_frictionloss',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_lengthspring',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_rgba',
                             type=PointerType(
                                 inner_type=ValueType(name='float'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_trntype',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_dyntype',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_trnid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_actadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_actnum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_group',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_ctrllimited',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtByte'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_actlimited',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtByte'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_ctrlrange',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_actrange',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='actuator_cranklength',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='sensor_type',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='sensor_objid',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='sensor_adr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='name_bodyadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='name_jntadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='name_geomadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='name_siteadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='name_camadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='name_lightadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='name_eqadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='name_tendonadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='name_actuatoradr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='names',
                             type=PointerType(
                                 inner_type=ValueType(name='char'),
                             ),
                             doc='',
                         ),
                     ),
                 ),
                 doc='',
             ),
             StructFieldDecl(
                 name='data',
                 type=AnonymousStructDecl(
                     fields=(
                         StructFieldDecl(
                             name='warning',
                             type=ArrayType(
                                 inner_type=ValueType(name='mjWarningStat'),
                                 extents=(8,),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nefc',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='ncon',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='nisland',
                             type=ValueType(name='int'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='time',
                             type=ValueType(name='mjtNum'),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='act',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='ctrl',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='xfrc_applied',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='sensordata',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='xpos',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='xquat',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='xmat',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='xipos',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='ximat',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='xanchor',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='xaxis',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_xpos',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='geom_xmat',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='site_xpos',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='site_xmat',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='cam_xpos',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='cam_xmat',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_xpos',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='light_xdir',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='subtree_com',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='ten_wrapadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='ten_wrapnum',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='wrap_obj',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='ten_length',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='wrap_xpos',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='bvh_active',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtByte'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='island_dofadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='island_dofind',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='dof_island',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='efc_island',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='tendon_efcadr',
                             type=PointerType(
                                 inner_type=ValueType(name='int'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='contact',
                             type=PointerType(
                                 inner_type=ValueType(name='mjContact'),
                             ),
                             doc='',
                         ),
                         StructFieldDecl(
                             name='efc_force',
                             type=PointerType(
                                 inner_type=ValueType(name='mjtNum'),
                             ),
                             doc='',
                         ),
                     ),
                 ),
                 doc='',
             ),
         ),
     )),
    ('mjrRect',
     StructDecl(
         name='mjrRect',
         declname='struct mjrRect_',
         fields=(
             StructFieldDecl(
                 name='left',
                 type=ValueType(name='int'),
                 doc='left (usually 0)',
             ),
             StructFieldDecl(
                 name='bottom',
                 type=ValueType(name='int'),
                 doc='bottom (usually 0)',
             ),
             StructFieldDecl(
                 name='width',
                 type=ValueType(name='int'),
                 doc='width (usually buffer width)',
             ),
             StructFieldDecl(
                 name='height',
                 type=ValueType(name='int'),
                 doc='height (usually buffer height)',
             ),
         ),
     )),
    ('mjrContext',
     StructDecl(
         name='mjrContext',
         declname='struct mjrContext_',
         fields=(
             StructFieldDecl(
                 name='lineWidth',
                 type=ValueType(name='float'),
                 doc='line width for wireframe rendering',
             ),
             StructFieldDecl(
                 name='shadowClip',
                 type=ValueType(name='float'),
                 doc='clipping radius for directional lights',
             ),
             StructFieldDecl(
                 name='shadowScale',
                 type=ValueType(name='float'),
                 doc='fraction of light cutoff for spot lights',
             ),
             StructFieldDecl(
                 name='fogStart',
                 type=ValueType(name='float'),
                 doc='fog start = stat.extent * vis.map.fogstart',
             ),
             StructFieldDecl(
                 name='fogEnd',
                 type=ValueType(name='float'),
                 doc='fog end = stat.extent * vis.map.fogend',
             ),
             StructFieldDecl(
                 name='fogRGBA',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(4,),
                 ),
                 doc='fog rgba',
             ),
             StructFieldDecl(
                 name='shadowSize',
                 type=ValueType(name='int'),
                 doc='size of shadow map texture',
             ),
             StructFieldDecl(
                 name='offWidth',
                 type=ValueType(name='int'),
                 doc='width of offscreen buffer',
             ),
             StructFieldDecl(
                 name='offHeight',
                 type=ValueType(name='int'),
                 doc='height of offscreen buffer',
             ),
             StructFieldDecl(
                 name='offSamples',
                 type=ValueType(name='int'),
                 doc='number of offscreen buffer multisamples',
             ),
             StructFieldDecl(
                 name='fontScale',
                 type=ValueType(name='int'),
                 doc='font scale',
             ),
             StructFieldDecl(
                 name='auxWidth',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(10,),
                 ),
                 doc='auxiliary buffer width',
             ),
             StructFieldDecl(
                 name='auxHeight',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(10,),
                 ),
                 doc='auxiliary buffer height',
             ),
             StructFieldDecl(
                 name='auxSamples',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(10,),
                 ),
                 doc='auxiliary buffer multisamples',
             ),
             StructFieldDecl(
                 name='offFBO',
                 type=ValueType(name='unsigned int'),
                 doc='offscreen framebuffer object',
             ),
             StructFieldDecl(
                 name='offFBO_r',
                 type=ValueType(name='unsigned int'),
                 doc='offscreen framebuffer for resolving multisamples',
             ),
             StructFieldDecl(
                 name='offColor',
                 type=ValueType(name='unsigned int'),
                 doc='offscreen color buffer',
             ),
             StructFieldDecl(
                 name='offColor_r',
                 type=ValueType(name='unsigned int'),
                 doc='offscreen color buffer for resolving multisamples',
             ),
             StructFieldDecl(
                 name='offDepthStencil',
                 type=ValueType(name='unsigned int'),
                 doc='offscreen depth and stencil buffer',
             ),
             StructFieldDecl(
                 name='offDepthStencil_r',
                 type=ValueType(name='unsigned int'),
                 doc='offscreen depth and stencil buffer for resolving multisamples',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='shadowFBO',
                 type=ValueType(name='unsigned int'),
                 doc='shadow map framebuffer object',
             ),
             StructFieldDecl(
                 name='shadowTex',
                 type=ValueType(name='unsigned int'),
                 doc='shadow map texture',
             ),
             StructFieldDecl(
                 name='auxFBO',
                 type=ArrayType(
                     inner_type=ValueType(name='unsigned int'),
                     extents=(10,),
                 ),
                 doc='auxiliary framebuffer object',
             ),
             StructFieldDecl(
                 name='auxFBO_r',
                 type=ArrayType(
                     inner_type=ValueType(name='unsigned int'),
                     extents=(10,),
                 ),
                 doc='auxiliary framebuffer object for resolving',
             ),
             StructFieldDecl(
                 name='auxColor',
                 type=ArrayType(
                     inner_type=ValueType(name='unsigned int'),
                     extents=(10,),
                 ),
                 doc='auxiliary color buffer',
             ),
             StructFieldDecl(
                 name='auxColor_r',
                 type=ArrayType(
                     inner_type=ValueType(name='unsigned int'),
                     extents=(10,),
                 ),
                 doc='auxiliary color buffer for resolving',
             ),
             StructFieldDecl(
                 name='ntexture',
                 type=ValueType(name='int'),
                 doc='number of allocated textures',
             ),
             StructFieldDecl(
                 name='textureType',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(100,),
                 ),
                 doc='type of texture (mjtTexture) (ntexture)',
             ),
             StructFieldDecl(
                 name='texture',
                 type=ArrayType(
                     inner_type=ValueType(name='unsigned int'),
                     extents=(100,),
                 ),
                 doc='texture names',
             ),
             StructFieldDecl(
                 name='basePlane',
                 type=ValueType(name='unsigned int'),
                 doc='all planes from model',
             ),
             StructFieldDecl(
                 name='baseMesh',
                 type=ValueType(name='unsigned int'),
                 doc='all meshes from model',
             ),
             StructFieldDecl(
                 name='baseHField',
                 type=ValueType(name='unsigned int'),
                 doc='all hfields from model',
             ),
             StructFieldDecl(
                 name='baseBuiltin',
                 type=ValueType(name='unsigned int'),
                 doc='all buildin geoms, with quality from model',
             ),
             StructFieldDecl(
                 name='baseFontNormal',
                 type=ValueType(name='unsigned int'),
                 doc='normal font',
             ),
             StructFieldDecl(
                 name='baseFontShadow',
                 type=ValueType(name='unsigned int'),
                 doc='shadow font',
             ),
             StructFieldDecl(
                 name='baseFontBig',
                 type=ValueType(name='unsigned int'),
                 doc='big font',
             ),
             StructFieldDecl(
                 name='rangePlane',
                 type=ValueType(name='int'),
                 doc='all planes from model',
             ),
             StructFieldDecl(
                 name='rangeMesh',
                 type=ValueType(name='int'),
                 doc='all meshes from model',
             ),
             StructFieldDecl(
                 name='rangeHField',
                 type=ValueType(name='int'),
                 doc='all hfields from model',
             ),
             StructFieldDecl(
                 name='rangeBuiltin',
                 type=ValueType(name='int'),
                 doc='all builtin geoms, with quality from model',
             ),
             StructFieldDecl(
                 name='rangeFont',
                 type=ValueType(name='int'),
                 doc='all characters in font',
             ),
             StructFieldDecl(
                 name='nskin',
                 type=ValueType(name='int'),
                 doc='number of skins',
             ),
             StructFieldDecl(
                 name='skinvertVBO',
                 type=PointerType(
                     inner_type=ValueType(name='unsigned int'),
                 ),
                 doc='skin vertex position VBOs (nskin)',
             ),
             StructFieldDecl(
                 name='skinnormalVBO',
                 type=PointerType(
                     inner_type=ValueType(name='unsigned int'),
                 ),
                 doc='skin vertex normal VBOs (nskin)',
             ),
             StructFieldDecl(
                 name='skintexcoordVBO',
                 type=PointerType(
                     inner_type=ValueType(name='unsigned int'),
                 ),
                 doc='skin vertex texture coordinate VBOs (nskin)',
             ),
             StructFieldDecl(
                 name='skinfaceVBO',
                 type=PointerType(
                     inner_type=ValueType(name='unsigned int'),
                 ),
                 doc='skin face index VBOs (nskin)',
             ),
             StructFieldDecl(
                 name='charWidth',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(127,),
                 ),
                 doc='character widths: normal and shadow',
             ),
             StructFieldDecl(
                 name='charWidthBig',
                 type=ArrayType(
                     inner_type=ValueType(name='int'),
                     extents=(127,),
                 ),
                 doc='chacarter widths: big',
             ),
             StructFieldDecl(
                 name='charHeight',
                 type=ValueType(name='int'),
                 doc='character heights: normal and shadow',
             ),
             StructFieldDecl(
                 name='charHeightBig',
                 type=ValueType(name='int'),
                 doc='character heights: big',
             ),
             StructFieldDecl(
                 name='glInitialized',
                 type=ValueType(name='int'),
                 doc='is OpenGL initialized',
             ),
             StructFieldDecl(
                 name='windowAvailable',
                 type=ValueType(name='int'),
                 doc='is default/window framebuffer available',
             ),
             StructFieldDecl(
                 name='windowSamples',
                 type=ValueType(name='int'),
                 doc='number of samples for default/window framebuffer',
             ),
             StructFieldDecl(
                 name='windowStereo',
                 type=ValueType(name='int'),
                 doc='is stereo available for default/window framebuffer',
             ),
             StructFieldDecl(
                 name='windowDoublebuffer',
                 type=ValueType(name='int'),
                 doc='is default/window framebuffer double buffered',
             ),
             StructFieldDecl(
                 name='currentBuffer',
                 type=ValueType(name='int'),
                 doc='currently active framebuffer: mjFB_WINDOW or mjFB_OFFSCREEN',  # pylint: disable=line-too-long
             ),
             StructFieldDecl(
                 name='readPixelFormat',
                 type=ValueType(name='int'),
                 doc='default color pixel format for mjr_readPixels',
             ),
         ),
     )),
    ('mjThreadPool',
     StructDecl(
         name='mjThreadPool',
         declname='struct mjThreadPool_',
         fields=(
             StructFieldDecl(
                 name='nworker',
                 type=ValueType(name='int'),
                 doc='number of workers in the pool',
             ),
         ),
     )),
    ('mjTask',
     StructDecl(
         name='mjTask',
         declname='struct mjTask_',
         fields=(
             StructFieldDecl(
                 name='func',
                 type=ValueType(name='mjfTask'),
                 doc='pointer to the function that implements the task',
             ),
             StructFieldDecl(
                 name='args',
                 type=PointerType(
                     inner_type=ValueType(name='void'),
                 ),
                 doc='arguments to func',
             ),
             StructFieldDecl(
                 name='status',
                 type=ValueType(name='int', is_volatile=True),
                 doc='status of the task',
             ),
         ),
     )),
    ('mjuiState',
     StructDecl(
         name='mjuiState',
         declname='struct mjuiState_',
         fields=(
             StructFieldDecl(
                 name='nrect',
                 type=ValueType(name='int'),
                 doc='number of rectangles used',
             ),
             StructFieldDecl(
                 name='rect',
                 type=ArrayType(
                     inner_type=ValueType(name='mjrRect'),
                     extents=(25,),
                 ),
                 doc='rectangles (index 0: entire window)',
             ),
             StructFieldDecl(
                 name='userdata',
                 type=PointerType(
                     inner_type=ValueType(name='void'),
                 ),
                 doc='pointer to user data (for callbacks)',
             ),
             StructFieldDecl(
                 name='type',
                 type=ValueType(name='int'),
                 doc='(type mjtEvent)',
             ),
             StructFieldDecl(
                 name='left',
                 type=ValueType(name='int'),
                 doc='is left button down',
             ),
             StructFieldDecl(
                 name='right',
                 type=ValueType(name='int'),
                 doc='is right button down',
             ),
             StructFieldDecl(
                 name='middle',
                 type=ValueType(name='int'),
                 doc='is middle button down',
             ),
             StructFieldDecl(
                 name='doubleclick',
                 type=ValueType(name='int'),
                 doc='is last press a double click',
             ),
             StructFieldDecl(
                 name='button',
                 type=ValueType(name='int'),
                 doc='which button was pressed (mjtButton)',
             ),
             StructFieldDecl(
                 name='buttontime',
                 type=ValueType(name='double'),
                 doc='time of last button press',
             ),
             StructFieldDecl(
                 name='x',
                 type=ValueType(name='double'),
                 doc='x position',
             ),
             StructFieldDecl(
                 name='y',
                 type=ValueType(name='double'),
                 doc='y position',
             ),
             StructFieldDecl(
                 name='dx',
                 type=ValueType(name='double'),
                 doc='x displacement',
             ),
             StructFieldDecl(
                 name='dy',
                 type=ValueType(name='double'),
                 doc='y displacement',
             ),
             StructFieldDecl(
                 name='sx',
                 type=ValueType(name='double'),
                 doc='x scroll',
             ),
             StructFieldDecl(
                 name='sy',
                 type=ValueType(name='double'),
                 doc='y scroll',
             ),
             StructFieldDecl(
                 name='control',
                 type=ValueType(name='int'),
                 doc='is control down',
             ),
             StructFieldDecl(
                 name='shift',
                 type=ValueType(name='int'),
                 doc='is shift down',
             ),
             StructFieldDecl(
                 name='alt',
                 type=ValueType(name='int'),
                 doc='is alt down',
             ),
             StructFieldDecl(
                 name='key',
                 type=ValueType(name='int'),
                 doc='which key was pressed',
             ),
             StructFieldDecl(
                 name='keytime',
                 type=ValueType(name='double'),
                 doc='time of last key press',
             ),
             StructFieldDecl(
                 name='mouserect',
                 type=ValueType(name='int'),
                 doc='which rectangle contains mouse',
             ),
             StructFieldDecl(
                 name='dragrect',
                 type=ValueType(name='int'),
                 doc='which rectangle is dragged with mouse',
             ),
             StructFieldDecl(
                 name='dragbutton',
                 type=ValueType(name='int'),
                 doc='which button started drag (mjtButton)',
             ),
             StructFieldDecl(
                 name='dropcount',
                 type=ValueType(name='int'),
                 doc='number of files dropped',
             ),
             StructFieldDecl(
                 name='droppaths',
                 type=PointerType(
                     inner_type=PointerType(
                         inner_type=ValueType(name='char', is_const=True),
                     ),
                 ),
                 doc='paths to files dropped',
             ),
         ),
     )),
    ('mjuiThemeSpacing',
     StructDecl(
         name='mjuiThemeSpacing',
         declname='struct mjuiThemeSpacing_',
         fields=(
             StructFieldDecl(
                 name='total',
                 type=ValueType(name='int'),
                 doc='total width',
             ),
             StructFieldDecl(
                 name='scroll',
                 type=ValueType(name='int'),
                 doc='scrollbar width',
             ),
             StructFieldDecl(
                 name='label',
                 type=ValueType(name='int'),
                 doc='label width',
             ),
             StructFieldDecl(
                 name='section',
                 type=ValueType(name='int'),
                 doc='section gap',
             ),
             StructFieldDecl(
                 name='itemside',
                 type=ValueType(name='int'),
                 doc='item side gap',
             ),
             StructFieldDecl(
                 name='itemmid',
                 type=ValueType(name='int'),
                 doc='item middle gap',
             ),
             StructFieldDecl(
                 name='itemver',
                 type=ValueType(name='int'),
                 doc='item vertical gap',
             ),
             StructFieldDecl(
                 name='texthor',
                 type=ValueType(name='int'),
                 doc='text horizontal gap',
             ),
             StructFieldDecl(
                 name='textver',
                 type=ValueType(name='int'),
                 doc='text vertical gap',
             ),
             StructFieldDecl(
                 name='linescroll',
                 type=ValueType(name='int'),
                 doc='number of pixels to scroll',
             ),
             StructFieldDecl(
                 name='samples',
                 type=ValueType(name='int'),
                 doc='number of multisamples',
             ),
         ),
     )),
    ('mjuiThemeColor',
     StructDecl(
         name='mjuiThemeColor',
         declname='struct mjuiThemeColor_',
         fields=(
             StructFieldDecl(
                 name='master',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='master background',
             ),
             StructFieldDecl(
                 name='thumb',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='scrollbar thumb',
             ),
             StructFieldDecl(
                 name='secttitle',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='section title',
             ),
             StructFieldDecl(
                 name='sectfont',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='section font',
             ),
             StructFieldDecl(
                 name='sectsymbol',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='section symbol',
             ),
             StructFieldDecl(
                 name='sectpane',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='section pane',
             ),
             StructFieldDecl(
                 name='shortcut',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='shortcut background',
             ),
             StructFieldDecl(
                 name='fontactive',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='font active',
             ),
             StructFieldDecl(
                 name='fontinactive',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='font inactive',
             ),
             StructFieldDecl(
                 name='decorinactive',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='decor inactive',
             ),
             StructFieldDecl(
                 name='decorinactive2',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='inactive slider color 2',
             ),
             StructFieldDecl(
                 name='button',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='button',
             ),
             StructFieldDecl(
                 name='check',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='check',
             ),
             StructFieldDecl(
                 name='radio',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='radio',
             ),
             StructFieldDecl(
                 name='select',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='select',
             ),
             StructFieldDecl(
                 name='select2',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='select pane',
             ),
             StructFieldDecl(
                 name='slider',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='slider',
             ),
             StructFieldDecl(
                 name='slider2',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='slider color 2',
             ),
             StructFieldDecl(
                 name='edit',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='edit',
             ),
             StructFieldDecl(
                 name='edit2',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='edit invalid',
             ),
             StructFieldDecl(
                 name='cursor',
                 type=ArrayType(
                     inner_type=ValueType(name='float'),
                     extents=(3,),
                 ),
                 doc='edit cursor',
             ),
         ),
     )),
    ('mjuiItem',
     StructDecl(
         name='mjuiItem',
         declname='struct mjuiItem_',
         fields=(
             StructFieldDecl(
                 name='type',
                 type=ValueType(name='int'),
                 doc='type (mjtItem)',
             ),
             StructFieldDecl(
                 name='name',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(40,),
                 ),
                 doc='name',
             ),
             StructFieldDecl(
                 name='state',
                 type=ValueType(name='int'),
                 doc='0: disable, 1: enable, 2+: use predicate',
             ),
             StructFieldDecl(
                 name='pdata',
                 type=PointerType(
                     inner_type=ValueType(name='void'),
                 ),
                 doc='data pointer (type-specific)',
             ),
             StructFieldDecl(
                 name='sectionid',
                 type=ValueType(name='int'),
                 doc='id of section containing item',
             ),
             StructFieldDecl(
                 name='itemid',
                 type=ValueType(name='int'),
                 doc='id of item within section',
             ),
             AnonymousUnionDecl(
                 fields=(
                     StructFieldDecl(
                         name='single',
                         type=ValueType(name='struct mjuiItemSingle_'),
                         doc='check and button',
                     ),
                     StructFieldDecl(
                         name='multi',
                         type=ValueType(name='struct mjuiItemMulti_'),
                         doc='static, radio and select',
                     ),
                     StructFieldDecl(
                         name='slider',
                         type=ValueType(name='struct mjuiItemSlider_'),
                         doc='slider',
                     ),
                     StructFieldDecl(
                         name='edit',
                         type=ValueType(name='struct mjuiItemEdit_'),
                         doc='edit',
                     ),
                 ),
             ),
             StructFieldDecl(
                 name='rect',
                 type=ValueType(name='mjrRect'),
                 doc='rectangle occupied by item',
             ),
         ),
     )),
    ('mjuiSection',
     StructDecl(
         name='mjuiSection',
         declname='struct mjuiSection_',
         fields=(
             StructFieldDecl(
                 name='name',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(40,),
                 ),
                 doc='name',
             ),
             StructFieldDecl(
                 name='state',
                 type=ValueType(name='int'),
                 doc='0: closed, 1: open',
             ),
             StructFieldDecl(
                 name='modifier',
                 type=ValueType(name='int'),
                 doc='0: none, 1: control, 2: shift; 4: alt',
             ),
             StructFieldDecl(
                 name='shortcut',
                 type=ValueType(name='int'),
                 doc='shortcut key; 0: undefined',
             ),
             StructFieldDecl(
                 name='nitem',
                 type=ValueType(name='int'),
                 doc='number of items in use',
             ),
             StructFieldDecl(
                 name='item',
                 type=ArrayType(
                     inner_type=ValueType(name='mjuiItem'),
                     extents=(100,),
                 ),
                 doc='preallocated array of items',
             ),
             StructFieldDecl(
                 name='rtitle',
                 type=ValueType(name='mjrRect'),
                 doc='rectangle occupied by title',
             ),
             StructFieldDecl(
                 name='rcontent',
                 type=ValueType(name='mjrRect'),
                 doc='rectangle occupied by content',
             ),
         ),
     )),
    ('mjUI',
     StructDecl(
         name='mjUI',
         declname='struct mjUI_',
         fields=(
             StructFieldDecl(
                 name='spacing',
                 type=ValueType(name='mjuiThemeSpacing'),
                 doc='UI theme spacing',
             ),
             StructFieldDecl(
                 name='color',
                 type=ValueType(name='mjuiThemeColor'),
                 doc='UI theme color',
             ),
             StructFieldDecl(
                 name='predicate',
                 type=ValueType(name='mjfItemEnable'),
                 doc='callback to set item state programmatically',
             ),
             StructFieldDecl(
                 name='userdata',
                 type=PointerType(
                     inner_type=ValueType(name='void'),
                 ),
                 doc='pointer to user data (passed to predicate)',
             ),
             StructFieldDecl(
                 name='rectid',
                 type=ValueType(name='int'),
                 doc='index of this ui rectangle in mjuiState',
             ),
             StructFieldDecl(
                 name='auxid',
                 type=ValueType(name='int'),
                 doc='aux buffer index of this ui',
             ),
             StructFieldDecl(
                 name='radiocol',
                 type=ValueType(name='int'),
                 doc='number of radio columns (0 defaults to 2)',
             ),
             StructFieldDecl(
                 name='width',
                 type=ValueType(name='int'),
                 doc='width',
             ),
             StructFieldDecl(
                 name='height',
                 type=ValueType(name='int'),
                 doc='current heigth',
             ),
             StructFieldDecl(
                 name='maxheight',
                 type=ValueType(name='int'),
                 doc='height when all sections open',
             ),
             StructFieldDecl(
                 name='scroll',
                 type=ValueType(name='int'),
                 doc='scroll from top of UI',
             ),
             StructFieldDecl(
                 name='mousesect',
                 type=ValueType(name='int'),
                 doc='0: none, -1: scroll, otherwise 1+section',
             ),
             StructFieldDecl(
                 name='mouseitem',
                 type=ValueType(name='int'),
                 doc='item within section',
             ),
             StructFieldDecl(
                 name='mousehelp',
                 type=ValueType(name='int'),
                 doc='help button down: print shortcuts',
             ),
             StructFieldDecl(
                 name='editsect',
                 type=ValueType(name='int'),
                 doc='0: none, otherwise 1+section',
             ),
             StructFieldDecl(
                 name='edititem',
                 type=ValueType(name='int'),
                 doc='item within section',
             ),
             StructFieldDecl(
                 name='editcursor',
                 type=ValueType(name='int'),
                 doc='cursor position',
             ),
             StructFieldDecl(
                 name='editscroll',
                 type=ValueType(name='int'),
                 doc='horizontal scroll',
             ),
             StructFieldDecl(
                 name='edittext',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(300,),
                 ),
                 doc='current text',
             ),
             StructFieldDecl(
                 name='editchanged',
                 type=PointerType(
                     inner_type=ValueType(name='mjuiItem'),
                 ),
                 doc='pointer to changed edit in last mjui_event',
             ),
             StructFieldDecl(
                 name='nsect',
                 type=ValueType(name='int'),
                 doc='number of sections in use',
             ),
             StructFieldDecl(
                 name='sect',
                 type=ArrayType(
                     inner_type=ValueType(name='mjuiSection'),
                     extents=(10,),
                 ),
                 doc='preallocated array of sections',
             ),
         ),
     )),
    ('mjuiDef',
     StructDecl(
         name='mjuiDef',
         declname='struct mjuiDef_',
         fields=(
             StructFieldDecl(
                 name='type',
                 type=ValueType(name='int'),
                 doc='type (mjtItem); -1: section',
             ),
             StructFieldDecl(
                 name='name',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(40,),
                 ),
                 doc='name',
             ),
             StructFieldDecl(
                 name='state',
                 type=ValueType(name='int'),
                 doc='state',
             ),
             StructFieldDecl(
                 name='pdata',
                 type=PointerType(
                     inner_type=ValueType(name='void'),
                 ),
                 doc='pointer to data',
             ),
             StructFieldDecl(
                 name='other',
                 type=ArrayType(
                     inner_type=ValueType(name='char'),
                     extents=(300,),
                 ),
                 doc='string with type-specific properties',
             ),
         ),
     )),
])
