#include <Emitter.h>
A class that encapsulated the Emitter objects in the simulation that creates GranularBody flows in the simulation.
◆ EmitMode
An emitter can be in two different modes:
- PARTICLES means that the emitter will emit granular bodies, either single model or distribution based.
- RIGID_BODIES means that the emitter will emit Rigid Bodies based on Body Distributions.
| Enumerator |
|---|
| PARTICLES | |
| RIGID_BODIES | |
◆ addCollisionGroup()
| bool MOMENTUM_NAMESPACE::Emitter::addCollisionGroup |
( |
const std::string & |
name | ) |
|
Add a named collision group to this Emitter that can be used for contact filtering during a simulation.
The collision group will be added to all bodies created from it.
- Parameters
-
| name | - the name of the collision group to be added |
- Returns
- false if emitter already has
name as collision group
◆ getBodyDistribution()
| std::shared_ptr< BodyDistribution > MOMENTUM_NAMESPACE::Emitter::getBodyDistribution |
( |
| ) |
const |
◆ getCollisionGroups()
| std::vector< std::string > MOMENTUM_NAMESPACE::Emitter::getCollisionGroups |
( |
| ) |
const |
Get a list of all collision groups that this emitter has.
- Returns
- list of all collision group names
◆ getColor()
| Vec4 MOMENTUM_NAMESPACE::Emitter::getColor |
( |
| ) |
const |
Get the color of the GranularBodies that are created in the emitter.
- Returns
- The color that is set in the emitter
◆ getEmitMode()
| EmitMode MOMENTUM_NAMESPACE::Emitter::getEmitMode |
( |
| ) |
const |
Get the emit mode of the emitter.
This can be either: PARTICLES or RIGID_BODIES. (Default: PARTICLES)
- Returns
- the emit mode of the emitter. (Default: PARTICLES)
◆ getEmittedMass()
| double MOMENTUM_NAMESPACE::Emitter::getEmittedMass |
( |
| ) |
const |
Get the total mass of created GranularBodies in the Emitter.
- Note
- The unit of the mass is kg
- Returns
- The total mass of created GranularBodies in the Emitter
◆ getEmitterGeometry()
| std::shared_ptr< Geometry > MOMENTUM_NAMESPACE::Emitter::getEmitterGeometry |
( |
| ) |
const |
Get the geometry in that the emitter is coupled to.
- Returns
- The geometry that the emitter is coupled to
◆ getMassFlowRate()
| double MOMENTUM_NAMESPACE::Emitter::getMassFlowRate |
( |
| ) |
const |
Get the total mass of created GranularBodies in the Emitter.
- Note
- The unit of the mass flow is kg/s
- Returns
- The mass flow rate of created GranularBodies in the Emitter
◆ getMaximumAllowedEmittedMass()
| double MOMENTUM_NAMESPACE::Emitter::getMaximumAllowedEmittedMass |
( |
| ) |
const |
Get the maximum allowed emitted mass in the emitter.
- Returns
- The maximum allowed emitted mass in the emitter
◆ getName()
| std::string MOMENTUM_NAMESPACE::Emitter::getName |
( |
| ) |
const |
◆ getNumEmittedBodies()
| unsigned int MOMENTUM_NAMESPACE::Emitter::getNumEmittedBodies |
( |
| ) |
const |
Get the number of GranularBodies created in the Emitter.
- Returns
- The number of emitted GranularBodies in the Emitter
◆ getParticleDistribution()
| std::shared_ptr< ParticleDistribution > MOMENTUM_NAMESPACE::Emitter::getParticleDistribution |
( |
| ) |
const |
◆ getUseFixedPosition()
| bool MOMENTUM_NAMESPACE::Emitter::getUseFixedPosition |
( |
agx::Int |
axis | ) |
const |
- Parameters
-
| axis | - Axis index. If negative, the method returns true only if all axes have a fixed position. Valid values: 0 = X, 1 = Y, 2 = Z. |
- Returns
- true if a fixed position is used when creating objects from the emitter.
◆ getUseFixedRotation()
| bool MOMENTUM_NAMESPACE::Emitter::getUseFixedRotation |
( |
agx::Int |
axis | ) |
const |
- Parameters
-
| axis | - Axis index. If negative, the method returns true only if all axes have a fixed rotation. Valid values: 0 = X, 1 = Y, 2 = Z. |
- Returns
- true if fixed rotation is used, false otherwise.
◆ hasCollisionGroup()
| bool MOMENTUM_NAMESPACE::Emitter::hasCollisionGroup |
( |
const std::string & |
name | ) |
const |
Checks if this Emitter has a named collision group.
- Parameters
-
| name | - the name of the collision group |
- Returns
- true if this emitter has the named collision group
◆ removeCollisionGroup()
| bool MOMENTUM_NAMESPACE::Emitter::removeCollisionGroup |
( |
const std::string & |
name | ) |
|
Remove a named collision group from this Emitter.
- Parameters
-
| name | - the name of the collision group to be removed |
- Returns
- true if collision group
name was successfully removed
◆ setColor()
| void MOMENTUM_NAMESPACE::Emitter::setColor |
( |
const Vec4 & |
color | ) |
|
Set the color of the GranularBodies that are created in the emitter.
- Parameters
-
| color | - The color to be set on the created Granular Bodies. |
Only available in simulation mode
◆ setMassFlowRate()
| void MOMENTUM_NAMESPACE::Emitter::setMassFlowRate |
( |
double |
rate | ) |
|
Set the mass flow that will be created in the emitter.
- Note
- The unit of the mass flow is kg/s
- Parameters
-
| rate | - The mass flow rate of the Emitter. |
Only available in simulation mode
◆ setMaximumAllowedEmittedMass()
| void MOMENTUM_NAMESPACE::Emitter::setMaximumAllowedEmittedMass |
( |
double |
maximumMass | ) |
|
Set the maximum allowed emitted mass of the Emitter.
The emitter will stop outputting material after creating the specified mass.
- Note
- The unit of the mass flow is kg
- Parameters
-
| maximumMass | - The maximum mass that the emitter is allowed to emit. |
Only available in simulation mode
◆ setUseFixedPosition()
| void MOMENTUM_NAMESPACE::Emitter::setUseFixedPosition |
( |
bool |
enable, |
|
|
agx::Int |
axis |
|
) |
| |
Set if fixed position should be used on objects created from this emitter.
See also setFixedPositionOffset.
- Parameters
-
| enable | - true if a fixed position should be used when creating objects from this emitter. |
| axis | - Axis index to apply or remove the fixed position. If -1, all axes will be fixed or randomized. Valid values: 0 = X, 1 = Y, 2 = Z (or -1 to modify all) |
◆ setUseFixedRotation()
| void MOMENTUM_NAMESPACE::Emitter::setUseFixedRotation |
( |
bool |
enable, |
|
|
agx::Int |
axis |
|
) |
| |
Set if a fixed rotation should be used on objects created from this emitter.
The rotation may be fixed for all, none, or some of the axes. See also setFixedRotationOffset.
- Parameters
-
| enable | - true if a fixed rotation should be used when creating objects from this emitter. |
| axis | - Axis index to apply or remove the fixed rotation. If -1, all axes will be fixed or randomized. Valid values: 0 = X, 1 = Y, 2 = Z (or -1 to modify all) |
◆ setVelocity()
| void MOMENTUM_NAMESPACE::Emitter::setVelocity |
( |
const Vec3 & |
velocity | ) |
|
Set the velocity of the emitted Granular Bodies from the Emitter.
- Parameters
-
| velocity | - The velocity of the emitted Granular Bodies. |
Only available in simulation mode