AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
ContactZoneEntity.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or
9having been advised so by Algoryx Simulation AB for a time limited evaluation,
10or having purchased a valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx 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>
41#include <agxData/EntityRef.h>
42#include <agxData/EntityPtr.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>
55namespace agx { class Job; }
56
57namespace agx { namespace Physics { namespace HierarchicalGrid { class CellPtr; }}}
58namespace agx { namespace Physics { namespace HierarchicalGrid { class GridTierPtr; }}}
59namespace agx { namespace Physics { namespace HierarchicalGrid { class ContactZoneDependencyPtr; }}}
60namespace agx { namespace Physics { class SolveGroupPtr; }}
61
62namespace 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:
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
334
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 //-----------------------------------------------------------------------------------------------------
450 AGX_FORCE_INLINE ContactZonePtr::ContactZonePtr(const agxData::EntityPtr& ptr) : agxData::EntityPtr(ptr)
451 {
453 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
454 EntityPtr::getModel()->fullPath().c_str(), ContactZoneModel::instance()->fullPath().c_str());
455 }
456
457 AGX_FORCE_INLINE ContactZonePtr::ContactZonePtr(const agxData::EntityInstance& instance) : agxData::EntityPtr(instance)
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\'",
461 EntityPtr::getModel()->fullPath().c_str(), ContactZoneModel::instance()->fullPath().c_str());
462 }
463
464 AGX_FORCE_INLINE ContactZonePtr& ContactZonePtr::operator= (const agxData::EntityPtr& ptr)
465 {
467 agxAssertN(!ptr || ptr.isInstanceOf(ContactZoneModel::instance()),
468 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
469 EntityPtr::getModel()->fullPath().c_str(), ContactZoneModel::instance()->fullPath().c_str());
470 return *this;
471 }
472
473 AGX_FORCE_INLINE ContactZonePtr& ContactZonePtr::operator= (const agxData::EntityInstance& instance)
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\'",
478 EntityPtr::getModel()->fullPath().c_str(), ContactZoneModel::instance()->fullPath().c_str());
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\'",
542 EntityInstance::getModel()->fullPath().c_str(), ContactZoneModel::instance()->fullPath().c_str());
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\'",
549 EntityInstance::getModel()->fullPath().c_str(), ContactZoneModel::instance()->fullPath().c_str());
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
609AGX_TYPE_BINDING(agx::Physics::HierarchicalGrid::ContactZonePtr, "Physics.HierarchicalGrid.ContactZonePtr")
610AGX_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
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#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
EntityPtr & operator=(const EntityPtr &other)=default
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
Definition: EntityPtr.h:269
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:61
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
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ArrayAttributeT< agx::UInt32 > * particleParticleContactsAttribute
static agxData::ArrayAttributeT< agx::UInt32 > * geometryGeometryContactsAttribute
static agxData::EntityStorage * defaultStorage()
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::ScalarAttributeT< agx::AtomicValue > * numParticleGeometryContactsAttribute
Pointer to a entity instance of type Physics.HierarchicalGrid.ContactZone.
AGXPHYSICS_EXPORT ContactZoneInstance instance()
const ContactZoneData * getData() const
AGXPHYSICS_EXPORT ContactZonePtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::CellPtr & spatialCell()
AGXPHYSICS_EXPORT agx::AtomicValue const & numParticleGeometryContacts() const
AGXPHYSICS_EXPORT ContactZoneSemantics * operator->()
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::GridTierPtr & tier()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & geometryGeometryContacts()
AGXPHYSICS_EXPORT agx::Vec4f & color()
AGXPHYSICS_EXPORT agxData::Array< agx::Physics::SolveGroupPtr > const & solveGroups() const
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const & interTierDependencyList() const
AGXPHYSICS_EXPORT agx::UInt8 const & type() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & particleParticleContacts()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const & geometryGeometryContacts() const
AGXPHYSICS_EXPORT ContactZonePtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const & particleParticleContacts() const
AGXPHYSICS_EXPORT const ContactZoneInstance instance() const
AGXPHYSICS_EXPORT agx::UInt32 const & totNumContacts() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const & particleGeometryContacts() const
AGXPHYSICS_EXPORT agx::AtomicValue & numParticleGeometryContacts()
AGXPHYSICS_EXPORT agx::UInt8 & type()
AGXPHYSICS_EXPORT agx::AtomicValue & numGeometryContacts()
AGXPHYSICS_EXPORT agx::Vec3i & id()
AGXPHYSICS_EXPORT agx::Vec3i const & id() const
AGXPHYSICS_EXPORT agx::UInt32 & totNumContacts()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & particleGeometryContacts()
AGXPHYSICS_EXPORT const ContactZoneSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Vec4f const & color() const
AGXPHYSICS_EXPORT agx::AtomicValue const & numGeometryContacts() const
AGXPHYSICS_EXPORT agx::AtomicValue & numParticleParticleContacts()
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::GridTierPtr const & tier() const
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::CellPtr const & spatialCell() const
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr & interTierDependencyList()
AGXPHYSICS_EXPORT ContactZonePtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::AtomicValue const & numParticleParticleContacts() const
AGXPHYSICS_EXPORT agx::Job *const & job() const
AGXPHYSICS_EXPORT agxData::Array< agx::Physics::SolveGroupPtr > & solveGroups()
AGXPHYSICS_EXPORT agx::Job *& job()
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:89
#define CALLABLE
Definition: macros.h:72
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
#define AGX_FORCE_INLINE
Definition: macros.h:58
Contains classes for low level data storage for AGX.
Definition: Container.h:23
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint32_t UInt32
Definition: Integer.h:32
uint8_t UInt8
Definition: Integer.h:30
UInt32 Index
Definition: Integer.h:44