MVSim
Lightweight simulator for 2.5D vehicles and robots
Public Types | Public Attributes | List of all members
mvsim::WorldJoint Struct Reference

#include <World.h>

Public Types

enum class  Type : uint8_t { Distance = 0 , Revolute }
 

Public Attributes

Type type = Type::Distance
 
std::string bodyA_name
 Names of the two connected Simulable objects (vehicles, blocks, etc.)
 
std::string bodyB_name
 
mrpt::math::TPoint2D anchorA {0, 0}
 Local anchor points on each body (in body-local coordinates)
 
mrpt::math::TPoint2D anchorB {0, 0}
 
float maxLength = 5.0f
 Distance joint parameters (only used when type == Distance):
 
float minLength = 0.0f
 
float stiffness = 0.0f
 
float damping = 0.0f
 
bool enableLimit = false
 Revolute joint parameters:
 
float lowerAngle_deg = 0.0f
 Parsed in degrees, converted to radians.
 
float upperAngle_deg = 0.0f
 
b2Joint * b2joint = nullptr
 Runtime Box2D joint (owned by the b2World, do NOT delete manually)
 

Detailed Description

Describes an inter-body joint parsed from the world XML. Supports distance (rope) and revolute (pin/hinge) joint types.

Member Enumeration Documentation

◆ Type

enum mvsim::WorldJoint::Type : uint8_t
strong
Enumerator
Distance 

b2DistanceJoint (rope-like max length constraint)

Revolute 

b2RevoluteJoint (pin/hinge)


The documentation for this struct was generated from the following file: