AGX Dynamics  2.37.2.0
DeformableParticleMesh.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGX_DEFORMABLEPARTICLEMESH_H
18 #define AGX_DEFORMABLEPARTICLEMESH_H
19 
20 #include <agxSDK/Assembly.h>
21 
22 #include <agxUtil/RawMesh.h>
23 #include <agx/DistanceJoint.h>
24 #include <agxModel/export.h>
25 #include <agxStream/Serializable.h>
26 
27 namespace agxModel
28 {
29 
31  {
32  public:
33  // Used for serialization
35 
47  agxUtil::RawMesh* rawMesh);
48 
53  void setMass(agx::Real mass);
54 
59  void setConstraintSolveType(agx::Constraint::SolveType solveType);
60 
65  void setConstraintCompliance(agx::Real compliance);
66 
71  void setParticleRadius(agx::Real radius);
72 
77  void setParticleMaterial(agx::Material* material);
78 
83  void addParticleGroup(const agx::Name& name);
84 
89  void addParticleGroup(agx::UInt32 id);
90 
95  void removeParticleGroup(const agx::Name& name);
96 
101  void removeParticleGroup(agx::UInt32 id);
102 
107  agx::Vector<agx::UIntVector> getFaces() const;
108 
112  const agx::RigidBodyRefVector& getParticles() const;
113 
118  const agx::Vector<agx::DistanceJointRef>& getConstraints() const;
119 
123  agxUtil::RawMesh* getSourceMesh() const;
124 
126 
127  private:
128  void addJoint(size_t firstParticle, size_t secondParticle);
129 
130  agx::RigidBodyRefVector m_particles;
132 
133  agx::MaterialRef m_particleMaterial;
134 
135  agxUtil::RawMeshRef m_sourceMesh;
136  };
137 
138 }
139 #endif // AGX_DEFORMABLEPARTICLEMESH_H
Representation of a name string.
Definition: Name.h:32
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:36
Templated vector class.
Definition: Vector.h:52
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:375
A class to hold a general represenation of a mesh with arbitrary number of vertices in a face...
Definition: RawMesh.h:34
SolveType
Specifies in what solvers the constraint will be solved.
Definition: Constraint.h:92
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXMODEL_EXPORT
double Real
Definition: Real.h:42
uint32_t UInt32
Definition: Integer.h:40
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints, geometries.
Definition: Assembly.h:66