> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IRockyGeometryMotionData Struct Reference

`#include <rocky_boundary_api.hpp>`

## Public Member Functions

| Type | Name |
| - | - |
| int | [get\_id](#a21c87d2c5d4ad69dfd28651613888be7) () const |
| std::string | [get\_name](#ae4a43219e823a55f3ced79f234d7a6d9) () const |
| double3 | [get\_force](#a5be8af9c351470d287879e3d6f2a10e9) () const |
| double3 | [get\_moment](#af213ddfd08829027f4c45d73cf566ff1) () const |
| double3 | [get\_position](#ac676748d6121c999c4d5097ab7246e08) () const |
| double3 | [get\_translational\_velocity](#a08d097c2e959733cb32c365c3fb2eef7) () const |
| double4 | [get\_orientation\_quaternion](#a1a5cc239a4d3485280530fc6a46fe9d4) () const |
| double3 | [get\_orientation\_euler\_angles](#a0dbec31c54d9c33096a0841ac1379fc2) () const |
| double3 | [get\_rotational\_velocity](#ad0aa494b8066b46a6d983031d1a53538) () const |
| void | [set\_position](#ab3fc0d338a140c8ca95b78bd2e8c4c94) (double3 position) |
| void | [set\_translational\_velocity](#a4f37dc923051f58381e6268199936eac) (double3 v) |
| void | [set\_orientation](#a7169363d2fe6b5631ce18293cb31144b) (double4 quat) |
| void | [set\_orientation\_angles](#a059a62e2d9453660725a0dc88313c73c) (double3 angles) |
| void | [set\_rotational\_velocity](#a90073262648b9550296f899fc4e85127) (double3 w) |
| bool | [has\_linked\_motion\_frame](#a03b51d01d3dcaaff8bfbd132e92370e7) () const |

## Detailed Description

[`IRockyGeometryMotionData`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockyGeometryMotionData) is an interface for a geometry motion in Rocky. A geometry motion represents the information from the motion applied to the geometry in Rocky's last simulation timestep. This information includes for Rocky's current simulation timestep, the forces and moments from the particles that are being applied to the geometry, and also the position, translational velocity, rotational velocity and orientation of the geometry from the previous timestep's motion. The information represented in a geometry motion are the forces and moments from the particles simulation, the position, translational velocity, rotational velocity and orientation of the geometry from the previous motion. To move the geometry within Rocky's current simulation timestep, the same motion information, i.e. (the new position, translational velocity, rotational velocity and orientation of the geometry) must be defined as within the previous timestep. If no motion is applied to the geometry, nothing is required to be set. If the geometry has no motion applied to it, the geometry's translational and rotational velocities are zero and its position and orientation are equal to the ones set at the end of the previous timestep. All property and variable values made available through [`IRockyGeometryMotionData`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockyGeometryMotionData) are dimensionless.

> [!WARNING]
>
> The geometry's gravity center is the reference position Rocky uses for the geometry's motions. Thus, the geometry's gravity center will have a new position after each motion applied.

## Member Function Documentation

### get\_force()

```cpp theme={null}
double3 IRockyGeometryMotionData::get_force() const
```

**Returns**

The Cartesian components of the force applied by Rocky to the geometry.

### get\_id()

```cpp theme={null}
int IRockyGeometryMotionData::get_id() const
```

**Returns**

The ID of the geometry.

### get\_moment()

```cpp theme={null}
double3 IRockyGeometryMotionData::get_moment() const
```

**Returns**

The Cartesian components of the moment applied by Rocky to the geometry.

### get\_name()

```cpp theme={null}
std::string IRockyGeometryMotionData::get_name() const
```

**Returns**

The name of the geometry.

### get\_orientation\_euler\_angles()

```cpp theme={null}
double3 IRockyGeometryMotionData::get_orientation_euler_angles() const
```

**Returns**

A vector whose components are the Euler angles that define the orientation of the geometry. In this vector, the x-component is the roll angle, the y-component is the pitch angle and the z-component is the yaw angle.

### get\_orientation\_quaternion()

```cpp theme={null}
double4 IRockyGeometryMotionData::get_orientation_quaternion() const
```

**Returns**

The orientation of the geometry expressed as a quaternion (w, x, y and z).

### get\_position()

```cpp theme={null}
double3 IRockyGeometryMotionData::get_position() const
```

**Returns**

The Cartesian coordinates of the reference position for the motion, which coincides with the geometry's gravity center.

### get\_rotational\_velocity()

```cpp theme={null}
double3 IRockyGeometryMotionData::get_rotational_velocity() const
```

**Returns**

The Cartesian components of the geometry's rotational velocity.

### get\_translational\_velocity()

```cpp theme={null}
double3 IRockyGeometryMotionData::get_translational_velocity() const
```

**Returns**

The Cartesian components of the geometry's translational velocity.

### has\_linked\_motion\_frame()

```cpp theme={null}
bool IRockyGeometryMotionData::has_linked_motion_frame() const
```

**Returns**

True if the geometry has motion from the Rocky's internal motion kernel implementation. False otherwise.

### set\_orientation()

```cpp theme={null}
void IRockyGeometryMotionData::set_orientation(double4 quat)
```

**Sets the geometry's new orientation (quaternion) according to the motion that was applied.**

**Parameters**

| Name | Description |
| - | - |
| quat | The geometry's new orientation expressed as a quaternion (w, x, y and z). |

> [!WARNING]
>
> Calling set\_orientation in a geometry that is already linked to a motion frame is not allowed.

### set\_orientation\_angles()

```cpp theme={null}
void IRockyGeometryMotionData::set_orientation_angles(double3 angles)
```

**Sets the geometry's new orientation in Euler angles according to the motion that was applied.**

**Parameters**

| Name | Description |
| - | - |
| angles | A vector whose components are the Euler angles that define the new orientation of the geometry. In this vector, the x-component is the roll angle, the y-component is the pitch angle and the z-component is the yaw angle. |

> [!WARNING]
>
> Calling set\_orientation\_angles in a geometry that is already linked to a motion frame is not allowed.

### set\_position()

```cpp theme={null}
void IRockyGeometryMotionData::set_position(double3 position)
```

**Sets the new position for the geometry according to the motion that was applied.**

Rocky uses the geometry's gravity center as the reference position for the geometry's motions. Thus, the geometry's gravity center will have a new position after each motion applied.

**Parameters**

| Name | Description |
| - | - |
| position | The Cartesian components of the geometry's new position, which is equal to the new location of its gravity center. |

> [!WARNING]
>
> Calling set\_position in a geometry that is already linked to a motion frame is not allowed.

### set\_rotational\_velocity()

```cpp theme={null}
void IRockyGeometryMotionData::set_rotational_velocity(double3 w)
```

**Sets the geometry's new rotational velocity according to the motion that was applied.**

**Parameters**

| Name | Description |
| - | - |
| w | The Cartesian components of the geometry's new rotational velocity. |

> [!WARNING]
>
> Calling set\_rotational\_velocity in a geometry that is already linked to a motion frame is not allowed.

### set\_translational\_velocity()

```cpp theme={null}
void IRockyGeometryMotionData::set_translational_velocity(double3 v)
```

**Sets the geometry's new translational velocity according to the motion that was applied.**

**Parameters**

| Name | Description |
| - | - |
| v | The Cartesian components of the geometry's new translational velocity. |

> [!WARNING]
>
> Calling set\_translational\_velocity in a geometry that is already linked to a motion frame is not allowed.
