AGX Dynamics  2.37.2.0
MergeIgnoreFilter.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
9 having been advised so by Algoryx Simulation AB for a time limited evaluation,
10 or having purchased a 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 
19 #include <agx/HashSet.h>
22 #include <agxStream/InputArchive.h>
23 
24 
25 namespace agxSDK
26 {
33  {
34  public:
41  void addRejection(agx::UInt32 group1, agx::UInt32 group2);
42 
49  void removeRejection(agx::UInt32 group1, agx::UInt32 group2);
50 
51 
59  agx::Bool rejects(agx::UInt32 group1, agx::UInt32 group2) const;
60 
68  agx::Bool rejects(const agx::UInt32Vector& groups1, const agx::UInt32Vector& groups2) const;
69 
70  void store(agxStream::OutputArchive& archive) const;
71  void restore(agxStream::InputArchive& archive);
72 
73  public:
79  static agx::UInt32 nameToId(const agx::Name& name);
80 
86  static agx::Bool isNameId(agx::UInt32 id);
87 
93 
94 
95  private:
96  // Set of pairs of UInt32 groups IDs, each pair stored with the smallest
97  // group ID in the high half of the UInt64 and the higher group ID in the
98  // low half.
99  agx::HashSet<agx::UInt64> m_rejectPairs;
100  };
101 }
bool Bool
Definition: Integer.h:48
#define AGXPHYSICS_EXPORT
Representation of a name string.
Definition: Name.h:32
static const agx::UInt32 MAX_UNAMED_GROUP_ID
The maximum ID that may be used to create an unamed group.
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:56
A collection of merge ignore group ID pairs for which merge should be rejected.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
uint32_t UInt32
Definition: Integer.h:40