The Body
class defined in C++ provides a specialized class derived from the Frame
class. It is designed for use in defining bodies in a 6-DOF dynamics context, incorporating mass and inertia properties. This guide provides an overview of how to interact with the Body
class.
The Body
Class
Description and Naming
The Body
class is a templated class with one template argument - T.
Body<T>
produces a body object with properties and functions related to mass and inertia. The argument is:
-
T - The type of the body’s properties. This should be a floating-point type.
Since the class is derived from the Frame
class, it inherits all the functionalities of the Frame
class and adds several body-specific operations.
For a complete guide on interacting with the Body
class, refer to the Doxygen documentation:
Body Doxygen
Creating a Body
Description | C++ Example | Python Example |
---|---|---|
Constructor - Creates a body with a name and an optional parent frame. |
|
|
Constructor - Creates a body with a name and an optional parent frame. |
|
|
Setting Mass - Sets the mass of the body. |
|
|
Setting Inertia - Sets the inertia matrix of the body. |
|
|