Momentum Scripting v1
Loading...
Searching...
No Matches
BodyDistribution.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/Emitter.h>
20#include <agx/RigidBodyEmitter.h>
21
22#include <string>
23
24#include "Vec3.h"
25#include "Vec4.h"
26#include "RigidBody.h"
27
28namespace MOMENTUM_NAMESPACE
29{
37 class MOMENTUM_EXPORT BodyModel
38 {
39 public:
41 BodyModel();
43#ifndef SWIG
45
48 BodyModel( agx::RigidBodyEmitter::DistributionModel* model );
50#endif
51
55 std::shared_ptr<RigidBody> getBodyTemplate() const;
56
60 std::string getName() const;
61
62 private:
63 bool modelIsValid() const;
64
65 private:
66 friend class Simulation;
67#ifndef SWIG
68 agx::RigidBodyEmitter::DistributionModel* m_model;
69#endif
70 };
71 V1_DECLARE_CONTAINER_TYPE( BodyModel );
72
77 class MOMENTUM_EXPORT BodyDistribution
78 {
79 public:
83#ifndef SWIG
85
88 BodyDistribution( agx::Emitter::DistributionTable* table );
90#endif
91
97 std::shared_ptr < BodyModel > getRandomModel();
98
102 unsigned int getNumBodyModels();
103
108
109 private:
110 friend class Simulation;
111#ifndef SWIG
112 agx::Emitter::DistributionTable* m_table;
113#endif
114 };
115
116 V1_DECLARE_CONTAINER_TYPE( BodyDistribution );
117}
Wrapper class for a BodyDistribution of BodyModels.
Definition: BodyDistribution.h:78
std::shared_ptr< BodyModel > getRandomModel()
BodyModelVector getBodyModels() const
Wrapper class for a rigid body model used in the body distribution.
Definition: BodyDistribution.h:38
std::shared_ptr< RigidBody > getBodyTemplate() const
std::string getName() 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< BodyModel > > BodyModelVector
A vector with objects of the type BodyModel .
Definition: BodyDistribution.h:71