AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
MergeSplitAlgorithm.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. 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{
26
33 {
34 public:
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
59
60 protected:
65
70 virtual void onPreStepCompute();
71
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}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXPHYSICS_EXPORT
Object containing merge-split actions to be processed by the agxSDK::MergeSplitHandler.
Stateless base class for merge and split of interactions.
virtual void onPreStepActions(agxSDK::MergeSplitActionContainer &actions)
Push merge and/or split actions in simulation preStep.
virtual void store(agxStream::OutputArchive &out) const override
Stores internal data.
MergeSplitAlgorithm()
Default constructor.
virtual ~MergeSplitAlgorithm()
Reference counted object, protected destructor.
virtual void onPreStepCompute()
Compute callback in preStep.
virtual void onPostSolveComputeEx(const agxSDK::MergeSplitPostSolveData &postSolveData, const agxSDK::MergedBodyMergeSplitAlgorithm &mergedBodyAlgorithm)
Extended compute callback in postSolve.
virtual void onPostSolveCompute(const agxSDK::MergeSplitPostSolveData &postSolveData)
Compute callback in postSolve.
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agxSDK::MergeSplitAlgorithm)
virtual void restore(agxStream::InputArchive &in) override
Restores internal data.
agxSDK::MergeSplitHandler * getMergeSplitHandler() const
virtual void onPostSolveActions(const agxSDK::MergeSplitPostSolveData &postSolveData, agxSDK::MergeSplitActionContainer &actions)
Push merge and/or split actions in simulation postSolve.
Base class for a merge split algorithm handling a set of merged bodies.
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:51
Class for writing serialized data in binary format to a stream.
Definition: OutputArchive.h:57
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
Base class providing referencing counted objects.
Definition: Referenced.h:120
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31