AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
ConstraintMergeSplitAlgorithm.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
20
21#include <agxUtil/agxUtil.h>
22
24
25namespace agxSDK
26{
28
30 {
31 public:
33 {
34 REL_VELOCITIES_BELOW_THRESHOLD = 1 << 0,
35 DRIVER_ACTIVE = 1 << 1,
36 SPLIT_FIRST_DUE_TO_CONSTRAINT_FORCES = 1 << 2,
37 SPLIT_SECOND_DUE_TO_CONSTRAINT_FORCES = 1 << 3,
38 ACTIVE_TOGGLED = 1 << 4,
39 DIFF_ABOVE_THRESHOLD = 1 << 5
40 };
41 typedef agx::BitState<EConstraintState, agx::Int32> ConstraintState;
42
54
63
69
70 public:
75
81
83
84 protected:
89
90 virtual void onPreStepCompute() override;
91 virtual void onPreStepActions( agxSDK::MergeSplitActionContainer& actions ) override;
92
93 virtual void onPostSolveCompute( const agxSDK::MergeSplitPostSolveData& postSolveData ) override;
94 virtual void onPostSolveComputeEx( const agxSDK::MergeSplitPostSolveData& postSolveData,
95 const agxSDK::MergedBodyMergeSplitAlgorithm& mergedBodyAlgorithm ) override;
96 virtual void onPostSolveActions( const agxSDK::MergeSplitPostSolveData& postSolveData, agxSDK::MergeSplitActionContainer& actions ) override;
97
98 private:
99 void propagateSplit( const agx::HighLevelConstraintImplementation& implementation,
100 const agxSDK::ConstraintMergedState& mergedState,
102
103 private:
105 ComputeDataContainer m_preStepResult;
106 PostSolveComputeDataContainer m_postSolveResult;
107 PostSolveComputeExDataContainer m_postSolveExResult;
108 };
109}
#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
virtual void onPostSolveActions(const agxSDK::MergeSplitPostSolveData &postSolveData, agxSDK::MergeSplitActionContainer &actions) override
Push merge and/or split actions in simulation postSolve.
virtual void onPreStepCompute() override
Compute callback in preStep.
virtual void onPreStepActions(agxSDK::MergeSplitActionContainer &actions) override
Push merge and/or split actions in simulation preStep.
ConstraintMergeSplitAlgorithm()
Default constructor.
virtual void onPostSolveComputeEx(const agxSDK::MergeSplitPostSolveData &postSolveData, const agxSDK::MergedBodyMergeSplitAlgorithm &mergedBodyAlgorithm) override
Extended compute callback in postSolve.
virtual ~ConstraintMergeSplitAlgorithm()
Reference counted object, protected destructor.
const PostSolveComputeDataContainer & getPostSolveComputeData() const
agx::BitState< EConstraintState, agx::Int32 > ConstraintState
virtual void onPostSolveCompute(const agxSDK::MergeSplitPostSolveData &postSolveData) override
Compute callback in postSolve.
Object containing merge-split actions to be processed by the agxSDK::MergeSplitHandler.
Stateless base class for merge and split of interactions.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31