AGX Dynamics  2.35.0.1
SolveBodyManager.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 #ifndef AGX_PHYSISCS_HIERARCHICAL_GRID_SOLVE_BODY_MANAGER_H
18 #define AGX_PHYSISCS_HIERARCHICAL_GRID_SOLVE_BODY_MANAGER_H
19 
20 
21 #include <agx/debug.h>
22 #include <agx/AtomicValue.h>
24 #include <agx/Component.h>
25 #include <agxData/Buffer.h>
26 
27 #ifdef _MSC_VER
28 # pragma warning(push)
29 // warning C4251: 'X' : class 'Y' needs to have dll-interface to be used by clients of class 'Z'
30 # pragma warning( disable : 4251 )
31 #endif
32 
33 namespace agx { namespace Physics { namespace HierarchicalGrid {
34 
37  {
38  public:
40 
41  static const Index ArraySize = 32;
42 
43  public:
45 
46  void registerCell(CellPtr cell);
47  void unregisterCell(CellPtr cell);
48 
49  void clear();
50  void resetCounters();
51 
52  protected:
53  virtual ~SolveBodyManager();
54 
55  private:
56  void reallocationCallback(agxData::Buffer *);
57 
58  private:
59  agxData::BufferRef m_solveBodyCounterBuffer;
60 
61  typedef HashSet<CellPtr> CellHash;
62  CellHash m_activeCells;
63 
64  agxData::Buffer::Event::CallbackType m_reallocationCallback;
65  IndexVector m_inactiveCounterArrays;
66  AtomicValue *m_currentBuffer;
67  };
68 
69 }}}
70 
71 #ifdef _MSC_VER
72 # pragma warning(pop)
73 #endif
74 
75 
76 #endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGXPHYSICS_EXPORT
Abstract representation of a data buffer.
Definition: Buffer.h:56
A component is an object containing other objects, enabling hierarchical structuring.
Definition: Component.h:39
T CallbackType
Definition: Event.h:37
A model is an abstract representation of the class of an agx::Object.
Definition: Model.h:41
Pointer to a entity instance of type Physics.HierarchicalGrid.Cell.
Definition: CellEntity.h:250
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
UInt32 Index
Definition: Integer.h:52