AGXDynamics  2.35.0.2
DeformableParticleMesh.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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
agx::Real
double Real
Definition: Real.h:42
agxModel
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:36
agx::Vector
Templated vector class.
Definition: Vector.h:52
export.h
Assembly.h
AGXSTREAM_DECLARE_SERIALIZABLE
#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
agxSDK::Assembly
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
Definition: Assembly.h:66
RawMesh.h
agx::ref_ptr< Material >
agxModel::DeformableParticleMesh
Definition: DeformableParticleMesh.h:30
agx::Name
Representation of a name string.
Definition: Name.h:32
Serializable.h
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition: agxModel/export.h:42
agx::Constraint::SolveType
SolveType
Specifies in what solvers the constraint will be solved.
Definition: Constraint.h:92
DistanceJoint.h
agx::Material
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:387
agx::UInt32
uint32_t UInt32
Definition: Integer.h:40
agxUtil::RawMesh
A class to hold a general represenation of a mesh with arbitrary number of vertices in a face.
Definition: RawMesh.h:34