21#ifndef GENERATED_AGX_PHYSICS_STRONGINTERACTION_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_STRONGINTERACTION_H_PLUGIN
24#define AGX_ENTITY_WRAPPER 1
30# pragma warning( disable : 4505 )
32# pragma warning( disable : 4251 )
34# pragma warning( disable : 4355 )
36# pragma warning( disable: 4714 )
49namespace agx {
class StrongInteraction; }
57 class StrongInteractionModel;
58 class StrongInteractionData;
59 class StrongInteractionPtr;
60 class StrongInteractionInstance;
61 class StrongInteractionSemantics;
98 virtual void configure(agx::TiXmlElement* eEntity)
override;
106 #ifndef AGX_PHYSICS_STRONGINTERACTION_DATA_SET_OVERRIDE
107 #define AGX_PHYSICS_STRONGINTERACTION_DATA_SET
108 class AGXPHYSICS_EXPORT StrongInteractionData :
public agx::Physics::InteractionData
111 StrongInteractionInstance operator[] (
size_t index);
126 StrongInteractionData();
129 virtual ~StrongInteractionData() {}
130 virtual void setNumElements(
agx::Index numElements)
override;
133 StrongInteractionData& operator= (
const StrongInteractionData&) {
return *
this; }
159 friend class StrongInteractionPtr;
160 friend class StrongInteractionInstance;
161 StrongInteractionSemantics();
215 StrongInteractionInstance();
216 StrongInteractionInstance(StrongInteractionData* data,
agx::Index index);
221 StrongInteractionData* getData();
222 const StrongInteractionData* getData()
const;
254 inline StrongInteractionInstance
agx::Physics::StrongInteractionData::operator[] (
size_t index) {
return StrongInteractionInstance(
this, (
agx::Index)index); }
261 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
268 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
276 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
277 EntityPtr::getModel()->fullPath().c_str(), StrongInteractionModel::instance()->fullPath().c_str());
285 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
286 EntityPtr::getModel()->fullPath().c_str(), StrongInteractionModel::instance()->fullPath().c_str());
292 AGX_FORCE_INLINE StrongInteractionSemantics* StrongInteractionPtr::operator->() {
return (StrongInteractionSemantics* )
this; }
293 AGX_FORCE_INLINE const StrongInteractionSemantics* StrongInteractionPtr::operator->()
const {
return (
const StrongInteractionSemantics* )
this; }
301 AGX_FORCE_INLINE agx::UInt const& StrongInteractionPtr::body1()
const { verifyIndex();
return getData()->body1[calculateIndex()]; }
304 AGX_FORCE_INLINE agx::UInt const& StrongInteractionPtr::body2()
const { verifyIndex();
return getData()->body2[calculateIndex()]; }
308 AGX_FORCE_INLINE StrongInteractionInstance::StrongInteractionInstance(StrongInteractionData* data,
agx::Index index) :
agx::Physics::InteractionInstance(data, index) {}
313 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
320 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
332 AGX_FORCE_INLINE agx::UInt const& StrongInteractionInstance::body1()
const { verifyIndex();
return getData()->body1[getIndex()]; }
335 AGX_FORCE_INLINE agx::UInt const& StrongInteractionInstance::body2()
const { verifyIndex();
return getData()->body2[getIndex()]; }
338 AGX_FORCE_INLINE StrongInteractionSemantics::StrongInteractionSemantics() {}
345AGX_TYPE_BINDING(
agx::Physics::StrongInteractionInstance, "Physics.StrongInteractionInstance")
351#undef AGX_ENTITY_WRAPPER
352#undef AGX_ENTITY_NAMESPACE
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGX_TYPE_BINDING(_Type, _Name)
#define AGXPHYSICS_EXPORT
Type-specific Array used for fast access into the data held by a Buffer.
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...
EntityPtr & operator=(const EntityPtr &other)=default
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
Data storage for a collection of entity instances of a specified EntityModel.
agx::String fullPath() const
Abstract description of the data attributes for the Physics.Interaction entity.
Pointer to a entity instance of type Physics.Interaction.
Abstract description of the data attributes for the Physics.StrongInteraction entity.
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
virtual void construct(agxData::EntityPtr instance) override
StrongInteractionModel(const agx::String &name="StrongInteraction")
static agxData::EntityStorage * defaultStorage()
static agxData::PointerAttributeT< agx::StrongInteraction * > * modelAttribute
static StrongInteractionModel * instance()
static StrongInteractionPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
void construct(agx::Physics::StrongInteractionPtr strongInteraction)
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
virtual ~StrongInteractionModel()
static agxData::ScalarAttributeT< agx::UInt > * body1Attribute
virtual void configure(agx::TiXmlElement *eEntity) override
virtual void initAttributeAccessors() override
static agxData::ScalarAttributeT< agx::UInt > * body2Attribute
StrongInteractionPtr PtrT
Pointer to a entity instance of type Physics.StrongInteraction.
AGXPHYSICS_EXPORT StrongInteractionInstance instance()
StrongInteractionData * getData()
AGXPHYSICS_EXPORT StrongInteractionPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::UInt const & body2() const
StrongInteractionModel ModelType
AGXPHYSICS_EXPORT agx::StrongInteraction *& model()
AGXPHYSICS_EXPORT StrongInteractionPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::StrongInteraction *const & model() const
AGXPHYSICS_EXPORT agx::UInt const & body1() const
StrongInteractionData DataType
const StrongInteractionData * getData() const
AGXPHYSICS_EXPORT StrongInteractionSemantics * operator->()
AGXPHYSICS_EXPORT agx::UInt & body2()
AGXPHYSICS_EXPORT const StrongInteractionSemantics * operator->() const
AGXPHYSICS_EXPORT StrongInteractionPtr()
AGXPHYSICS_EXPORT const StrongInteractionInstance instance() const
AGXPHYSICS_EXPORT agx::UInt & body1()
AGXPHYSICS_EXPORT StrongInteractionPtr(agxData::EntityStorage *storage, agx::Index id)
StrongInteractionInstance InstanceType
Base class for a strong interaction concept where there interaction is defined in the mass matrix par...
Vector containing 'raw' data.
#define agxAssertN(expr, format,...)
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
Contains classes for low level data storage for AGX.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())