    

 ## On this page

  

 

 # IRockyGeometryMotionData Struct Reference

 Last update: 16.07.2025 

`#include <<a class="el" href="rocky__boundary__api_8hpp_source.xhtml">rocky_boundary_api.hpp</a>>`

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

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 <a id="details" name="details"></a>## Detailed Description

`<a class="el" href="structIRockyGeometryMotionData.xhtml">IRockyGeometryMotionData</a>` 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 `<a class="el" href="structIRockyGeometryMotionData.xhtml">IRockyGeometryMotionData</a>` are dimensionless.

AttentionThe 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

<a id="a5be8af9c351470d287879e3d6f2a10e9" name="a5be8af9c351470d287879e3d6f2a10e9"></a>## [◆ ](#a5be8af9c351470d287879e3d6f2a10e9)get\_force()

 double3 IRockyGeometryMotionData::get\_force  ( )  const

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



<a id="a21c87d2c5d4ad69dfd28651613888be7" name="a21c87d2c5d4ad69dfd28651613888be7"></a>## [◆ ](#a21c87d2c5d4ad69dfd28651613888be7)get\_id()

 int IRockyGeometryMotionData::get\_id  ( )  const

ReturnsThe ID of the geometry. 



<a id="af213ddfd08829027f4c45d73cf566ff1" name="af213ddfd08829027f4c45d73cf566ff1"></a>## [◆ ](#af213ddfd08829027f4c45d73cf566ff1)get\_moment()

 double3 IRockyGeometryMotionData::get\_moment  ( )  const

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



<a id="ae4a43219e823a55f3ced79f234d7a6d9" name="ae4a43219e823a55f3ced79f234d7a6d9"></a>## [◆ ](#ae4a43219e823a55f3ced79f234d7a6d9)get\_name()

 std::string IRockyGeometryMotionData::get\_name  ( )  const

ReturnsThe name of the geometry. 



<a id="a0dbec31c54d9c33096a0841ac1379fc2" name="a0dbec31c54d9c33096a0841ac1379fc2"></a>## [◆ ](#a0dbec31c54d9c33096a0841ac1379fc2)get\_orientation\_euler\_angles()

 double3 IRockyGeometryMotionData::get\_orientation\_euler\_angles  ( )  const

ReturnsA 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. 



<a id="a1a5cc239a4d3485280530fc6a46fe9d4" name="a1a5cc239a4d3485280530fc6a46fe9d4"></a>## [◆ ](#a1a5cc239a4d3485280530fc6a46fe9d4)get\_orientation\_quaternion()

 double4 IRockyGeometryMotionData::get\_orientation\_quaternion  ( )  const

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



<a id="ac676748d6121c999c4d5097ab7246e08" name="ac676748d6121c999c4d5097ab7246e08"></a>## [◆ ](#ac676748d6121c999c4d5097ab7246e08)get\_position()

 double3 IRockyGeometryMotionData::get\_position  ( )  const

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



<a id="ad0aa494b8066b46a6d983031d1a53538" name="ad0aa494b8066b46a6d983031d1a53538"></a>## [◆ ](#ad0aa494b8066b46a6d983031d1a53538)get\_rotational\_velocity()

 double3 IRockyGeometryMotionData::get\_rotational\_velocity  ( )  const

ReturnsThe Cartesian components of the geometry's rotational velocity. 



<a id="a08d097c2e959733cb32c365c3fb2eef7" name="a08d097c2e959733cb32c365c3fb2eef7"></a>## [◆ ](#a08d097c2e959733cb32c365c3fb2eef7)get\_translational\_velocity()

 double3 IRockyGeometryMotionData::get\_translational\_velocity  ( )  const

ReturnsThe Cartesian components of the geometry's translational velocity. 



<a id="a03b51d01d3dcaaff8bfbd132e92370e7" name="a03b51d01d3dcaaff8bfbd132e92370e7"></a>## [◆ ](#a03b51d01d3dcaaff8bfbd132e92370e7)has\_linked\_motion\_frame()

 bool IRockyGeometryMotionData::has\_linked\_motion\_frame  ( )  const

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



<a id="a7169363d2fe6b5631ce18293cb31144b" name="a7169363d2fe6b5631ce18293cb31144b"></a>## [◆ ](#a7169363d2fe6b5631ce18293cb31144b)set\_orientation()

 void IRockyGeometryMotionData::set\_orientation  ( double4 *quat*) 

Sets the geometry's new orientation (quaternion) according to the motion that was applied.Parameters quatThe geometry's new orientation expressed as a quaternion (w, x, y and z).AttentionCalling set\_orientation in a geometry that is already linked to a motion frame is not allowed. 



<a id="a059a62e2d9453660725a0dc88313c73c" name="a059a62e2d9453660725a0dc88313c73c"></a>## [◆ ](#a059a62e2d9453660725a0dc88313c73c)set\_orientation\_angles()

 void IRockyGeometryMotionData::set\_orientation\_angles  ( double3 *angles*) 

Sets the geometry's new orientation in Euler angles according to the motion that was applied.Parameters anglesA 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.AttentionCalling set\_orientation\_angles in a geometry that is already linked to a motion frame is not allowed. 



<a id="ab3fc0d338a140c8ca95b78bd2e8c4c94" name="ab3fc0d338a140c8ca95b78bd2e8c4c94"></a>## [◆ ](#ab3fc0d338a140c8ca95b78bd2e8c4c94)set\_position()

 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 positionThe Cartesian components of the geometry's new position, which is equal to the new location of its gravity center.AttentionCalling set\_position in a geometry that is already linked to a motion frame is not allowed. 



<a id="a90073262648b9550296f899fc4e85127" name="a90073262648b9550296f899fc4e85127"></a>## [◆ ](#a90073262648b9550296f899fc4e85127)set\_rotational\_velocity()

 void IRockyGeometryMotionData::set\_rotational\_velocity  ( double3 *w*) 

Sets the geometry's new rotational velocity according to the motion that was applied.Parameters wThe Cartesian components of the geometry's new rotational velocity.AttentionCalling set\_rotational\_velocity in a geometry that is already linked to a motion frame is not allowed. 



<a id="a4f37dc923051f58381e6268199936eac" name="a4f37dc923051f58381e6268199936eac"></a>## [◆ ](#a4f37dc923051f58381e6268199936eac)set\_translational\_velocity()

 void IRockyGeometryMotionData::set\_translational\_velocity  ( double3 *v*) 

Sets the geometry's new translational velocity according to the motion that was applied.Parameters vThe Cartesian components of the geometry's new translational velocity.AttentionCalling set\_translational\_velocity in a geometry that is already linked to a motion frame is not allowed.