AGX Dynamics  2.37.2.0
MergeSplitParallelRaContainerKernel.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 
20 
21 namespace agxSDK
22 {
23  class MergeSplitHandler;
24 
25  template<typename T>
27  {
28  public:
34 
40  void doExecute( const T* container,
41  const agxSDK::MergeSplitHandler* handler,
42  const agxSDK::MergeSplitPostSolveData* postSolveData = nullptr );
43 
48 
53 
58 
59  protected:
64 
65  private:
66  const MergeSplitHandler* m_handler;
67  const MergeSplitPostSolveData* m_postSolveData;
68  };
69 
70  template<typename T>
72  : agx::ParallelRaContainerKernel<T>( name ),
73  m_handler( nullptr ),
74  m_postSolveData( nullptr )
75  {
76  }
77 
78  template<typename T>
80  {
81  }
82 
83  template<typename T>
85  const MergeSplitHandler* handler,
86  const MergeSplitPostSolveData* postSolveData /*= nullptr*/ )
87  {
88  m_handler = handler;
89  m_postSolveData = postSolveData;
91  m_postSolveData = nullptr;
92  m_handler = nullptr;
93  }
94 
95  template<typename T>
97  {
98  return m_handler;
99  }
100 
101  template<typename T>
103  {
104  return m_postSolveData;
105  }
106 }
MergeSplitParallelRaContainerKernel(const agx::Name &name)
Construct given name of this kernel.
Base class for a merge split algorithm handling a set of merged bodies.
Representation of a name string.
Definition: Name.h:32
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
const agxSDK::MergeSplitPostSolveData * getPostSolveData() const
virtual ~MergeSplitParallelRaContainerKernel()
Reference counted object - protected destructor.
void doExecute(const T *container, const agxSDK::MergeSplitHandler *handler, const agxSDK::MergeSplitPostSolveData *postSolveData=nullptr)
Execute parallel iterate over given container.
ParallelRaContainerKernel(const agx::Name &name)
Construct given name.
virtual void doExecute(const T *container)
Execute the jobs (blocking mode) given container.
const agxSDK::MergeSplitHandler * getHandler() const
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30