AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
DeformableParticleMesh.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. 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 unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx 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>
26
27namespace agxModel
28{
29
31 {
32 public:
33 // Used for serialization
35
47 agxUtil::RawMesh* rawMesh);
48
53 void setMass(agx::Real mass);
54
60
66
72
78
83 void addParticleGroup(const agx::Name& name);
84
90
95 void removeParticleGroup(const agx::Name& name);
96
102
108
113
119
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
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXMODEL_EXPORT
void setParticleRadius(agx::Real radius)
Set the radius of all the particles.
void setConstraintSolveType(agx::Constraint::SolveType solveType)
Set the solve type for the distance joints connecting the particles.
void removeParticleGroup(const agx::Name &name)
Remove a collision group from all particles in the mesh.
void addParticleGroup(agx::UInt32 id)
Add a collision group to all particles in the mesh.
void setParticleMaterial(agx::Material *material)
Set the material of all the particles.
void setMass(agx::Real mass)
Set the properties of the entire mesh.
DeformableParticleMesh(agxUtil::RawMesh *rawMesh)
Create a deformable mesh from the RawMesh specified.
agx::Vector< agx::UIntVector > getFaces() const
Get the indices of all particles in each face.
const agx::RigidBodyRefVector & getParticles() const
Get a list of all the particles in the mesh.
void addParticleGroup(const agx::Name &name)
Add a collision group to all particles in the mesh.
const agx::Vector< agx::DistanceJointRef > & getConstraints() const
Get a list of all the joints in the mesh.
void setConstraintCompliance(agx::Real compliance)
Set the compliance of the distance joints connecting the particles.
agxUtil::RawMesh * getSourceMesh() const
Get the mesh without deformation.
void removeParticleGroup(agx::UInt32 id)
Remove a collision group from all particles in the mesh.
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
Definition Assembly.h:68
A class to hold a general represenation of a mesh with arbitrary number of vertices in a face.
Definition RawMesh.h:35
SolveType
Specifies in what solvers the constraint will be solved.
Definition Constraint.h:93
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition Material.h:376
Representation of a name string.
Definition Name.h:33
Templated vector class.
Definition agx/Vector.h:53
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition FlowUnit.h:37
uint32_t UInt32
Definition Integer.h:32
double Real
Definition Real.h:42