Project Chrono: chrono::particlefactory::ChRandomShapeCreatorCylinders Class Reference

Public Member Functions | List of all members
chrono::particlefactory::ChRandomShapeCreatorCylinders Class Reference

## Description

Class for generating cylinders with variable diameter and length.

By default uses constant distributions (all cylinders are equal) but you can provide your distributions.

`#include <ChRandomShapeCreator.h>`

Inheritance diagram for chrono::particlefactory::ChRandomShapeCreatorCylinders:
[legend]
Collaboration diagram for chrono::particlefactory::ChRandomShapeCreatorCylinders:
[legend]

## Public Member Functions
virtual std::shared_ptr< ChBody > | RandomGenerate (ChCoordsys<> mcoords) override
| Function that creates a random ChBody particle each time it is called.
void | SetDiameterDistribution (std::shared_ptr< ChDistribution > mdistr)
| Set the statistical distribution for the diameter.
void | SetLengthFactorDistribution (std::shared_ptr< ChDistribution > mdistr)
| Set the statistical distribution for the length ratio (length = diameter*length_factor).
void | SetDensityDistribution (std::shared_ptr< ChDistribution > mdistr)
| Set the statistical distribution for the random density.
Public Member Functions inherited from chrono::particlefactory::ChRandomShapeCreator
virtual std::shared_ptr< ChBody > | RandomGenerateAndCallbacks (ChCoordsys<> mcoords)
| This function does RandomGenerate and also executes the the custom callback, if provided.
void | RegisterAddBodyCallback (std::shared_ptr< AddBodyCallback > callback)
| Set the callback function to execute at each each particle generation.
void | SetAddCollisionShape (bool addcoll)
| Set if the created particles must include the collision shape(s).
void | SetAddVisualizationAsset (bool addvisual)
| Set if the created particles must include the visualization asset(s).

## Additional Inherited Members
Protected Attributes inherited from chrono::particlefactory::ChRandomShapeCreator
std::shared_ptr< AddBodyCallback > | callback_post_creation
bool | add_collision_shape
bool | add_visualization_asset

## Member Function Documentation

## ◆ RandomGenerate()

virtual std::shared_ptr< ChBody > chrono::particlefactory::ChRandomShapeCreatorCylinders::RandomGenerate | ( | ChCoordsys<> | mcoords | ) |
| inlineoverridevirtual

Function that creates a random ChBody particle each time it is called.

Implements chrono::particlefactory::ChRandomShapeCreator.

The documentation for this class was generated from the following file:

- D:/W/B/src/chrono-9.0.1/src/chrono/particlefactory/ChRandomShapeCreator.h