Momentum Scripting v1
Loading...
Searching...
No Matches
ParticleDistribution.h
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material without having a written signed agreement with Algoryx Simulation AB.
9
10Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
11from using this software, unless otherwise stated in written agreements with
12Algoryx Simulation AB.
13*/
14#pragma once
15
16#include "momentum_namespace.h"
17#include "momentum_export.h"
18#include "macros.h"
19#include <agx/ParticleEmitter.h>
20
21#include <string>
22
23#include "Vec3.h"
24#include "Vec4.h"
25#include "Material.h"
26
27namespace MOMENTUM_NAMESPACE
28{
35 class MOMENTUM_EXPORT ParticleModel
36 {
37 public:
41#ifndef SWIG
43
46 ParticleModel( agx::ParticleEmitter::DistributionModel* model );
48#endif
49
53 double getRadius() const;
54
58 std::shared_ptr < Material > getMaterial() const;
59
60 private:
61 friend class Simulation;
62#ifndef SWIG
63 agx::ParticleEmitter::DistributionModel* m_model;
64#endif
65 };
66 V1_DECLARE_CONTAINER_TYPE( ParticleModel );
67
68
73 class MOMENTUM_EXPORT ParticleDistribution
74 {
75 public:
79#ifndef SWIG
81
84 ParticleDistribution( agx::Emitter::DistributionTable* table );
86#endif
87
93 std::shared_ptr < ParticleModel > getRandomModel();
94
98 unsigned int getNumParticleModels();
99
104
105 private:
106 friend class Simulation;
107 friend class GranularBodySystem;
108#ifndef SWIG
109 agx::Emitter::DistributionTable* m_table;
110#endif
111 };
112
113 V1_DECLARE_CONTAINER_TYPE( ParticleDistribution );
114}
The GranularBodySystem class acts as a container for all the active GranularBodies in the simulation.
Definition: GranularBodySystem.h:57
A wrapper class for a ParticleDistribution of ParticleModels.
Definition: ParticleDistribution.h:74
std::shared_ptr< ParticleModel > getRandomModel()
ParticleModelVector getParticleModels() const
Wrapper class for a ParticleModel used in the ParticleDistribution.
Definition: ParticleDistribution.h:36
std::shared_ptr< Material > getMaterial() const
This class is used to access an existing simulation with all its contents including joints,...
Definition: Simulation.h:70
Namespace for Momentum Scripting API.
Definition: AffineMatrix4x4.h:29
std::vector< std::shared_ptr< ParticleModel > > ParticleModelVector
A vector with objects of the type ParticleModel .
Definition: ParticleDistribution.h:66