Skip to main content
#include <rocky_model_api.hpp> IRockyDeviceModel includes auxiliary functions that are available only during the execution of a simulation. Hooks such as ROCKY_PLUGIN_PRE_FORCE…, ROCKY_PLUGIN_POST_FORCE…, and ROCKY_PLUGIN_PRE_MOVE…, provide an IRockyDeviceModel object as a parameter.

Members

Public functions

Function get_timestep

Returns: The value of the simulation timestep. Return type: ROCKY_FUNCTIONS double

Function get_current_time

Returns: The value of the current time in the simulation. Return type: ROCKY_FUNCTIONS double

Function get_gravity

This functions returns the current gravity acceleration: in the simulation. Returns: A double3 value representing the current gravity acceleration vector in Cartesian Coordinates. Return type: ROCKY_FUNCTIONS double3

Function set_gravity

This function sets the gravity acceleration to be used: globally in the simulation from that time onward. Parameters:
  • gravity: A double3 value representing the gravity acceleration vector in Cartesian Coordinates.
Parameters:
  • const double3 & gravity
Return type: ROCKY_FUNCTIONS void

Function get_particle_cloud_point

This function gets an auxiliary object that gives access: to cloud point values of the nearest point to a given particle. Parameters:
  • point_cloud_index: The index that uniquely identifies a point cloud dataset.
  • particle: A IRockyParticle whose position is used to determine the nearest cloud point.
Returns: An IRockyParticleCloudPoint object, which can be used to get cloud point values of the nearest point to the particle passed as argument. For more information about point clouds, please refer to the Rocky User Manual. Parameters: Return type: ROCKY_FUNCTIONS IRockyCloudPoint

Function get_pair_scalars

Returns: An IRockyPairScalars object, that gives access to all pair scalars defined in a project. Parameters:
  • pair_index: The index that identifies a specific pair of particle groups or a pair formed by a particle group and a geometry.
Parameters:
  • int pair_index
Return type: ROCKY_FUNCTIONS IRockyPairScalars

Function get_geometry_scalars

Returns: An IRockyGeometryScalars object, that gives access to all geometry scalars defined in a project. Parameters:
  • geometry_index: The index that identifies a specific geometry within a Rocky project.
Parameters:
  • int geometry_index
Return type: ROCKY_FUNCTIONS IRockyGeometryScalars