Implementation:Google deepmind Mujoco User Composite Header
| 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
- Repository: Google_deepmind_Mujoco
- File: src/user/user_composite.h
- Lines: 1-125
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 |