Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Google deepmind Mujoco User Composite Header

From Leeroopedia
Revision as of 12:47, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Google_deepmind_Mujoco_User_Composite_Header.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Physics Simulation, Composite Objects
Last Updated 2026-02-15 04:00 GMT

Overview

Declares the mjCComposite class and associated enums for composite object types, kinds, and shapes.

Description

user_composite.h defines the type enums mjtCompType (particle, grid, cable, rope, loop, cloth), mjtCompKind (joint), and mjtCompShape (line, cos, sin, zero) that control composite object generation. The mjCComposite class declaration includes methods for making composites (Make, MakeCable), generating skins (MakeSkin2, MakeSkin2Subgrid), and creating cable bones. Public properties include prefix, type, count array, offset, quaternion, initial boundary type for cables, skin settings, and plugin configuration.

Usage

Included by the native MJCF reader and the composite implementation to define the interface for composite object construction.

Code Reference

Source Location

Key Functions

typedef enum _mjtCompType {
  mjCOMPTYPE_PARTICLE, mjCOMPTYPE_GRID, mjCOMPTYPE_CABLE,
  mjCOMPTYPE_ROPE, mjCOMPTYPE_LOOP, mjCOMPTYPE_CLOTH
} mjtCompType;

class mjCComposite {
 public:
  mjCComposite(void);
  bool Make(mjSpec* spec, mjsBody* body, char* error, int error_sz);
  bool MakeCable(mjCModel* model, mjsBody* body, char* error, int error_sz);
  void MakeSkin2(mjCModel* model, mjtNum inflate);
};

Import

#include "user/user_composite.h"

I/O Contract

Inputs

Name Type Required Description
N/A N/A N/A Header declaring the mjCComposite class and associated enums

Outputs

Name Type Description
mjCComposite class Composite object builder with type, count, offset, and skin properties

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment