Structure IRockyGeometryMotionData
Last update: 09.03.2026
#include
IRockyGeometryMotionData 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 are dimensionless.
!> Attention
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.
Members
- get_force
- get_id
- get_moment
- get_name
- get_orientation_euler_angles
- get_orientation_quaternion
- get_position
- get_rotational_velocity
- get_translational_velocity
- has_linked_motion_frame
- set_orientation
- set_orientation_angles
- set_position
- set_rotational_velocity
- set_translational_velocity
Public functions
Function get_id
![][const]
int IRockyGeometryMotionData::get_id() const
Returns:
The ID of the geometry.
Return type: int
Function get_name
![][const]
std::string IRockyGeometryMotionData::get_name() const
Returns:
The name of the geometry.
Return type: std::string
Function get_force
![][const]
double3 IRockyGeometryMotionData::get_force() const
Returns:
The Cartesian components of the force applied by Rocky to the geometry.
Return type: double3
Function get_moment
![][const]
double3 IRockyGeometryMotionData::get_moment() const
Returns:
The Cartesian components of the moment applied by Rocky to the geometry.
Return type: double3
Function get_position
![][const]
double3 IRockyGeometryMotionData::get_position() const
Returns:
The Cartesian coordinates of the reference position for the motion, which coincides with the geometry's gravity center.
Return type: double3
Function get_translational_velocity
![][const]
double3 IRockyGeometryMotionData::get_translational_velocity() const
Returns:
The Cartesian components of the geometry's translational velocity.
Return type: double3
Function get_orientation_quaternion
![][const]
double4 IRockyGeometryMotionData::get_orientation_quaternion() const
Returns:
The orientation of the geometry expressed as a quaternion (w, x, y and z).
Return type: double4
Function get_orientation_euler_angles
![][const]
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.
Return type: double3
Function get_rotational_velocity
![][const]
double3 IRockyGeometryMotionData::get_rotational_velocity() const
Returns:
The Cartesian components of the geometry's rotational velocity.
Return type: double3
Function 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:
- position: The Cartesian components of the geometry's new position, which is equal to the new location of its gravity center.
!> Attention
Calling set_position in a geometry that is already linked to a motion frame is not allowed.
Parameters:
- double3 position
Return type: void
Function 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:
- v: The Cartesian components of the geometry's new translational velocity.
!> Attention
Calling set_translational_velocity in a geometry that is already linked to a motion frame is not allowed.
Parameters:
- double3 v
Return type: void
Function set_orientation
void IRockyGeometryMotionData::set_orientation(double4 quat)
Sets the geometry's new orientation (quaternion) according to the motion that was applied.:
Parameters:
- quat: The geometry's new orientation expressed as a quaternion (w, x, y and z).
!> Attention
Calling set_orientation in a geometry that is already linked to a motion frame is not allowed.
Parameters:
- double4 quat
Return type: void
Function 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:
- 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.
!> Attention
Calling set_orientation_angles in a geometry that is already linked to a motion frame is not allowed.
Parameters:
- double3 angles
Return type: void
Function 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:
- w: The Cartesian components of the geometry's new rotational velocity.
!> Attention
Calling set_rotational_velocity in a geometry that is already linked to a motion frame is not allowed.
Parameters:
- double3 w
Return type: void
Function has_linked_motion_frame
![][const]
bool IRockyGeometryMotionData::has_linked_motion_frame() const
Returns:
True if the geometry has motion from the Rocky's internal motion kernel implementation. False otherwise.
Return type: bool
[const]: https://img.shields.io/badge/-const-lightblue (const)