AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
GeometryContactMergeSplitAlgorithm.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
23
24namespace agxSDK
25{
27
29 {
30 public:
32 {
33 VALID = 1 << 0,
34 IMPACTING = 1 << 1,
35 SLIDING = 1 << 2,
36 ROLLING = 1 << 3,
37 RESTING = 1 << 4
38 };
39 typedef agx::BitState<EContactState, agx::Int32> ContactState;
40
42 {
44 : mergedState( (agx::RigidBody*)nullptr, nullptr, nullptr ) {}
45
48 };
50
51 public:
56 const agxSDK::MergedState& mergedState,
57 const agxSDK::MergeSplitHandler& handler );
58
63 const agxSDK::MergedState& mergedState,
64 const agxSDK::MergeSplitPostSolveData& postSolveData,
65 const agxSDK::MergeSplitHandler& handler );
66
67 public:
72
78
80
81 protected:
86
87 virtual void onPreStepCompute() override;
88 virtual void onPreStepActions( agxSDK::MergeSplitActionContainer& actions ) override;
89
90 virtual void onPostSolveCompute( const agxSDK::MergeSplitPostSolveData& postSolveData ) override;
91 virtual void onPostSolveActions( const agxSDK::MergeSplitPostSolveData& postSolveData, agxSDK::MergeSplitActionContainer& actions ) override;
92
93 private:
95 ComputeDataContainer m_result;
96 };
97}
#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
A contact between two geometries.
Definition Contacts.h:271
virtual void onPostSolveActions(const agxSDK::MergeSplitPostSolveData &postSolveData, agxSDK::MergeSplitActionContainer &actions) override
Push merge and/or split actions in simulation postSolve.
virtual void onPostSolveCompute(const agxSDK::MergeSplitPostSolveData &postSolveData) override
Compute callback in postSolve.
static ContactState findImpactingContactState(const agxCollide::GeometryContact &geometryContact, const agxSDK::MergedState &mergedState, const agxSDK::MergeSplitHandler &handler)
Finds the impacting state of a geometry contact.
virtual void onPreStepCompute() override
Compute callback in preStep.
virtual ~GeometryContactMergeSplitAlgorithm()
Reference counted object, protected destructor.
const ComputeDataContainer & getComputeData() const
agx::BitState< EContactState, agx::Int32 > ContactState
static ContactState findContactState(const agxCollide::GeometryContact &geometryContact, const agxSDK::MergedState &mergedState, const agxSDK::MergeSplitPostSolveData &postSolveData, const agxSDK::MergeSplitHandler &handler)
Finds the contact state of a geometry contact after the solver has solved the contact.
GeometryContactMergeSplitAlgorithm()
Default constructor.
virtual void onPreStepActions(agxSDK::MergeSplitActionContainer &actions) override
Push merge and/or split actions in simulation preStep.
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
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31
The agx namespace contains the dynamics/math part of the AGX Dynamics API.