AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
GranularContactMergeSplitAlgorithm.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#pragma once
18
21
22namespace agxSDK
23{
25
27 {
28 public:
30 {
31 VALID = 1 << 0,
32 IMPACTING = 1 << 1,
33 SLIDING = 1 << 2,
34 ROLLING = 1 << 3,
35 RESTING = 1 << 4
36 };
37 typedef agx::BitState<EContactState, agx::Int32> ContactState;
38
39 public:
44
46
48
49 protected:
50
52 const agx::Vec3f& normal, const agx::Vec3& cmPos1, const agx::Vec3& cmPos2, const agx::Vec3& v1,
53 const agx::Vec3& v2, const agx::Vec3& a1, const agx::Vec3& a2, const agx::Vec3f& u, const agx::Vec3f& v);
54
56
58
60
62
64
67
69
71
76
77 private:
79
81 // Variables
83 protected:
84 agx::HashSet<agx::Index> m_particlesToDestroy; // Contains particles that are marked for merge and should be removed replaced with rigid bodies
85 };
86}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
const agxSDK::Simulation * getSimulation() const
agx::RigidBody * createRigidBodyFromGranulate(agx::Physics::GranularBodyPtr gptr)
virtual ~GranularContactMergeSplitAlgorithm()
Reference counted object, protected destructor.
GranularContactMergeSplitAlgorithm::ContactState findContactState(const agx::Physics::ParticlePairContactPtr &contact)
GranularContactMergeSplitAlgorithm::ContactState findContactState(const agx::Physics::ParticleGeometryContactPtr &contact)
GranularContactMergeSplitAlgorithm::ContactState findContactState(const agx::Vec3 &point, const agx::Vec3f &normal, const agx::Vec3 &cmPos1, const agx::Vec3 &cmPos2, const agx::Vec3 &v1, const agx::Vec3 &v2, const agx::Vec3 &a1, const agx::Vec3 &a2, const agx::Vec3f &u, const agx::Vec3f &v)
void postSolveParticlePairContact(const agx::Physics::ParticlePairContactPtr &contact, const agxSDK::MergedState &mergedState, agxSDK::MergeSplitActionContainer &actions)
agx::Physics::GranularBodySystem * getGranularBodySystem()
GranularContactMergeSplitAlgorithm()
Default constructor.
static agx::Physics::GranularBodyPtr ConvertRigidBodyGranulateToGranularBody(agxSDK::Simulation *simulation, agx::RigidBody *rb)
agx::BitState< EContactState, agx::Int32 > ContactState
void postSolveParticleGeometryContact(const agx::Physics::ParticleGeometryContactPtr &contact, const agxSDK::MergedState &mergedState, agxSDK::MergeSplitActionContainer &actions)
Object containing merge-split actions to be processed by the agxSDK::MergeSplitHandler.
Stateless base class for merge and split of interactions.
Base class for a merge split algorithm handling a set of merged bodies.
Object holding merged bodies and state given a pair of rigid bodies.
Definition MergedState.h:29
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition Simulation.h:126
Inheritance with partial specialization due to bug with ref_ptr containers.
Pointer to a entity instance of type Physics.GranularBody.
Pointer to a entity instance of type Physics.ParticleGeometryContact.
Pointer to a entity instance of type Physics.ParticlePairContact.
The rigid body class, combining a geometric model and a frame of reference.
Definition RigidBody.h:52
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31