AGX Dynamics  2.35.0.1
ContactZoneEntity.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
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 
90 
93 
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;
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:
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 
269 
274 
279 
284 
289 
294 
299 
304 
309 
314 
319 
324 
329 
333  AGXPHYSICS_EXPORT agx::Job* const& job() const;
334 
339 
341  // Only used by tolua!
342  #ifdef AGX_GENERATED_TOLUA_WRAPPER
343  inline agxData::Array< agx::UInt32 > const& getParticleParticleContacts() const { return (*this)->getParticleParticleContacts(); }
344  inline agxData::Array< agx::UInt32 > const& getParticleGeometryContacts() const { return (*this)->getParticleGeometryContacts(); }
345  inline agxData::Array< agx::UInt32 > const& getGeometryGeometryContacts() const { return (*this)->getGeometryGeometryContacts(); }
346  inline agx::UInt32 const& getTotNumContacts() const { return (*this)->getTotNumContacts(); }
347  inline agx::AtomicValue const& getNumParticleParticleContacts() const { return (*this)->getNumParticleParticleContacts(); }
348  inline agx::AtomicValue const& getNumParticleGeometryContacts() const { return (*this)->getNumParticleGeometryContacts(); }
349  inline agx::AtomicValue const& getNumGeometryContacts() const { return (*this)->getNumGeometryContacts(); }
350  inline agxData::Array< agx::Physics::SolveGroupPtr > const& getSolveGroups() const { return (*this)->getSolveGroups(); }
351  inline agx::Physics::HierarchicalGrid::CellPtr const& getSpatialCell() const { return (*this)->getSpatialCell(); }
352  inline agx::Physics::HierarchicalGrid::GridTierPtr const& getTier() const { return (*this)->getTier(); }
353  inline agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& getInterTierDependencyList() const { return (*this)->getInterTierDependencyList(); }
354  inline agx::UInt8 const& getType() const { return (*this)->getType(); }
355  inline agx::Vec3i const& getId() const { return (*this)->getId(); }
356  inline agx::Job* const& getJob() const { return (*this)->getJob(); }
357  inline agx::Vec4f const& getColor() const { return (*this)->getColor(); }
358 
359 
360  inline void setParticleParticleContacts(agxData::Array< agx::UInt32 > const& value) { (*this)->setParticleParticleContacts(value); }
361  inline void setParticleGeometryContacts(agxData::Array< agx::UInt32 > const& value) { (*this)->setParticleGeometryContacts(value); }
362  inline void setGeometryGeometryContacts(agxData::Array< agx::UInt32 > const& value) { (*this)->setGeometryGeometryContacts(value); }
363  inline void setTotNumContacts(agx::UInt32 const& value) { (*this)->setTotNumContacts(value); }
364  inline void setNumParticleParticleContacts(agx::AtomicValue const& value) { (*this)->setNumParticleParticleContacts(value); }
365  inline void setNumParticleGeometryContacts(agx::AtomicValue const& value) { (*this)->setNumParticleGeometryContacts(value); }
366  inline void setNumGeometryContacts(agx::AtomicValue const& value) { (*this)->setNumGeometryContacts(value); }
367  inline void setSolveGroups(agxData::Array< agx::Physics::SolveGroupPtr > const& value) { (*this)->setSolveGroups(value); }
368  inline void setSpatialCell(agx::Physics::HierarchicalGrid::CellPtr const& value) { (*this)->setSpatialCell(value); }
369  inline void setTier(agx::Physics::HierarchicalGrid::GridTierPtr const& value) { (*this)->setTier(value); }
370  inline void setInterTierDependencyList(agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& value) { (*this)->setInterTierDependencyList(value); }
371  inline void setType(agx::UInt8 const& value) { (*this)->setType(value); }
372  inline void setId(agx::Vec3i const& value) { (*this)->setId(value); }
373  inline void setJob(agx::Job* const& value) { (*this)->setJob(value); }
374  inline void setColor(agx::Vec4f const& value) { (*this)->setColor(value); }
375  #endif
377 
378  };
379 
380 
382  class AGXPHYSICS_EXPORT ContactZoneInstance : public agxData::EntityInstance
383  {
384  public:
385  ContactZoneInstance();
386  ContactZoneInstance(ContactZoneData* data, agx::Index index);
387  ContactZoneInstance(agxData::EntityStorage *storage, agx::Index index);
388  ContactZoneInstance(const agxData::EntityInstance& other);
389  ContactZoneInstance(const agxData::EntityPtr& ptr);
390 
391  ContactZoneData* getData();
392  const ContactZoneData* getData() const;
393 
394  public:
396  agxData::Array< agx::UInt32 >& particleParticleContacts();
398  agxData::Array< agx::UInt32 > const& particleParticleContacts() const;
399 
401  agxData::Array< agx::UInt32 >& particleGeometryContacts();
403  agxData::Array< agx::UInt32 > const& particleGeometryContacts() const;
404 
406  agxData::Array< agx::UInt32 >& geometryGeometryContacts();
408  agxData::Array< agx::UInt32 > const& geometryGeometryContacts() const;
409 
411  agx::UInt32& totNumContacts();
413  agx::UInt32 const& totNumContacts() const;
414 
416  agx::AtomicValue& numParticleParticleContacts();
418  agx::AtomicValue const& numParticleParticleContacts() const;
419 
421  agx::AtomicValue& numParticleGeometryContacts();
423  agx::AtomicValue const& numParticleGeometryContacts() const;
424 
426  agx::AtomicValue& numGeometryContacts();
428  agx::AtomicValue const& numGeometryContacts() const;
429 
433  agxData::Array< agx::Physics::SolveGroupPtr > const& solveGroups() const;
434 
438  agx::Physics::HierarchicalGrid::CellPtr const& spatialCell() const;
439 
444 
448  agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& interTierDependencyList() const;
449 
451  agx::UInt8& type();
453  agx::UInt8 const& type() const;
454 
456  agx::Vec3i& id();
458  agx::Vec3i const& id() const;
459 
461  agx::Job*& job();
463  agx::Job* const& job() const;
464 
466  agx::Vec4f& color();
468  agx::Vec4f const& color() const;
469 
470  };
472 
473 
474 
477 
478 
479 
481  /* Implementation */
482  //-----------------------------------------------------------------------------------------------------
483  //-----------------------------------------------------------------------------------------------------
484  inline ContactZoneInstance agx::Physics::HierarchicalGrid::ContactZoneData::operator[] (size_t index) { return ContactZoneInstance(this, (agx::Index)index); }
485  //-----------------------------------------------------------------------------------------------------
488  AGX_FORCE_INLINE ContactZonePtr::ContactZonePtr(const agxData::EntityPtr& ptr) : agxData::EntityPtr(ptr)
489  {
491  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
493  }
494 
495  AGX_FORCE_INLINE ContactZonePtr::ContactZonePtr(const agxData::EntityInstance& instance) : agxData::EntityPtr(instance)
496  {
497  agxAssertN(!instance || instance.isInstanceOf(ContactZoneModel::instance()),
498  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
500  }
501 
502  AGX_FORCE_INLINE ContactZonePtr& ContactZonePtr::operator= (const agxData::EntityPtr& ptr)
503  {
505  agxAssertN(!ptr || ptr.isInstanceOf(ContactZoneModel::instance()),
506  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
507  EntityPtr::getModel()->fullPath().c_str(), ContactZoneModel::instance()->fullPath().c_str());
508  return *this;
509  }
510 
511  AGX_FORCE_INLINE ContactZonePtr& ContactZonePtr::operator= (const agxData::EntityInstance& instance)
512  {
514  agxAssertN(!instance || instance.isInstanceOf(ContactZoneModel::instance()),
515  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
516  EntityPtr::getModel()->fullPath().c_str(), ContactZoneModel::instance()->fullPath().c_str());
517  return *this;
518  }
519 
520  inline ContactZoneInstance ContactZonePtr::instance() { return agxData::EntityPtr::instance(); }
521  inline const ContactZoneInstance ContactZonePtr::instance() const { return agxData::EntityPtr::instance(); }
522  AGX_FORCE_INLINE ContactZoneSemantics* ContactZonePtr::operator->() { return (ContactZoneSemantics* )this; }
523  AGX_FORCE_INLINE const ContactZoneSemantics* ContactZonePtr::operator->() const { return (const ContactZoneSemantics* )this; }
524  AGX_FORCE_INLINE ContactZoneData* ContactZonePtr::getData() { return static_cast<ContactZoneData* >(agxData::EntityPtr::getData()); }
525  AGX_FORCE_INLINE const ContactZoneData* ContactZonePtr::getData() const { return static_cast<const ContactZoneData* >(agxData::EntityPtr::getData()); }
526 
527  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZonePtr::particleParticleContacts() { verifyIndex(); return getData()->particleParticleContacts[calculateIndex()]; }
528  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZonePtr::particleParticleContacts() const { verifyIndex(); return getData()->particleParticleContacts[calculateIndex()]; }
529 
530  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZonePtr::particleGeometryContacts() { verifyIndex(); return getData()->particleGeometryContacts[calculateIndex()]; }
531  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZonePtr::particleGeometryContacts() const { verifyIndex(); return getData()->particleGeometryContacts[calculateIndex()]; }
532 
533  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZonePtr::geometryGeometryContacts() { verifyIndex(); return getData()->geometryGeometryContacts[calculateIndex()]; }
534  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZonePtr::geometryGeometryContacts() const { verifyIndex(); return getData()->geometryGeometryContacts[calculateIndex()]; }
535 
536  AGX_FORCE_INLINE agx::UInt32& ContactZonePtr::totNumContacts() { verifyIndex(); return getData()->totNumContacts[calculateIndex()]; }
537  AGX_FORCE_INLINE agx::UInt32 const& ContactZonePtr::totNumContacts() const { verifyIndex(); return getData()->totNumContacts[calculateIndex()]; }
538 
539  AGX_FORCE_INLINE agx::AtomicValue& ContactZonePtr::numParticleParticleContacts() { verifyIndex(); return getData()->numParticleParticleContacts[calculateIndex()]; }
540  AGX_FORCE_INLINE agx::AtomicValue const& ContactZonePtr::numParticleParticleContacts() const { verifyIndex(); return getData()->numParticleParticleContacts[calculateIndex()]; }
541 
542  AGX_FORCE_INLINE agx::AtomicValue& ContactZonePtr::numParticleGeometryContacts() { verifyIndex(); return getData()->numParticleGeometryContacts[calculateIndex()]; }
543  AGX_FORCE_INLINE agx::AtomicValue const& ContactZonePtr::numParticleGeometryContacts() const { verifyIndex(); return getData()->numParticleGeometryContacts[calculateIndex()]; }
544 
545  AGX_FORCE_INLINE agx::AtomicValue& ContactZonePtr::numGeometryContacts() { verifyIndex(); return getData()->numGeometryContacts[calculateIndex()]; }
546  AGX_FORCE_INLINE agx::AtomicValue const& ContactZonePtr::numGeometryContacts() const { verifyIndex(); return getData()->numGeometryContacts[calculateIndex()]; }
547 
548  AGX_FORCE_INLINE agxData::Array< agx::Physics::SolveGroupPtr >& ContactZonePtr::solveGroups() { verifyIndex(); return getData()->solveGroups[calculateIndex()]; }
549  AGX_FORCE_INLINE agxData::Array< agx::Physics::SolveGroupPtr > const& ContactZonePtr::solveGroups() const { verifyIndex(); return getData()->solveGroups[calculateIndex()]; }
550 
551  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::CellPtr& ContactZonePtr::spatialCell() { verifyIndex(); return getData()->spatialCell[calculateIndex()]; }
552  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::CellPtr const& ContactZonePtr::spatialCell() const { verifyIndex(); return getData()->spatialCell[calculateIndex()]; }
553 
554  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::GridTierPtr& ContactZonePtr::tier() { verifyIndex(); return getData()->tier[calculateIndex()]; }
555  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::GridTierPtr const& ContactZonePtr::tier() const { verifyIndex(); return getData()->tier[calculateIndex()]; }
556 
557  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr& ContactZonePtr::interTierDependencyList() { verifyIndex(); return getData()->interTierDependencyList[calculateIndex()]; }
558  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& ContactZonePtr::interTierDependencyList() const { verifyIndex(); return getData()->interTierDependencyList[calculateIndex()]; }
559 
560  AGX_FORCE_INLINE agx::UInt8& ContactZonePtr::type() { verifyIndex(); return getData()->type[calculateIndex()]; }
561  AGX_FORCE_INLINE agx::UInt8 const& ContactZonePtr::type() const { verifyIndex(); return getData()->type[calculateIndex()]; }
562 
563  AGX_FORCE_INLINE agx::Vec3i& ContactZonePtr::id() { verifyIndex(); return getData()->id[calculateIndex()]; }
564  AGX_FORCE_INLINE agx::Vec3i const& ContactZonePtr::id() const { verifyIndex(); return getData()->id[calculateIndex()]; }
565 
566  AGX_FORCE_INLINE agx::Job*& ContactZonePtr::job() { verifyIndex(); return getData()->job[calculateIndex()]; }
567  AGX_FORCE_INLINE agx::Job* const& ContactZonePtr::job() const { verifyIndex(); return getData()->job[calculateIndex()]; }
568 
569  AGX_FORCE_INLINE agx::Vec4f& ContactZonePtr::color() { verifyIndex(); return getData()->color[calculateIndex()]; }
570  AGX_FORCE_INLINE agx::Vec4f const& ContactZonePtr::color() const { verifyIndex(); return getData()->color[calculateIndex()]; }
571 
572  //-----------------------------------------------------------------------------------------------------
573  AGX_FORCE_INLINE ContactZoneInstance::ContactZoneInstance() {}
574  AGX_FORCE_INLINE ContactZoneInstance::ContactZoneInstance(ContactZoneData* data, agx::Index index) : agxData::EntityInstance(data, index) {}
575  AGX_FORCE_INLINE ContactZoneInstance::ContactZoneInstance(agxData::EntityStorage* storage, agx::Index index) : agxData::EntityInstance(storage, index) {}
576  AGX_FORCE_INLINE ContactZoneInstance::ContactZoneInstance(const agxData::EntityInstance& other) : agxData::EntityInstance(other)
577  {
579  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
581  }
582 
583  AGX_FORCE_INLINE ContactZoneInstance::ContactZoneInstance(const agxData::EntityPtr& ptr) : agxData::EntityInstance(ptr)
584  {
586  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
588  }
589 
590 
591  AGX_FORCE_INLINE ContactZoneData* ContactZoneInstance::getData() { return static_cast<ContactZoneData* >(agxData::EntityInstance::getData()); }
592  AGX_FORCE_INLINE const ContactZoneData* ContactZoneInstance::getData() const { return static_cast<const ContactZoneData* >(agxData::EntityInstance::getData()); }
593 
594  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZoneInstance::particleParticleContacts() { verifyIndex(); return getData()->particleParticleContacts[getIndex()]; }
595  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZoneInstance::particleParticleContacts() const { verifyIndex(); return getData()->particleParticleContacts[getIndex()]; }
596 
597  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZoneInstance::particleGeometryContacts() { verifyIndex(); return getData()->particleGeometryContacts[getIndex()]; }
598  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZoneInstance::particleGeometryContacts() const { verifyIndex(); return getData()->particleGeometryContacts[getIndex()]; }
599 
600  AGX_FORCE_INLINE agxData::Array< agx::UInt32 >& ContactZoneInstance::geometryGeometryContacts() { verifyIndex(); return getData()->geometryGeometryContacts[getIndex()]; }
601  AGX_FORCE_INLINE agxData::Array< agx::UInt32 > const& ContactZoneInstance::geometryGeometryContacts() const { verifyIndex(); return getData()->geometryGeometryContacts[getIndex()]; }
602 
603  AGX_FORCE_INLINE agx::UInt32& ContactZoneInstance::totNumContacts() { verifyIndex(); return getData()->totNumContacts[getIndex()]; }
604  AGX_FORCE_INLINE agx::UInt32 const& ContactZoneInstance::totNumContacts() const { verifyIndex(); return getData()->totNumContacts[getIndex()]; }
605 
606  AGX_FORCE_INLINE agx::AtomicValue& ContactZoneInstance::numParticleParticleContacts() { verifyIndex(); return getData()->numParticleParticleContacts[getIndex()]; }
607  AGX_FORCE_INLINE agx::AtomicValue const& ContactZoneInstance::numParticleParticleContacts() const { verifyIndex(); return getData()->numParticleParticleContacts[getIndex()]; }
608 
609  AGX_FORCE_INLINE agx::AtomicValue& ContactZoneInstance::numParticleGeometryContacts() { verifyIndex(); return getData()->numParticleGeometryContacts[getIndex()]; }
610  AGX_FORCE_INLINE agx::AtomicValue const& ContactZoneInstance::numParticleGeometryContacts() const { verifyIndex(); return getData()->numParticleGeometryContacts[getIndex()]; }
611 
612  AGX_FORCE_INLINE agx::AtomicValue& ContactZoneInstance::numGeometryContacts() { verifyIndex(); return getData()->numGeometryContacts[getIndex()]; }
613  AGX_FORCE_INLINE agx::AtomicValue const& ContactZoneInstance::numGeometryContacts() const { verifyIndex(); return getData()->numGeometryContacts[getIndex()]; }
614 
615  AGX_FORCE_INLINE agxData::Array< agx::Physics::SolveGroupPtr >& ContactZoneInstance::solveGroups() { verifyIndex(); return getData()->solveGroups[getIndex()]; }
616  AGX_FORCE_INLINE agxData::Array< agx::Physics::SolveGroupPtr > const& ContactZoneInstance::solveGroups() const { verifyIndex(); return getData()->solveGroups[getIndex()]; }
617 
618  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::CellPtr& ContactZoneInstance::spatialCell() { verifyIndex(); return getData()->spatialCell[getIndex()]; }
619  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::CellPtr const& ContactZoneInstance::spatialCell() const { verifyIndex(); return getData()->spatialCell[getIndex()]; }
620 
621  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::GridTierPtr& ContactZoneInstance::tier() { verifyIndex(); return getData()->tier[getIndex()]; }
622  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::GridTierPtr const& ContactZoneInstance::tier() const { verifyIndex(); return getData()->tier[getIndex()]; }
623 
624  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr& ContactZoneInstance::interTierDependencyList() { verifyIndex(); return getData()->interTierDependencyList[getIndex()]; }
625  AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& ContactZoneInstance::interTierDependencyList() const { verifyIndex(); return getData()->interTierDependencyList[getIndex()]; }
626 
627  AGX_FORCE_INLINE agx::UInt8& ContactZoneInstance::type() { verifyIndex(); return getData()->type[getIndex()]; }
628  AGX_FORCE_INLINE agx::UInt8 const& ContactZoneInstance::type() const { verifyIndex(); return getData()->type[getIndex()]; }
629 
630  AGX_FORCE_INLINE agx::Vec3i& ContactZoneInstance::id() { verifyIndex(); return getData()->id[getIndex()]; }
631  AGX_FORCE_INLINE agx::Vec3i const& ContactZoneInstance::id() const { verifyIndex(); return getData()->id[getIndex()]; }
632 
633  AGX_FORCE_INLINE agx::Job*& ContactZoneInstance::job() { verifyIndex(); return getData()->job[getIndex()]; }
634  AGX_FORCE_INLINE agx::Job* const& ContactZoneInstance::job() const { verifyIndex(); return getData()->job[getIndex()]; }
635 
636  AGX_FORCE_INLINE agx::Vec4f& ContactZoneInstance::color() { verifyIndex(); return getData()->color[getIndex()]; }
637  AGX_FORCE_INLINE agx::Vec4f const& ContactZoneInstance::color() const { verifyIndex(); return getData()->color[getIndex()]; }
638 
639  //-----------------------------------------------------------------------------------------------------
640  AGX_FORCE_INLINE ContactZoneSemantics::ContactZoneSemantics() {}
641  //-----------------------------------------------------------------------------------------------------
643  }
644  }
645 }
646 
647 AGX_TYPE_BINDING(agx::Physics::HierarchicalGrid::ContactZonePtr, "Physics.HierarchicalGrid.ContactZonePtr")
648 AGX_TYPE_BINDING(agx::Physics::HierarchicalGrid::ContactZoneInstance, "Physics.HierarchicalGrid.ContactZoneInstance")
649 
650 #ifdef _MSC_VER
651 # pragma warning(pop)
652 #endif
653 
654 #undef AGX_ENTITY_WRAPPER
655 #undef AGX_ENTITY_NAMESPACE
656 #endif
657 
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGX_TYPE_BINDING(_Type, _Name)
Definition: Type.h:179
#define AGXPHYSICS_EXPORT
Type-specific Array used for fast access into the data held by a Buffer.
Definition: Array.h:107
Entity instance provides access to a single instance in an EntityStorage.
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
Definition: EntityModel.h:64
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
Definition: EntityPtr.h:52
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
Definition: EntityPtr.h:269
EntityPtr & operator=(const EntityPtr &other)=default
Data storage for a collection of entity instances of a specified EntityModel.
Definition: EntityStorage.h:73
An abstract job/workblock representation, which allows work threads to execute arbitrary tasks.
Definition: Job.h:63
agx::String fullPath() const
Pointer to a entity instance of type Physics.HierarchicalGrid.Cell.
Definition: CellEntity.h:250
Pointer to a entity instance of type Physics.HierarchicalGrid.ContactZoneDependency.
Abstract description of the data attributes for the Physics.HierarchicalGrid.ContactZone entity.
static agxData::ScalarAttributeT< agx::AtomicValue > * numGeometryContactsAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * totNumContactsAttribute
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::CellPtr > * spatialCellAttribute
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr > * interTierDependencyListAttribute
static agxData::ScalarAttributeT< agx::Vec4f > * colorAttribute
virtual void configure(agx::TiXmlElement *eEntity) override
void construct(agx::Physics::HierarchicalGrid::ContactZonePtr contactZone)
static agxData::ScalarAttributeT< agx::UInt8 > * typeAttribute
static agxData::ArrayAttributeT< agx::UInt32 > * particleGeometryContactsAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static agxData::ArrayAttributeT< agx::Physics::SolveGroupPtr > * solveGroupsAttribute
static agxData::ArrayAttributeT< agx::UInt32 > * particleParticleContactsAttribute
static agxData::ArrayAttributeT< agx::UInt32 > * geometryGeometryContactsAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Vec3i > * idAttribute
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::GridTierPtr > * tierAttribute
static agxData::PointerAttributeT< agx::Job * > * jobAttribute
virtual void construct(agxData::EntityPtr instance) override
ContactZoneModel(const agx::String &name="ContactZone")
static agxData::ScalarAttributeT< agx::AtomicValue > * numParticleParticleContactsAttribute
static ContactZonePtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::EntityStorage * defaultStorage()
static agxData::ScalarAttributeT< agx::AtomicValue > * numParticleGeometryContactsAttribute
Pointer to a entity instance of type Physics.HierarchicalGrid.ContactZone.
AGXPHYSICS_EXPORT agx::UInt32 & totNumContacts()
AGXPHYSICS_EXPORT ContactZoneInstance instance()
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr & interTierDependencyList()
AGXPHYSICS_EXPORT agx::Vec3i & id()
AGXPHYSICS_EXPORT agx::UInt32 const & totNumContacts() const
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::GridTierPtr & tier()
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::CellPtr & spatialCell()
AGXPHYSICS_EXPORT ContactZonePtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::AtomicValue const & numGeometryContacts() const
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::GridTierPtr const & tier() const
AGXPHYSICS_EXPORT agx::AtomicValue const & numParticleParticleContacts() const
AGXPHYSICS_EXPORT agx::UInt8 const & type() const
AGXPHYSICS_EXPORT agx::AtomicValue const & numParticleGeometryContacts() const
AGXPHYSICS_EXPORT ContactZonePtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::Vec3i const & id() const
AGXPHYSICS_EXPORT agx::Vec4f const & color() const
AGXPHYSICS_EXPORT agx::AtomicValue & numParticleGeometryContacts()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & particleGeometryContacts()
AGXPHYSICS_EXPORT const ContactZoneInstance instance() const
AGXPHYSICS_EXPORT agx::Job *& job()
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const & interTierDependencyList() const
AGXPHYSICS_EXPORT agx::AtomicValue & numGeometryContacts()
const ContactZoneData * getData() const
AGXPHYSICS_EXPORT agx::UInt8 & type()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & particleParticleContacts()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const & particleGeometryContacts() const
AGXPHYSICS_EXPORT agx::Vec4f & color()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & geometryGeometryContacts()
AGXPHYSICS_EXPORT agx::AtomicValue & numParticleParticleContacts()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const & geometryGeometryContacts() const
AGXPHYSICS_EXPORT agxData::Array< agx::Physics::SolveGroupPtr > const & solveGroups() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const & particleParticleContacts() const
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::CellPtr const & spatialCell() const
AGXPHYSICS_EXPORT ContactZonePtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Job *const & job() const
AGXPHYSICS_EXPORT ContactZoneSemantics * operator->()
AGXPHYSICS_EXPORT agxData::Array< agx::Physics::SolveGroupPtr > & solveGroups()
AGXPHYSICS_EXPORT const ContactZoneSemantics * operator->() const
Pointer to a entity instance of type Physics.HierarchicalGrid.GridTier.
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition: Vec4Template.h:35
Vector containing 'raw' data.
Definition: agx/Vector.h:246
#define agxAssertN(expr, format,...)
Definition: debug.h:145
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define CALLABLE
Definition: macros.h:72
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
#define AGX_FORCE_INLINE
Definition: macros.h:58
Contains classes for low level data storage for AGX.
Definition: Container.h:23
AGXCORE_EXPORT Type * getType(const agx::String &name)
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint32_t UInt32
Definition: Integer.h:40
uint8_t UInt8
Definition: Integer.h:38
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
Definition: Object.h:364
UInt32 Index
Definition: Integer.h:52