AGX Dynamics  2.37.2.0
MergeSplitAlgorithm.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 #pragma once
18 
21 
22 namespace agxSDK
23 {
26 
33  {
34  public:
35  enum Callback
36  {
37  NONE = 0,
38  CONTACTS = 1 << 0,
39  CONSTRAINTS = 1 << 1,
40  WIRES = 1 << 2,
41  POST_SOLVE = 1 << 3,
42  GRANULARS = 1 << 4,
43  END_OF_CALLBACKS = 1 << 5
44  };
45 
46  public:
48 
49  protected:
54 
58  agxSDK::MergeSplitHandler* getMergeSplitHandler() const;
59 
60  protected:
64  virtual ~MergeSplitAlgorithm();
65 
70  virtual void onPreStepCompute();
71 
76  virtual void onPreStepActions( agxSDK::MergeSplitActionContainer& actions );
77 
83  virtual void onPostSolveCompute( const agxSDK::MergeSplitPostSolveData& postSolveData );
84 
91  virtual void onPostSolveComputeEx( const agxSDK::MergeSplitPostSolveData& postSolveData,
92  const agxSDK::MergedBodyMergeSplitAlgorithm& mergedBodyAlgorithm );
93 
99  virtual void onPostSolveActions( const agxSDK::MergeSplitPostSolveData& postSolveData,
101 
105  virtual void store( agxStream::OutputArchive& out ) const override;
106 
110  virtual void restore( agxStream::InputArchive& in ) override;
111 
112  private:
114  void setMergeSplitHandler( agxSDK::MergeSplitHandler* handler );
115 
116  private:
117  MergeSplitHandler* m_mergeSplitHandler;
118  };
119 }
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Definition: InputArchive.h:400
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
Base class for a merge split algorithm handling a set of merged bodies.
#define AGXPHYSICS_EXPORT
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
Base class providing referencing counted objects.
Definition: Referenced.h:119
Object containing merge-split actions to be processed by the agxSDK::MergeSplitHandler.
Stateless base class for merge and split of interactions.
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:51
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
Class for writing serialized data in binary format to a stream.
Definition: OutputArchive.h:56
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition: Serializable.h:221
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30