21 #ifndef GENERATED_AGX_PHYSICS_STRONGINTERACTION_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_STRONGINTERACTION_H_PLUGIN
24 #define AGX_ENTITY_WRAPPER 1
28 # pragma warning(push)
30 # pragma warning( disable : 4505 )
32 # pragma warning( disable : 4251 )
34 # pragma warning( disable : 4355 )
36 # pragma warning( disable: 4714 )
49 namespace agx {
class StrongInteraction; }
57 class StrongInteractionModel;
58 class StrongInteractionData;
59 class StrongInteractionPtr;
60 class StrongInteractionInstance;
61 class StrongInteractionSemantics;
86 virtual void shutdownCleanup()
override;
98 virtual void configure(agx::TiXmlElement* eEntity)
override;
99 virtual void initAttributeAccessors()
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; }
141 class
AGXPHYSICS_EXPORT StrongInteractionSemantics : public agx::Physics::InteractionSemantics
159 friend class StrongInteractionPtr;
160 friend class StrongInteractionInstance;
161 StrongInteractionSemantics();
189 StrongInteractionData* getData();
190 const StrongInteractionData* getData()
const;
210 #ifdef AGX_GENERATED_TOLUA_WRAPPER
212 inline agx::UInt const& getBody1()
const {
return (*this)->getBody1(); }
213 inline agx::UInt const& getBody2()
const {
return (*this)->getBody2(); }
217 inline void setBody1(
agx::UInt const& value) { (*this)->setBody1(value); }
218 inline void setBody2(
agx::UInt const& value) { (*this)->setBody2(value); }
226 class
AGXPHYSICS_EXPORT StrongInteractionInstance : public agx::Physics::InteractionInstance
229 StrongInteractionInstance();
230 StrongInteractionInstance(StrongInteractionData* data,
agx::Index index);
235 StrongInteractionData* getData();
236 const StrongInteractionData* getData()
const;
268 inline StrongInteractionInstance agx::Physics::StrongInteractionData::operator[] (
size_t index) {
return StrongInteractionInstance(
this, (
agx::Index)index); }
275 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
282 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
290 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
299 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
306 AGX_FORCE_INLINE StrongInteractionSemantics* StrongInteractionPtr::operator->() {
return (StrongInteractionSemantics* )
this; }
307 AGX_FORCE_INLINE const StrongInteractionSemantics* StrongInteractionPtr::operator->()
const {
return (
const StrongInteractionSemantics* )
this; }
315 AGX_FORCE_INLINE agx::UInt const& StrongInteractionPtr::body1()
const { verifyIndex();
return getData()->body1[calculateIndex()]; }
318 AGX_FORCE_INLINE agx::UInt const& StrongInteractionPtr::body2()
const { verifyIndex();
return getData()->body2[calculateIndex()]; }
322 AGX_FORCE_INLINE StrongInteractionInstance::StrongInteractionInstance(StrongInteractionData* data,
agx::Index index) : agx::Physics::InteractionInstance(data, index) {}
327 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
334 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
346 AGX_FORCE_INLINE agx::UInt const& StrongInteractionInstance::body1()
const { verifyIndex();
return getData()->body1[getIndex()]; }
349 AGX_FORCE_INLINE agx::UInt const& StrongInteractionInstance::body2()
const { verifyIndex();
return getData()->body2[getIndex()]; }
352 AGX_FORCE_INLINE StrongInteractionSemantics::StrongInteractionSemantics() {}
359 AGX_TYPE_BINDING(agx::Physics::StrongInteractionInstance, "Physics.StrongInteractionInstance")
362 # pragma warning(pop)
365 #undef AGX_ENTITY_WRAPPER
366 #undef AGX_ENTITY_NAMESPACE
agxData::EntityData * getData()
void setModel(agx::Model *model)
Set the object model (handled automatically).
agxData::EntityInstance instance()
Data storage for a collection of entity instances of a specified EntityModel.
#define agxAssertN(expr, format,...)
agxData::EntityData * getData()
Base class for a strong interaction concept where there interaction is defined in the mass matrix par...
static agxData::ScalarAttributeT< agx::UInt > * body1Attribute
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
bool isInstanceOf(agxData::EntityModel *model) const
Pointer to a entity instance of type Physics.Interaction.
#define AGXPHYSICS_EXPORT
Entity instance provides access to a single instance in an EntityStorage.
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
StrongInteractionInstance InstanceType
static agxData::ScalarAttributeT< agx::UInt > * body2Attribute
#define AGX_DECLARE_POINTER_TYPES(type)
agx::String fullPath() const
Type-specific Array used for fast access into the data held by a Buffer.
Abstract description of the data attributes for the Physics.Interaction entity.
StrongInteractionModel ModelType
Vector containing 'raw' data.
Pointer to a entity instance of type Physics.StrongInteraction.
EntityPtr & operator=(const EntityPtr &other)=default
static agxData::PointerAttributeT< agx::StrongInteraction * > * modelAttribute
AGXPHYSICS_EXPORT StrongInteractionPtr()
StrongInteractionData DataType
bool isInstanceOf(agxData::EntityModel *model) const
Abstract description of the data attributes for the Physics.StrongInteraction entity.
static StrongInteractionModel * instance()
StrongInteractionPtr PtrT
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()