AGX Dynamics  2.35.0.1
GeometryContactEntity.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_GEOMETRYCONTACT_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_GEOMETRYCONTACT_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>
52 #include <agx/Integer.h>
53 
54 namespace agx { namespace Physics { class GeometryPtr; }}
55 namespace agx { namespace Physics { class GeometryPtr; }}
56 namespace agx { namespace Physics { class RigidBodyPtr; }}
57 namespace agx { namespace Physics { class RigidBodyPtr; }}
58 namespace agx { namespace Physics { class BroadPhasePairPtr; }}
59 namespace agx { namespace Physics { class ContactPointPtr; }}
60 
61 namespace agx
62 {
63  namespace Physics
64  {
65 
66  class GeometryContactModel;
67  class GeometryContactData;
68  class GeometryContactPtr;
69  class GeometryContactInstance;
70  class GeometryContactSemantics;
71 
72 
74 
80  {
81  public:
83 
84  GeometryContactModel(const agx::String& name = "GeometryContact");
85 
88 
91 
94 
96  virtual void shutdownCleanup() override;
97 
98 
99 
100  /* Attributes */
113 
114  protected:
116  virtual agxData::EntityData* createData(agxData::EntityStorage* storage) override;
117  virtual void configure(agx::TiXmlElement* eEntity) override;
118  virtual void initAttributeAccessors() override;
119  virtual void construct(agxData::EntityPtr instance) override;
121  };
122 
123 
125  #ifndef AGX_PHYSICS_GEOMETRYCONTACT_DATA_SET_OVERRIDE
126  #define AGX_PHYSICS_GEOMETRYCONTACT_DATA_SET
127  class AGXPHYSICS_EXPORT GeometryContactData : public agx::Physics::ContactData
128  {
129  public:
130  GeometryContactInstance operator[] (size_t index);
131 
132  public:
141  agxData::Array< agx::Bool > immediately;
142  agxData::Array< agx::Bool > hasSurfaceVelocity;
143  agxData::Array< agx::Bool > hasInternalMaterial;
144  agxData::Array< agx::Bool > usingPPGS;
145  agxData::Array< void* > customData;
146 
147  public:
148  typedef agx::Physics::GeometryPtr geometry1Type;
149  typedef agx::Physics::GeometryPtr geometry2Type;
150  typedef agx::Physics::RigidBodyPtr body1Type;
151  typedef agx::Physics::RigidBodyPtr body2Type;
153  typedef agx::Physics::BroadPhasePairPtr broadPhasePairType;
154  typedef agx::Bool enabledType;
155  typedef agx::Bool immediatelyType;
156  typedef agx::Bool hasSurfaceVelocityType;
157  typedef agx::Bool hasInternalMaterialType;
158  typedef agx::Bool usingPPGSType;
159  typedef void* customDataType;
160 
161  public:
162  GeometryContactData(agxData::EntityStorage* storage);
163  GeometryContactData();
164 
165  protected:
166  virtual ~GeometryContactData() {}
167  virtual void setNumElements(agx::Index numElements) override;
168 
169  private:
170  GeometryContactData& operator= (const GeometryContactData&) { return *this; }
171 
172  };
173  #endif
175 
176 
178  class AGXPHYSICS_EXPORT GeometryContactSemantics : public agx::Physics::ContactSemantics
179  {
180  public:
181 
182  // Automatic getters
183  agx::Physics::GeometryPtr const& getGeometry1() const;
184  agx::Physics::GeometryPtr const& getGeometry2() const;
185  agx::Physics::RigidBodyPtr const& getBody1() const;
186  agx::Physics::RigidBodyPtr const& getBody2() const;
187  agxData::Array< agx::Physics::ContactPointPtr > const& getPoints() const;
188  agx::Physics::BroadPhasePairPtr const& getBroadPhasePair() const;
189  agx::Bool const& getEnabled() const;
190  agx::Bool const& getImmediately() const;
191  agx::Bool const& getHasSurfaceVelocity() const;
192  agx::Bool const& getHasInternalMaterial() const;
193  agx::Bool const& getUsingPPGS() const;
194  void* const& getCustomData() const;
195 
196  // Semantics defined by explicit kernels
197 
198  // Automatic setters
199  void setGeometry1(agx::Physics::GeometryPtr const& value);
200  void setGeometry2(agx::Physics::GeometryPtr const& value);
201  void setBody1(agx::Physics::RigidBodyPtr const& value);
202  void setBody2(agx::Physics::RigidBodyPtr const& value);
203  void setPoints(agxData::Array< agx::Physics::ContactPointPtr > const& value);
204  void setBroadPhasePair(agx::Physics::BroadPhasePairPtr const& value);
205  void setEnabled(agx::Bool const& value);
206  void setImmediately(agx::Bool const& value);
207  void setHasSurfaceVelocity(agx::Bool const& value);
208  void setHasInternalMaterial(agx::Bool const& value);
209  void setUsingPPGS(agx::Bool const& value);
210  void setCustomData(void* const& value);
211 
212 
213  protected:
214  friend class GeometryContactPtr;
215  friend class GeometryContactInstance;
216  GeometryContactSemantics();
217  };
219 
220 
221 
224  class CALLABLE GeometryContactPtr : public agx::Physics::ContactPtr
225  {
226  public:
228  typedef GeometryContactData DataType;
229  typedef GeometryContactInstance InstanceType;
230 
231  public:
238  AGXPHYSICS_EXPORT GeometryContactInstance instance();
239  AGXPHYSICS_EXPORT const GeometryContactInstance instance() const;
240 
241  AGXPHYSICS_EXPORT GeometryContactSemantics* operator->();
242  AGXPHYSICS_EXPORT const GeometryContactSemantics* operator->() const;
243 
244  GeometryContactData* getData();
245  const GeometryContactData* getData() const;
246 
247 
252 
257 
262 
267 
272 
277 
282 
287 
292 
297 
302 
306  AGXPHYSICS_EXPORT void* const& customData() const;
307 
309  // Only used by tolua!
310  #ifdef AGX_GENERATED_TOLUA_WRAPPER
311  inline agx::Physics::GeometryPtr const& getGeometry1() const { return (*this)->getGeometry1(); }
312  inline agx::Physics::GeometryPtr const& getGeometry2() const { return (*this)->getGeometry2(); }
313  inline agx::Physics::RigidBodyPtr const& getBody1() const { return (*this)->getBody1(); }
314  inline agx::Physics::RigidBodyPtr const& getBody2() const { return (*this)->getBody2(); }
315  inline agxData::Array< agx::Physics::ContactPointPtr > const& getPoints() const { return (*this)->getPoints(); }
316  inline agx::Physics::BroadPhasePairPtr const& getBroadPhasePair() const { return (*this)->getBroadPhasePair(); }
317  inline agx::Bool const& getEnabled() const { return (*this)->getEnabled(); }
318  inline agx::Bool const& getImmediately() const { return (*this)->getImmediately(); }
319  inline agx::Bool const& getHasSurfaceVelocity() const { return (*this)->getHasSurfaceVelocity(); }
320  inline agx::Bool const& getHasInternalMaterial() const { return (*this)->getHasInternalMaterial(); }
321  inline agx::Bool const& getUsingPPGS() const { return (*this)->getUsingPPGS(); }
322  inline void* const& getCustomData() const { return (*this)->getCustomData(); }
323 
324 
325  inline void setGeometry1(agx::Physics::GeometryPtr const& value) { (*this)->setGeometry1(value); }
326  inline void setGeometry2(agx::Physics::GeometryPtr const& value) { (*this)->setGeometry2(value); }
327  inline void setBody1(agx::Physics::RigidBodyPtr const& value) { (*this)->setBody1(value); }
328  inline void setBody2(agx::Physics::RigidBodyPtr const& value) { (*this)->setBody2(value); }
329  inline void setPoints(agxData::Array< agx::Physics::ContactPointPtr > const& value) { (*this)->setPoints(value); }
330  inline void setBroadPhasePair(agx::Physics::BroadPhasePairPtr const& value) { (*this)->setBroadPhasePair(value); }
331  inline void setEnabled(agx::Bool const& value) { (*this)->setEnabled(value); }
332  inline void setImmediately(agx::Bool const& value) { (*this)->setImmediately(value); }
333  inline void setHasSurfaceVelocity(agx::Bool const& value) { (*this)->setHasSurfaceVelocity(value); }
334  inline void setHasInternalMaterial(agx::Bool const& value) { (*this)->setHasInternalMaterial(value); }
335  inline void setUsingPPGS(agx::Bool const& value) { (*this)->setUsingPPGS(value); }
336  inline void setCustomData(void* const& value) { (*this)->setCustomData(value); }
337  #endif
339 
340  };
341 
342 
344  class AGXPHYSICS_EXPORT GeometryContactInstance : public agx::Physics::ContactInstance
345  {
346  public:
347  GeometryContactInstance();
348  GeometryContactInstance(GeometryContactData* data, agx::Index index);
349  GeometryContactInstance(agxData::EntityStorage *storage, agx::Index index);
350  GeometryContactInstance(const agxData::EntityInstance& other);
351  GeometryContactInstance(const agxData::EntityPtr& ptr);
352 
353  GeometryContactData* getData();
354  const GeometryContactData* getData() const;
355 
356  public:
358  agx::Physics::GeometryPtr& geometry1();
360  agx::Physics::GeometryPtr const& geometry1() const;
361 
363  agx::Physics::GeometryPtr& geometry2();
365  agx::Physics::GeometryPtr const& geometry2() const;
366 
370  agx::Physics::RigidBodyPtr const& body1() const;
371 
375  agx::Physics::RigidBodyPtr const& body2() const;
376 
381 
383  agx::Physics::BroadPhasePairPtr& broadPhasePair();
385  agx::Physics::BroadPhasePairPtr const& broadPhasePair() const;
386 
388  agx::Bool& enabled();
390  agx::Bool const& enabled() const;
391 
393  agx::Bool& immediately();
395  agx::Bool const& immediately() const;
396 
398  agx::Bool& hasSurfaceVelocity();
400  agx::Bool const& hasSurfaceVelocity() const;
401 
403  agx::Bool& hasInternalMaterial();
405  agx::Bool const& hasInternalMaterial() const;
406 
408  agx::Bool& usingPPGS();
410  agx::Bool const& usingPPGS() const;
411 
413  void*& customData();
415  void* const& customData() const;
416 
417  };
419 
420 
421 
424 
425 
426 
428  /* Implementation */
429  //-----------------------------------------------------------------------------------------------------
430  //-----------------------------------------------------------------------------------------------------
431  inline GeometryContactInstance agx::Physics::GeometryContactData::operator[] (size_t index) { return GeometryContactInstance(this, (agx::Index)index); }
432  //-----------------------------------------------------------------------------------------------------
434  AGX_FORCE_INLINE GeometryContactPtr::GeometryContactPtr(agxData::EntityStorage* storage, agx::Index id) : agx::Physics::ContactPtr(storage, id) {}
435  AGX_FORCE_INLINE GeometryContactPtr::GeometryContactPtr(const agxData::EntityPtr& ptr) : agx::Physics::ContactPtr(ptr)
436  {
438  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
440  }
441 
442  AGX_FORCE_INLINE GeometryContactPtr::GeometryContactPtr(const agxData::EntityInstance& instance) : agx::Physics::ContactPtr(instance)
443  {
444  agxAssertN(!instance || instance.isInstanceOf(GeometryContactModel::instance()),
445  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
447  }
448 
449  AGX_FORCE_INLINE GeometryContactPtr& GeometryContactPtr::operator= (const agxData::EntityPtr& ptr)
450  {
452  agxAssertN(!ptr || ptr.isInstanceOf(GeometryContactModel::instance()),
453  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
454  EntityPtr::getModel()->fullPath().c_str(), GeometryContactModel::instance()->fullPath().c_str());
455  return *this;
456  }
457 
458  AGX_FORCE_INLINE GeometryContactPtr& GeometryContactPtr::operator= (const agxData::EntityInstance& instance)
459  {
461  agxAssertN(!instance || instance.isInstanceOf(GeometryContactModel::instance()),
462  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
463  EntityPtr::getModel()->fullPath().c_str(), GeometryContactModel::instance()->fullPath().c_str());
464  return *this;
465  }
466 
467  inline GeometryContactInstance GeometryContactPtr::instance() { return agxData::EntityPtr::instance(); }
468  inline const GeometryContactInstance GeometryContactPtr::instance() const { return agxData::EntityPtr::instance(); }
469  AGX_FORCE_INLINE GeometryContactSemantics* GeometryContactPtr::operator->() { return (GeometryContactSemantics* )this; }
470  AGX_FORCE_INLINE const GeometryContactSemantics* GeometryContactPtr::operator->() const { return (const GeometryContactSemantics* )this; }
471  AGX_FORCE_INLINE GeometryContactData* GeometryContactPtr::getData() { return static_cast<GeometryContactData* >(agxData::EntityPtr::getData()); }
472  AGX_FORCE_INLINE const GeometryContactData* GeometryContactPtr::getData() const { return static_cast<const GeometryContactData* >(agxData::EntityPtr::getData()); }
473 
474  AGX_FORCE_INLINE agx::Physics::GeometryPtr& GeometryContactPtr::geometry1() { verifyIndex(); return getData()->geometry1[calculateIndex()]; }
475  AGX_FORCE_INLINE agx::Physics::GeometryPtr const& GeometryContactPtr::geometry1() const { verifyIndex(); return getData()->geometry1[calculateIndex()]; }
476 
477  AGX_FORCE_INLINE agx::Physics::GeometryPtr& GeometryContactPtr::geometry2() { verifyIndex(); return getData()->geometry2[calculateIndex()]; }
478  AGX_FORCE_INLINE agx::Physics::GeometryPtr const& GeometryContactPtr::geometry2() const { verifyIndex(); return getData()->geometry2[calculateIndex()]; }
479 
480  AGX_FORCE_INLINE agx::Physics::RigidBodyPtr& GeometryContactPtr::body1() { verifyIndex(); return getData()->body1[calculateIndex()]; }
481  AGX_FORCE_INLINE agx::Physics::RigidBodyPtr const& GeometryContactPtr::body1() const { verifyIndex(); return getData()->body1[calculateIndex()]; }
482 
483  AGX_FORCE_INLINE agx::Physics::RigidBodyPtr& GeometryContactPtr::body2() { verifyIndex(); return getData()->body2[calculateIndex()]; }
484  AGX_FORCE_INLINE agx::Physics::RigidBodyPtr const& GeometryContactPtr::body2() const { verifyIndex(); return getData()->body2[calculateIndex()]; }
485 
486  AGX_FORCE_INLINE agxData::Array< agx::Physics::ContactPointPtr >& GeometryContactPtr::points() { verifyIndex(); return getData()->points[calculateIndex()]; }
487  AGX_FORCE_INLINE agxData::Array< agx::Physics::ContactPointPtr > const& GeometryContactPtr::points() const { verifyIndex(); return getData()->points[calculateIndex()]; }
488 
489  AGX_FORCE_INLINE agx::Physics::BroadPhasePairPtr& GeometryContactPtr::broadPhasePair() { verifyIndex(); return getData()->broadPhasePair[calculateIndex()]; }
490  AGX_FORCE_INLINE agx::Physics::BroadPhasePairPtr const& GeometryContactPtr::broadPhasePair() const { verifyIndex(); return getData()->broadPhasePair[calculateIndex()]; }
491 
492  AGX_FORCE_INLINE agx::Bool& GeometryContactPtr::enabled() { verifyIndex(); return getData()->enabled[calculateIndex()]; }
493  AGX_FORCE_INLINE agx::Bool const& GeometryContactPtr::enabled() const { verifyIndex(); return getData()->enabled[calculateIndex()]; }
494 
495  AGX_FORCE_INLINE agx::Bool& GeometryContactPtr::immediately() { verifyIndex(); return getData()->immediately[calculateIndex()]; }
496  AGX_FORCE_INLINE agx::Bool const& GeometryContactPtr::immediately() const { verifyIndex(); return getData()->immediately[calculateIndex()]; }
497 
498  AGX_FORCE_INLINE agx::Bool& GeometryContactPtr::hasSurfaceVelocity() { verifyIndex(); return getData()->hasSurfaceVelocity[calculateIndex()]; }
499  AGX_FORCE_INLINE agx::Bool const& GeometryContactPtr::hasSurfaceVelocity() const { verifyIndex(); return getData()->hasSurfaceVelocity[calculateIndex()]; }
500 
501  AGX_FORCE_INLINE agx::Bool& GeometryContactPtr::hasInternalMaterial() { verifyIndex(); return getData()->hasInternalMaterial[calculateIndex()]; }
502  AGX_FORCE_INLINE agx::Bool const& GeometryContactPtr::hasInternalMaterial() const { verifyIndex(); return getData()->hasInternalMaterial[calculateIndex()]; }
503 
504  AGX_FORCE_INLINE agx::Bool& GeometryContactPtr::usingPPGS() { verifyIndex(); return getData()->usingPPGS[calculateIndex()]; }
505  AGX_FORCE_INLINE agx::Bool const& GeometryContactPtr::usingPPGS() const { verifyIndex(); return getData()->usingPPGS[calculateIndex()]; }
506 
507  AGX_FORCE_INLINE void*& GeometryContactPtr::customData() { verifyIndex(); return getData()->customData[calculateIndex()]; }
508  AGX_FORCE_INLINE void* const& GeometryContactPtr::customData() const { verifyIndex(); return getData()->customData[calculateIndex()]; }
509 
510  //-----------------------------------------------------------------------------------------------------
511  AGX_FORCE_INLINE GeometryContactInstance::GeometryContactInstance() {}
512  AGX_FORCE_INLINE GeometryContactInstance::GeometryContactInstance(GeometryContactData* data, agx::Index index) : agx::Physics::ContactInstance(data, index) {}
513  AGX_FORCE_INLINE GeometryContactInstance::GeometryContactInstance(agxData::EntityStorage* storage, agx::Index index) : agx::Physics::ContactInstance(storage, index) {}
514  AGX_FORCE_INLINE GeometryContactInstance::GeometryContactInstance(const agxData::EntityInstance& other) : agx::Physics::ContactInstance(other)
515  {
517  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
519  }
520 
521  AGX_FORCE_INLINE GeometryContactInstance::GeometryContactInstance(const agxData::EntityPtr& ptr) : agx::Physics::ContactInstance(ptr)
522  {
524  "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
526  }
527 
528 
529  AGX_FORCE_INLINE GeometryContactData* GeometryContactInstance::getData() { return static_cast<GeometryContactData* >(agxData::EntityInstance::getData()); }
530  AGX_FORCE_INLINE const GeometryContactData* GeometryContactInstance::getData() const { return static_cast<const GeometryContactData* >(agxData::EntityInstance::getData()); }
531 
532  AGX_FORCE_INLINE agx::Physics::GeometryPtr& GeometryContactInstance::geometry1() { verifyIndex(); return getData()->geometry1[getIndex()]; }
533  AGX_FORCE_INLINE agx::Physics::GeometryPtr const& GeometryContactInstance::geometry1() const { verifyIndex(); return getData()->geometry1[getIndex()]; }
534 
535  AGX_FORCE_INLINE agx::Physics::GeometryPtr& GeometryContactInstance::geometry2() { verifyIndex(); return getData()->geometry2[getIndex()]; }
536  AGX_FORCE_INLINE agx::Physics::GeometryPtr const& GeometryContactInstance::geometry2() const { verifyIndex(); return getData()->geometry2[getIndex()]; }
537 
538  AGX_FORCE_INLINE agx::Physics::RigidBodyPtr& GeometryContactInstance::body1() { verifyIndex(); return getData()->body1[getIndex()]; }
539  AGX_FORCE_INLINE agx::Physics::RigidBodyPtr const& GeometryContactInstance::body1() const { verifyIndex(); return getData()->body1[getIndex()]; }
540 
541  AGX_FORCE_INLINE agx::Physics::RigidBodyPtr& GeometryContactInstance::body2() { verifyIndex(); return getData()->body2[getIndex()]; }
542  AGX_FORCE_INLINE agx::Physics::RigidBodyPtr const& GeometryContactInstance::body2() const { verifyIndex(); return getData()->body2[getIndex()]; }
543 
544  AGX_FORCE_INLINE agxData::Array< agx::Physics::ContactPointPtr >& GeometryContactInstance::points() { verifyIndex(); return getData()->points[getIndex()]; }
545  AGX_FORCE_INLINE agxData::Array< agx::Physics::ContactPointPtr > const& GeometryContactInstance::points() const { verifyIndex(); return getData()->points[getIndex()]; }
546 
547  AGX_FORCE_INLINE agx::Physics::BroadPhasePairPtr& GeometryContactInstance::broadPhasePair() { verifyIndex(); return getData()->broadPhasePair[getIndex()]; }
548  AGX_FORCE_INLINE agx::Physics::BroadPhasePairPtr const& GeometryContactInstance::broadPhasePair() const { verifyIndex(); return getData()->broadPhasePair[getIndex()]; }
549 
550  AGX_FORCE_INLINE agx::Bool& GeometryContactInstance::enabled() { verifyIndex(); return getData()->enabled[getIndex()]; }
551  AGX_FORCE_INLINE agx::Bool const& GeometryContactInstance::enabled() const { verifyIndex(); return getData()->enabled[getIndex()]; }
552 
553  AGX_FORCE_INLINE agx::Bool& GeometryContactInstance::immediately() { verifyIndex(); return getData()->immediately[getIndex()]; }
554  AGX_FORCE_INLINE agx::Bool const& GeometryContactInstance::immediately() const { verifyIndex(); return getData()->immediately[getIndex()]; }
555 
556  AGX_FORCE_INLINE agx::Bool& GeometryContactInstance::hasSurfaceVelocity() { verifyIndex(); return getData()->hasSurfaceVelocity[getIndex()]; }
557  AGX_FORCE_INLINE agx::Bool const& GeometryContactInstance::hasSurfaceVelocity() const { verifyIndex(); return getData()->hasSurfaceVelocity[getIndex()]; }
558 
559  AGX_FORCE_INLINE agx::Bool& GeometryContactInstance::hasInternalMaterial() { verifyIndex(); return getData()->hasInternalMaterial[getIndex()]; }
560  AGX_FORCE_INLINE agx::Bool const& GeometryContactInstance::hasInternalMaterial() const { verifyIndex(); return getData()->hasInternalMaterial[getIndex()]; }
561 
562  AGX_FORCE_INLINE agx::Bool& GeometryContactInstance::usingPPGS() { verifyIndex(); return getData()->usingPPGS[getIndex()]; }
563  AGX_FORCE_INLINE agx::Bool const& GeometryContactInstance::usingPPGS() const { verifyIndex(); return getData()->usingPPGS[getIndex()]; }
564 
565  AGX_FORCE_INLINE void*& GeometryContactInstance::customData() { verifyIndex(); return getData()->customData[getIndex()]; }
566  AGX_FORCE_INLINE void* const& GeometryContactInstance::customData() const { verifyIndex(); return getData()->customData[getIndex()]; }
567 
568  //-----------------------------------------------------------------------------------------------------
569  AGX_FORCE_INLINE GeometryContactSemantics::GeometryContactSemantics() {}
570  //-----------------------------------------------------------------------------------------------------
572  }
573 }
574 
575 AGX_TYPE_BINDING(agx::Physics::GeometryContactPtr, "Physics.GeometryContactPtr")
576 AGX_TYPE_BINDING(agx::Physics::GeometryContactInstance, "Physics.GeometryContactInstance")
577 
578 #ifdef _MSC_VER
579 # pragma warning(pop)
580 #endif
581 
582 #undef AGX_ENTITY_WRAPPER
583 #undef AGX_ENTITY_NAMESPACE
584 #endif
585 
#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()
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
agx::String fullPath() const
Pointer to a entity instance of type Physics.BroadPhasePair.
Abstract description of the data attributes for the Physics.Contact entity.
Definition: ContactEntity.h:71
Pointer to a entity instance of type Physics.Contact.
Abstract description of the data attributes for the Physics.GeometryContact entity.
static GeometryContactPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ScalarAttributeT< agx::Physics::RigidBodyPtr > * body1Attribute
static agxData::EntityStorage * defaultStorage()
static agxData::ScalarAttributeT< agx::Physics::BroadPhasePairPtr > * broadPhasePairAttribute
static agxData::ScalarAttributeT< agx::Bool > * usingPPGSAttribute
static agxData::ScalarAttributeT< agx::Bool > * immediatelyAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
GeometryContactModel(const agx::String &name="GeometryContact")
virtual void construct(agxData::EntityPtr instance) override
void construct(agx::Physics::GeometryContactPtr geometryContact)
static agxData::PointerAttributeT< void * > * customDataAttribute
static agxData::ScalarAttributeT< agx::Physics::GeometryPtr > * geometry1Attribute
static agxData::ScalarAttributeT< agx::Bool > * hasSurfaceVelocityAttribute
static agxData::ArrayAttributeT< agx::Physics::ContactPointPtr > * pointsAttribute
static agxData::ScalarAttributeT< agx::Bool > * enabledAttribute
virtual void configure(agx::TiXmlElement *eEntity) override
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::Physics::GeometryPtr > * geometry2Attribute
static agxData::ScalarAttributeT< agx::Bool > * hasInternalMaterialAttribute
static GeometryContactModel * instance()
static agxData::ScalarAttributeT< agx::Physics::RigidBodyPtr > * body2Attribute
A geometry contact hold contact information between two geometries.
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & geometry1()
AGXPHYSICS_EXPORT agx::Bool & usingPPGS()
AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr const & body2() const
body2 is the rigid body of geometry2, can be NULL.
AGXPHYSICS_EXPORT void *& customData()
AGXPHYSICS_EXPORT agx::Bool const & hasInternalMaterial() const
AGXPHYSICS_EXPORT const GeometryContactSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Bool const & immediately() const
AGXPHYSICS_EXPORT agx::Bool const & hasSurfaceVelocity() const
AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr & body1()
body1 is the rigid body of geometry1, can be assumed to be a valid rigid body.
AGXPHYSICS_EXPORT GeometryContactSemantics * operator->()
AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr const & body1() const
body1 is the rigid body of geometry1, can be assumed to be a valid rigid body.
AGXPHYSICS_EXPORT const GeometryContactInstance instance() const
AGXPHYSICS_EXPORT agx::Bool & hasSurfaceVelocity()
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & geometry2()
AGXPHYSICS_EXPORT GeometryContactPtr()
AGXPHYSICS_EXPORT GeometryContactPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr const & geometry1() const
AGXPHYSICS_EXPORT agx::Bool & enabled()
const GeometryContactData * getData() const
AGXPHYSICS_EXPORT agx::Physics::RigidBodyPtr & body2()
body2 is the rigid body of geometry2, can be NULL.
AGXPHYSICS_EXPORT agx::Bool const & enabled() const
GeometryContactData * getData()
AGXPHYSICS_EXPORT agxData::Array< agx::Physics::ContactPointPtr > & points()
The list of contact points.
AGXPHYSICS_EXPORT agxData::Array< agx::Physics::ContactPointPtr > const & points() const
The list of contact points.
AGXPHYSICS_EXPORT agx::Physics::BroadPhasePairPtr & broadPhasePair()
AGXPHYSICS_EXPORT agx::Bool const & usingPPGS() const
AGXPHYSICS_EXPORT agx::Physics::BroadPhasePairPtr const & broadPhasePair() const
AGXPHYSICS_EXPORT agx::Bool & immediately()
AGXPHYSICS_EXPORT GeometryContactPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr const & geometry2() const
AGXPHYSICS_EXPORT GeometryContactPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT void *const & customData() const
AGXPHYSICS_EXPORT agx::Bool & hasInternalMaterial()
AGXPHYSICS_EXPORT GeometryContactInstance instance()
Pointer to a entity instance of type Physics.Geometry.
Pointer to a entity instance of type Physics.RigidBody.
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
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition: Integer.h:48
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
Definition: Object.h:364
UInt32 Index
Definition: Integer.h:52