AGX Dynamics  2.37.2.0
ContactZoneEntity.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 
18 // AUTOMATICALLY GENERATED ENTITY, DO NOT EDIT! //
20 
21 #ifndef GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CONTACTZONE_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CONTACTZONE_H_PLUGIN
23 
24 #define AGX_ENTITY_WRAPPER 1
25 
26 
27 #ifdef _MSC_VER
28 # pragma warning(push)
29 // warning C4505: 'agxData::VectorAttributeT<T>::print' : unreferenced local function has been removed
30 # pragma warning( disable : 4505 )
31 // warning C4251: 'X' : class 'Y' needs to have dll-interface to be used by clients of class 'Z'
32 # pragma warning( disable : 4251 )
33 // warning C4355: 'this' : used in base member initializer list
34 # pragma warning( disable : 4355 )
35 // marked as __forceinline not inlined
36 # pragma warning( disable: 4714 )
37 #endif
38 
39 #include <agxData/EntityModel.h>
40 #include <agxData/EntityStorage.h>
41 #include <agxData/EntityRef.h>
42 #include <agxData/EntityPtr.h>
43 #include <agxData/EntityInstance.h>
44 #include <agx/Integer.h>
45 #include <agx/Real.h>
46 #include <agx/macros.h>
47 #include <agx/Integer.h>
48 #include <agx/AtomicValue.h>
53 #include <agx/Vec3.h>
54 #include <agx/Vec4.h>
55 namespace agx { class Job; }
56 
57 namespace agx { namespace Physics { namespace HierarchicalGrid { class CellPtr; }}}
58 namespace agx { namespace Physics { namespace HierarchicalGrid { class GridTierPtr; }}}
59 namespace agx { namespace Physics { namespace HierarchicalGrid { class ContactZoneDependencyPtr; }}}
60 namespace agx { namespace Physics { class SolveGroupPtr; }}
61 
62 namespace agx
63 {
64  namespace Physics
65  {
66  namespace HierarchicalGrid
67  {
68 
69  class ContactZoneModel;
70  class ContactZoneData;
71  class ContactZonePtr;
72  class ContactZoneInstance;
73  class ContactZoneSemantics;
74 
75 
77 
82  {
83  public:
85 
86  ContactZoneModel(const agx::String& name = "ContactZone");
87 
89  static ContactZoneModel* instance();
90 
92  static ContactZonePtr createInstance();
93 
95  static agxData::EntityStorage* defaultStorage();
96 
98  virtual void shutdownCleanup() override;
99 
100 
101 
102  /* Attributes */
118 
119  protected:
120  virtual ~ContactZoneModel();
121  virtual agxData::EntityData* createData(agxData::EntityStorage* storage) override;
122  virtual void configure(agx::TiXmlElement* eEntity) override;
123  virtual void initAttributeAccessors() override;
124  virtual void construct(agxData::EntityPtr instance) override;
125  void construct(agx::Physics::HierarchicalGrid::ContactZonePtr contactZone);
126  };
127 
128 
130  #ifndef AGX_PHYSICS_HIERARCHICALGRID_CONTACTZONE_DATA_SET_OVERRIDE
131  #define AGX_PHYSICS_HIERARCHICALGRID_CONTACTZONE_DATA_SET
132  class AGXPHYSICS_EXPORT ContactZoneData : public agxData::EntityData
133  {
134  public:
135  ContactZoneInstance operator[] (size_t index);
136 
137  public:
139  agxData::Array< agxData::Array< agx::UInt32 > > particleParticleContacts;
140  agxData::Array< agxData::Array< agx::UInt32 > > particleGeometryContacts;
141  agxData::Array< agxData::Array< agx::UInt32 > > geometryGeometryContacts;
142  agxData::Array< agx::UInt32 > totNumContacts;
143  agxData::Array< agx::AtomicValue > numParticleParticleContacts;
144  agxData::Array< agx::AtomicValue > numParticleGeometryContacts;
145  agxData::Array< agx::AtomicValue > numGeometryContacts;
154 
155  public:
156  typedef agxData::Array< agx::UInt32 > particleParticleContactsType;
157  typedef agxData::Array< agx::UInt32 > particleGeometryContactsType;
158  typedef agxData::Array< agx::UInt32 > geometryGeometryContactsType;
159  typedef agx::UInt32 totNumContactsType;
160  typedef agx::AtomicValue numParticleParticleContactsType;
161  typedef agx::AtomicValue numParticleGeometryContactsType;
162  typedef agx::AtomicValue numGeometryContactsType;
163  typedef agxData::Array< agx::Physics::SolveGroupPtr > solveGroupsType;
164  typedef agx::Physics::HierarchicalGrid::CellPtr spatialCellType;
166  typedef agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr interTierDependencyListType;
167  typedef agx::UInt8 typeType;
168  typedef agx::Vec3i idType;
169  typedef agx::Job* jobType;
170  typedef agx::Vec4f colorType;
171 
172  public:
173  ContactZoneData(agxData::EntityStorage* storage);
174  ContactZoneData();
175 
176  protected:
177  virtual ~ContactZoneData() {}
178  virtual void setNumElements(agx::Index numElements) override;
179 
180  private:
181  ContactZoneData& operator= (const ContactZoneData&) { return *this; }
182 
183  };
184  #endif
186 
187 
189  class AGXPHYSICS_EXPORT ContactZoneSemantics : protected agxData::EntityPtr
190  {
191  public:
192 
193  // Automatic getters
194  agxData::Array< agx::UInt32 > const& getParticleParticleContacts() const;
195  agxData::Array< agx::UInt32 > const& getParticleGeometryContacts() const;
196  agxData::Array< agx::UInt32 > const& getGeometryGeometryContacts() const;
197  agx::UInt32 const& getTotNumContacts() const;
198  agx::AtomicValue const& getNumParticleParticleContacts() const;
199  agx::AtomicValue const& getNumParticleGeometryContacts() const;
200  agx::AtomicValue const& getNumGeometryContacts() const;
201  agxData::Array< agx::Physics::SolveGroupPtr > const& getSolveGroups() const;
202  agx::Physics::HierarchicalGrid::CellPtr const& getSpatialCell() const;
203  agx::Physics::HierarchicalGrid::GridTierPtr const& getTier() const;
204  agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& getInterTierDependencyList() const;
205  agx::UInt8 const& getType() const;
206  agx::Vec3i const& getId() const;
207  agx::Job* const& getJob() const;
208  agx::Vec4f const& getColor() const;
209 
210  // Semantics defined by explicit kernels
211 
212  // Automatic setters
213  void setParticleParticleContacts(agxData::Array< agx::UInt32 > const& value);
214  void setParticleGeometryContacts(agxData::Array< agx::UInt32 > const& value);
215  void setGeometryGeometryContacts(agxData::Array< agx::UInt32 > const& value);
216  void setTotNumContacts(agx::UInt32 const& value);
217  void setNumParticleParticleContacts(agx::AtomicValue const& value);
218  void setNumParticleGeometryContacts(agx::AtomicValue const& value);
219  void setNumGeometryContacts(agx::AtomicValue const& value);
220  void setSolveGroups(agxData::Array< agx::Physics::SolveGroupPtr > const& value);
221  void setSpatialCell(agx::Physics::HierarchicalGrid::CellPtr const& value);
222  void setTier(agx::Physics::HierarchicalGrid::GridTierPtr const& value);
223  void setInterTierDependencyList(agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& value);
224  void setType(agx::UInt8 const& value);
225  void setId(agx::Vec3i const& value);
226  void setJob(agx::Job* const& value);
227  void setColor(agx::Vec4f const& value);
228 
229 
230  protected:
231  friend class ContactZonePtr;
232  friend class ContactZoneInstance;
233  ContactZoneSemantics();
234  };
236 
237 
238 
241  class CALLABLE ContactZonePtr : public agxData::EntityPtr
242  {
243  public:
245  typedef ContactZoneData DataType;
246  typedef ContactZoneInstance InstanceType;
247 
248  public:
253  AGXPHYSICS_EXPORT ContactZonePtr& operator= (const agxData::EntityPtr& ptr);
254  AGXPHYSICS_EXPORT ContactZonePtr& operator= (const agxData::EntityInstance& instance);
255  AGXPHYSICS_EXPORT ContactZoneInstance instance();
256  AGXPHYSICS_EXPORT const ContactZoneInstance instance() const;
257 
258  AGXPHYSICS_EXPORT ContactZoneSemantics* operator->();
259  AGXPHYSICS_EXPORT const ContactZoneSemantics* operator->() const;
260 
261  ContactZoneData* getData();
262  const ContactZoneData* getData() const;
263 
264 
266  AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 >& particleParticleContacts();
268  AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const& particleParticleContacts() const;
269 
271  AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 >& particleGeometryContacts();
273  AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const& particleGeometryContacts() const;
274 
276  AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 >& geometryGeometryContacts();
278  AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const& geometryGeometryContacts() const;
279 
281  AGXPHYSICS_EXPORT agx::UInt32& totNumContacts();
283  AGXPHYSICS_EXPORT agx::UInt32 const& totNumContacts() const;
284 
286  AGXPHYSICS_EXPORT agx::AtomicValue& numParticleParticleContacts();
288  AGXPHYSICS_EXPORT agx::AtomicValue const& numParticleParticleContacts() const;
289 
291  AGXPHYSICS_EXPORT agx::AtomicValue& numParticleGeometryContacts();
293  AGXPHYSICS_EXPORT agx::AtomicValue const& numParticleGeometryContacts() const;
294 
296  AGXPHYSICS_EXPORT agx::AtomicValue& numGeometryContacts();
298  AGXPHYSICS_EXPORT agx::AtomicValue const& numGeometryContacts() const;
299 
304 
309 
314 
319 
323  AGXPHYSICS_EXPORT agx::UInt8 const& type() const;
324 
328  AGXPHYSICS_EXPORT agx::Vec3i const& id() const;
329 
331  AGXPHYSICS_EXPORT agx::Job*& job();
333  AGXPHYSICS_EXPORT agx::Job* const& job() const;
334 
336  AGXPHYSICS_EXPORT agx::Vec4f& color();
338  AGXPHYSICS_EXPORT agx::Vec4f const& color() const;
339 
340  };
341 
342 
344  class AGXPHYSICS_EXPORT ContactZoneInstance : public agxData::EntityInstance
345  {
346  public:
347  ContactZoneInstance();
348  ContactZoneInstance(ContactZoneData* data, agx::Index index);
349  ContactZoneInstance(agxData::EntityStorage *storage, agx::Index index);
350  ContactZoneInstance(const agxData::EntityInstance& other);
351  ContactZoneInstance(const agxData::EntityPtr& ptr);
352 
353  ContactZoneData* getData();
354  const ContactZoneData* getData() const;
355 
356  public:
358  agxData::Array< agx::UInt32 >& particleParticleContacts();
360  agxData::Array< agx::UInt32 > const& particleParticleContacts() const;
361 
363  agxData::Array< agx::UInt32 >& particleGeometryContacts();
365  agxData::Array< agx::UInt32 > const& particleGeometryContacts() const;
366 
368  agxData::Array< agx::UInt32 >& geometryGeometryContacts();
370  agxData::Array< agx::UInt32 > const& geometryGeometryContacts() const;
371 
373  agx::UInt32& totNumContacts();
375  agx::UInt32 const& totNumContacts() const;
376 
378  agx::AtomicValue& numParticleParticleContacts();
380  agx::AtomicValue const& numParticleParticleContacts() const;
381 
383  agx::AtomicValue& numParticleGeometryContacts();
385  agx::AtomicValue const& numParticleGeometryContacts() const;
386 
388  agx::AtomicValue& numGeometryContacts();
390  agx::AtomicValue const& numGeometryContacts() const;
391 
395  agxData::Array< agx::Physics::SolveGroupPtr > const& solveGroups() const;
396 
400  agx::Physics::HierarchicalGrid::CellPtr const& spatialCell() const;
401 
406 
410  agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& interTierDependencyList() const;
411 
413  agx::UInt8& type();
415  agx::UInt8 const& type() const;
416 
418  agx::Vec3i& id();
420  agx::Vec3i const& id() const;
421 
423  agx::Job*& job();
425  agx::Job* const& job() const;
426 
428  agx::Vec4f& color();
430  agx::Vec4f const& color() const;
431 
432  };
434 
435 
436 
439 
440 
441 
443  /* Implementation */
444  //-----------------------------------------------------------------------------------------------------
445  //-----------------------------------------------------------------------------------------------------
446  inline ContactZoneInstance agx::Physics::HierarchicalGrid::ContactZoneData::operator[] (size_t index) { return ContactZoneInstance(this, (agx::Index)index); }
447  //-----------------------------------------------------------------------------------------------------
451  {
453  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
455  }
456 
458  {
459  agxAssertN(!instance || instance.isInstanceOf(ContactZoneModel::instance()),
460  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
462  }
463 
465  {
468  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
470  return *this;
471  }
472 
474  {
476  agxAssertN(!instance || instance.isInstanceOf(ContactZoneModel::instance()),
477  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
479  return *this;
480  }
481 
482  inline ContactZoneInstance ContactZonePtr::instance() { return agxData::EntityPtr::instance(); }
483  inline const ContactZoneInstance ContactZonePtr::instance() const { return agxData::EntityPtr::instance(); }
484  AGX_FORCE_INLINE ContactZoneSemantics* ContactZonePtr::operator->() { return (ContactZoneSemantics* )this; }
485  AGX_FORCE_INLINE const ContactZoneSemantics* ContactZonePtr::operator->() const { return (const ContactZoneSemantics* )this; }
486  AGX_FORCE_INLINE ContactZoneData* ContactZonePtr::getData() { return static_cast<ContactZoneData* >(agxData::EntityPtr::getData()); }
487  AGX_FORCE_INLINE const ContactZoneData* ContactZonePtr::getData() const { return static_cast<const ContactZoneData* >(agxData::EntityPtr::getData()); }
488 
489  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZonePtr::particleParticleContacts() { verifyIndex(); return getData()->particleParticleContacts[calculateIndex()]; }
490  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZonePtr::particleParticleContacts() const { verifyIndex(); return getData()->particleParticleContacts[calculateIndex()]; }
491 
492  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZonePtr::particleGeometryContacts() { verifyIndex(); return getData()->particleGeometryContacts[calculateIndex()]; }
493  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZonePtr::particleGeometryContacts() const { verifyIndex(); return getData()->particleGeometryContacts[calculateIndex()]; }
494 
495  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZonePtr::geometryGeometryContacts() { verifyIndex(); return getData()->geometryGeometryContacts[calculateIndex()]; }
496  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZonePtr::geometryGeometryContacts() const { verifyIndex(); return getData()->geometryGeometryContacts[calculateIndex()]; }
497 
498  AGX_FORCE_INLINE agx::UInt32& ContactZonePtr::totNumContacts() { verifyIndex(); return getData()->totNumContacts[calculateIndex()]; }
499  AGX_FORCE_INLINE agx::UInt32 const& ContactZonePtr::totNumContacts() const { verifyIndex(); return getData()->totNumContacts[calculateIndex()]; }
500 
501  AGX_FORCE_INLINE agx::AtomicValue& ContactZonePtr::numParticleParticleContacts() { verifyIndex(); return getData()->numParticleParticleContacts[calculateIndex()]; }
502  AGX_FORCE_INLINE agx::AtomicValue const& ContactZonePtr::numParticleParticleContacts() const { verifyIndex(); return getData()->numParticleParticleContacts[calculateIndex()]; }
503 
504  AGX_FORCE_INLINE agx::AtomicValue& ContactZonePtr::numParticleGeometryContacts() { verifyIndex(); return getData()->numParticleGeometryContacts[calculateIndex()]; }
505  AGX_FORCE_INLINE agx::AtomicValue const& ContactZonePtr::numParticleGeometryContacts() const { verifyIndex(); return getData()->numParticleGeometryContacts[calculateIndex()]; }
506 
507  AGX_FORCE_INLINE agx::AtomicValue& ContactZonePtr::numGeometryContacts() { verifyIndex(); return getData()->numGeometryContacts[calculateIndex()]; }
508  AGX_FORCE_INLINE agx::AtomicValue const& ContactZonePtr::numGeometryContacts() const { verifyIndex(); return getData()->numGeometryContacts[calculateIndex()]; }
509 
510  AGX_FORCE_INLINE agxData::Array< agx::Physics::SolveGroupPtr >& ContactZonePtr::solveGroups() { verifyIndex(); return getData()->solveGroups[calculateIndex()]; }
511  AGX_FORCE_INLINE agxData::Array< agx::Physics::SolveGroupPtr > const& ContactZonePtr::solveGroups() const { verifyIndex(); return getData()->solveGroups[calculateIndex()]; }
512 
513  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::CellPtr& ContactZonePtr::spatialCell() { verifyIndex(); return getData()->spatialCell[calculateIndex()]; }
514  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::CellPtr const& ContactZonePtr::spatialCell() const { verifyIndex(); return getData()->spatialCell[calculateIndex()]; }
515 
516  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::GridTierPtr& ContactZonePtr::tier() { verifyIndex(); return getData()->tier[calculateIndex()]; }
517  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::GridTierPtr const& ContactZonePtr::tier() const { verifyIndex(); return getData()->tier[calculateIndex()]; }
518 
519  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr& ContactZonePtr::interTierDependencyList() { verifyIndex(); return getData()->interTierDependencyList[calculateIndex()]; }
520  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& ContactZonePtr::interTierDependencyList() const { verifyIndex(); return getData()->interTierDependencyList[calculateIndex()]; }
521 
522  AGX_FORCE_INLINE agx::UInt8& ContactZonePtr::type() { verifyIndex(); return getData()->type[calculateIndex()]; }
523  AGX_FORCE_INLINE agx::UInt8 const& ContactZonePtr::type() const { verifyIndex(); return getData()->type[calculateIndex()]; }
524 
525  AGX_FORCE_INLINE agx::Vec3i& ContactZonePtr::id() { verifyIndex(); return getData()->id[calculateIndex()]; }
526  AGX_FORCE_INLINE agx::Vec3i const& ContactZonePtr::id() const { verifyIndex(); return getData()->id[calculateIndex()]; }
527 
528  AGX_FORCE_INLINE agx::Job*& ContactZonePtr::job() { verifyIndex(); return getData()->job[calculateIndex()]; }
529  AGX_FORCE_INLINE agx::Job* const& ContactZonePtr::job() const { verifyIndex(); return getData()->job[calculateIndex()]; }
530 
531  AGX_FORCE_INLINE agx::Vec4f& ContactZonePtr::color() { verifyIndex(); return getData()->color[calculateIndex()]; }
532  AGX_FORCE_INLINE agx::Vec4f const& ContactZonePtr::color() const { verifyIndex(); return getData()->color[calculateIndex()]; }
533 
534  //-----------------------------------------------------------------------------------------------------
535  AGX_FORCE_INLINE ContactZoneInstance::ContactZoneInstance() {}
536  AGX_FORCE_INLINE ContactZoneInstance::ContactZoneInstance(ContactZoneData* data, agx::Index index) : agxData::EntityInstance(data, index) {}
537  AGX_FORCE_INLINE ContactZoneInstance::ContactZoneInstance(agxData::EntityStorage* storage, agx::Index index) : agxData::EntityInstance(storage, index) {}
538  AGX_FORCE_INLINE ContactZoneInstance::ContactZoneInstance(const agxData::EntityInstance& other) : agxData::EntityInstance(other)
539  {
541  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
543  }
544 
545  AGX_FORCE_INLINE ContactZoneInstance::ContactZoneInstance(const agxData::EntityPtr& ptr) : agxData::EntityInstance(ptr)
546  {
548  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
550  }
551 
552 
553  AGX_FORCE_INLINE ContactZoneData* ContactZoneInstance::getData() { return static_cast<ContactZoneData* >(agxData::EntityInstance::getData()); }
554  AGX_FORCE_INLINE const ContactZoneData* ContactZoneInstance::getData() const { return static_cast<const ContactZoneData* >(agxData::EntityInstance::getData()); }
555 
556  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZoneInstance::particleParticleContacts() { verifyIndex(); return getData()->particleParticleContacts[getIndex()]; }
557  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZoneInstance::particleParticleContacts() const { verifyIndex(); return getData()->particleParticleContacts[getIndex()]; }
558 
559  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZoneInstance::particleGeometryContacts() { verifyIndex(); return getData()->particleGeometryContacts[getIndex()]; }
560  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZoneInstance::particleGeometryContacts() const { verifyIndex(); return getData()->particleGeometryContacts[getIndex()]; }
561 
562  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZoneInstance::geometryGeometryContacts() { verifyIndex(); return getData()->geometryGeometryContacts[getIndex()]; }
563  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZoneInstance::geometryGeometryContacts() const { verifyIndex(); return getData()->geometryGeometryContacts[getIndex()]; }
564 
565  AGX_FORCE_INLINE agx::UInt32& ContactZoneInstance::totNumContacts() { verifyIndex(); return getData()->totNumContacts[getIndex()]; }
566  AGX_FORCE_INLINE agx::UInt32 const& ContactZoneInstance::totNumContacts() const { verifyIndex(); return getData()->totNumContacts[getIndex()]; }
567 
568  AGX_FORCE_INLINE agx::AtomicValue& ContactZoneInstance::numParticleParticleContacts() { verifyIndex(); return getData()->numParticleParticleContacts[getIndex()]; }
569  AGX_FORCE_INLINE agx::AtomicValue const& ContactZoneInstance::numParticleParticleContacts() const { verifyIndex(); return getData()->numParticleParticleContacts[getIndex()]; }
570 
571  AGX_FORCE_INLINE agx::AtomicValue& ContactZoneInstance::numParticleGeometryContacts() { verifyIndex(); return getData()->numParticleGeometryContacts[getIndex()]; }
572  AGX_FORCE_INLINE agx::AtomicValue const& ContactZoneInstance::numParticleGeometryContacts() const { verifyIndex(); return getData()->numParticleGeometryContacts[getIndex()]; }
573 
574  AGX_FORCE_INLINE agx::AtomicValue& ContactZoneInstance::numGeometryContacts() { verifyIndex(); return getData()->numGeometryContacts[getIndex()]; }
575  AGX_FORCE_INLINE agx::AtomicValue const& ContactZoneInstance::numGeometryContacts() const { verifyIndex(); return getData()->numGeometryContacts[getIndex()]; }
576 
577  AGX_FORCE_INLINE agxData::Array< agx::Physics::SolveGroupPtr >& ContactZoneInstance::solveGroups() { verifyIndex(); return getData()->solveGroups[getIndex()]; }
578  AGX_FORCE_INLINE agxData::Array< agx::Physics::SolveGroupPtr > const& ContactZoneInstance::solveGroups() const { verifyIndex(); return getData()->solveGroups[getIndex()]; }
579 
580  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::CellPtr& ContactZoneInstance::spatialCell() { verifyIndex(); return getData()->spatialCell[getIndex()]; }
581  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::CellPtr const& ContactZoneInstance::spatialCell() const { verifyIndex(); return getData()->spatialCell[getIndex()]; }
582 
583  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::GridTierPtr& ContactZoneInstance::tier() { verifyIndex(); return getData()->tier[getIndex()]; }
584  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::GridTierPtr const& ContactZoneInstance::tier() const { verifyIndex(); return getData()->tier[getIndex()]; }
585 
586  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr& ContactZoneInstance::interTierDependencyList() { verifyIndex(); return getData()->interTierDependencyList[getIndex()]; }
587  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& ContactZoneInstance::interTierDependencyList() const { verifyIndex(); return getData()->interTierDependencyList[getIndex()]; }
588 
589  AGX_FORCE_INLINE agx::UInt8& ContactZoneInstance::type() { verifyIndex(); return getData()->type[getIndex()]; }
590  AGX_FORCE_INLINE agx::UInt8 const& ContactZoneInstance::type() const { verifyIndex(); return getData()->type[getIndex()]; }
591 
592  AGX_FORCE_INLINE agx::Vec3i& ContactZoneInstance::id() { verifyIndex(); return getData()->id[getIndex()]; }
593  AGX_FORCE_INLINE agx::Vec3i const& ContactZoneInstance::id() const { verifyIndex(); return getData()->id[getIndex()]; }
594 
595  AGX_FORCE_INLINE agx::Job*& ContactZoneInstance::job() { verifyIndex(); return getData()->job[getIndex()]; }
596  AGX_FORCE_INLINE agx::Job* const& ContactZoneInstance::job() const { verifyIndex(); return getData()->job[getIndex()]; }
597 
598  AGX_FORCE_INLINE agx::Vec4f& ContactZoneInstance::color() { verifyIndex(); return getData()->color[getIndex()]; }
599  AGX_FORCE_INLINE agx::Vec4f const& ContactZoneInstance::color() const { verifyIndex(); return getData()->color[getIndex()]; }
600 
601  //-----------------------------------------------------------------------------------------------------
602  AGX_FORCE_INLINE ContactZoneSemantics::ContactZoneSemantics() {}
603  //-----------------------------------------------------------------------------------------------------
605  }
606  }
607 }
608 
609 AGX_TYPE_BINDING(agx::Physics::HierarchicalGrid::ContactZonePtr, "Physics.HierarchicalGrid.ContactZonePtr")
610 AGX_TYPE_BINDING(agx::Physics::HierarchicalGrid::ContactZoneInstance, "Physics.HierarchicalGrid.ContactZoneInstance")
611 
612 #ifdef _MSC_VER
613 # pragma warning(pop)
614 #endif
615 
616 #undef AGX_ENTITY_WRAPPER
617 #undef AGX_ENTITY_NAMESPACE
618 #endif
619 
AGXPHYSICS_EXPORT agx::UInt32 & totNumContacts()
Pointer to a entity instance of type Physics.HierarchicalGrid.ContactZone.
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::CellPtr & spatialCell()
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr > * interTierDependencyListAttribute
Pointer to a entity instance of type Physics.HierarchicalGrid.ContactZoneDependency.
AGXPHYSICS_EXPORT ContactZoneInstance instance()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & particleGeometryContacts()
AGXCORE_EXPORT Type * getType(const agx::String &name)
static agxData::ScalarAttributeT< agx::UInt8 > * typeAttribute
agxData::EntityData * getData()
Abstract description of the data attributes for the Physics.HierarchicalGrid.ContactZone entity...
agxData::EntityInstance instance()
Definition: EntityPtr.h:269
static agxData::PointerAttributeT< agx::Job * > * jobAttribute
Data storage for a collection of entity instances of a specified EntityModel.
Definition: EntityStorage.h:72
static agxData::ScalarAttributeT< agx::AtomicValue > * numParticleGeometryContactsAttribute
An abstract job/workblock representation, which allows work threads to execute arbitrary tasks...
Definition: Job.h:62
static agxData::ScalarAttributeT< agx::Vec3i > * idAttribute
#define agxAssertN(expr, format,...)
Definition: debug.h:145
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition: Vec4Template.h:34
agxData::EntityData * getData()
agx::String fullPath() const
#define AGX_TYPE_BINDING(_Type, _Name)
Definition: Type.h:179
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
Definition: Object.h:363
AGXPHYSICS_EXPORT ContactZonePtr & operator=(const agxData::EntityPtr &ptr)
uint8_t UInt8
Definition: Integer.h:38
#define AGXPHYSICS_EXPORT
static agxData::ArrayAttributeT< agx::UInt32 > * particleGeometryContactsAttribute
AGXPHYSICS_EXPORT agx::AtomicValue & numParticleGeometryContacts()
Entity instance provides access to a single instance in an EntityStorage.
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
Definition: EntityPtr.h:51
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
bool isInstanceOf(agxData::EntityModel *model) const
static agxData::ScalarAttributeT< agx::AtomicValue > * numGeometryContactsAttribute
#define AGX_FORCE_INLINE
Definition: Object.h:59
static agxData::ArrayAttributeT< agx::UInt32 > * particleParticleContactsAttribute
Type-specific Array used for fast access into the data held by a Buffer.
Definition: agxData.h:30
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::CellPtr > * spatialCellAttribute
AGXPHYSICS_EXPORT agxData::Array< agx::Physics::SolveGroupPtr > & solveGroups()
Vector containing &#39;raw&#39; data.
Definition: Vector.h:245
EntityPtr & operator=(const EntityPtr &other)=default
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXPHYSICS_EXPORT agx::Vec4f & color()
AGXPHYSICS_EXPORT agx::Vec3i & id()
Contains classes for low level data storage for AGX.
Definition: Container.h:23
UInt32 Index
Definition: Integer.h:52
AGXPHYSICS_EXPORT agx::AtomicValue & numParticleParticleContacts()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & particleParticleContacts()
AGXPHYSICS_EXPORT agx::UInt8 & type()
static agxData::ScalarAttributeT< agx::UInt32 > * totNumContactsAttribute
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
Definition: EntityModel.h:63
#define CALLABLE
Definition: Object.h:73
AGXPHYSICS_EXPORT ContactZoneSemantics * operator->()
AGXPHYSICS_EXPORT agx::AtomicValue & numGeometryContacts()
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::GridTierPtr & tier()
bool isInstanceOf(agxData::EntityModel *model) const
AGXPHYSICS_EXPORT agx::Job *& job()
static agxData::ArrayAttributeT< agx::Physics::SolveGroupPtr > * solveGroupsAttribute
Pointer to a entity instance of type Physics.HierarchicalGrid.Cell.
Definition: CellEntity.h:249
static agxData::ScalarAttributeT< agx::Vec4f > * colorAttribute
static agxData::ArrayAttributeT< agx::UInt32 > * geometryGeometryContactsAttribute
Pointer to a entity instance of type Physics.HierarchicalGrid.GridTier.
uint32_t UInt32
Definition: Integer.h:40
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr & interTierDependencyList()
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::GridTierPtr > * tierAttribute
static agxData::ScalarAttributeT< agx::AtomicValue > * numParticleParticleContactsAttribute
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & geometryGeometryContacts()