21 #ifndef GENERATED_AGX_PHYSICS_CONSTRAINTBASE_H_PLUGIN
22 #define GENERATED_AGX_PHYSICS_CONSTRAINTBASE_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 ConstraintImplementation; }
57 class ConstraintBaseModel;
58 class ConstraintBaseData;
59 class ConstraintBasePtr;
60 class ConstraintBaseInstance;
61 class ConstraintBaseSemantics;
101 virtual void configure(agx::TiXmlElement* eEntity)
override;
109 #ifndef AGX_PHYSICS_CONSTRAINTBASE_DATA_SET_OVERRIDE
110 #define AGX_PHYSICS_CONSTRAINTBASE_DATA_SET
111 class AGXPHYSICS_EXPORT ConstraintBaseData :
public agx::Physics::InteractionData
114 ConstraintBaseInstance operator[] (
size_t index);
135 ConstraintBaseData();
138 virtual ~ConstraintBaseData() {}
139 virtual void setNumElements(
agx::Index numElements)
override;
142 ConstraintBaseData& operator= (
const ConstraintBaseData&) {
return *
this; }
158 agx::UInt const& getJacobianIndex()
const;
159 agx::UInt const& getBlockRowIndex()
const;
166 void setRowIndex(
agx::UInt const& value);
168 void setJacobianIndex(
agx::UInt const& value);
169 void setBlockRowIndex(
agx::UInt const& value);
170 void setIsImpacting(
agx::Bool const& value);
174 friend class ConstraintBasePtr;
175 friend class ConstraintBaseInstance;
176 ConstraintBaseSemantics();
240 #ifdef AGX_GENERATED_TOLUA_WRAPPER
242 inline agx::UInt const& getRowIndex()
const {
return (*this)->getRowIndex(); }
243 inline agx::UInt const& getNumRows()
const {
return (*this)->getNumRows(); }
244 inline agx::UInt const& getJacobianIndex()
const {
return (*this)->getJacobianIndex(); }
245 inline agx::UInt const& getBlockRowIndex()
const {
return (*this)->getBlockRowIndex(); }
246 inline agx::Bool const& getIsImpacting()
const {
return (*this)->getIsImpacting(); }
250 inline void setRowIndex(
agx::UInt const& value) { (*this)->setRowIndex(value); }
251 inline void setNumRows(
agx::UInt const& value) { (*this)->setNumRows(value); }
252 inline void setJacobianIndex(
agx::UInt const& value) { (*this)->setJacobianIndex(value); }
253 inline void setBlockRowIndex(
agx::UInt const& value) { (*this)->setBlockRowIndex(value); }
254 inline void setIsImpacting(
agx::Bool const& value) { (*this)->setIsImpacting(value); }
265 ConstraintBaseInstance();
266 ConstraintBaseInstance(ConstraintBaseData* data,
agx::Index index);
271 ConstraintBaseData* getData();
272 const ConstraintBaseData* getData()
const;
319 inline ConstraintBaseInstance
agx::Physics::ConstraintBaseData::operator[] (
size_t index) {
return ConstraintBaseInstance(
this, (
agx::Index)index); }
326 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
333 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
341 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
350 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
357 AGX_FORCE_INLINE ConstraintBaseSemantics* ConstraintBasePtr::operator->() {
return (ConstraintBaseSemantics* )
this; }
358 AGX_FORCE_INLINE const ConstraintBaseSemantics* ConstraintBasePtr::operator->()
const {
return (
const ConstraintBaseSemantics* )
this; }
365 AGX_FORCE_INLINE agx::UInt& ConstraintBasePtr::rowIndex() { verifyIndex();
return getData()->rowIndex[calculateIndex()]; }
366 AGX_FORCE_INLINE agx::UInt const& ConstraintBasePtr::rowIndex()
const { verifyIndex();
return getData()->rowIndex[calculateIndex()]; }
369 AGX_FORCE_INLINE agx::UInt const& ConstraintBasePtr::numRows()
const { verifyIndex();
return getData()->numRows[calculateIndex()]; }
371 AGX_FORCE_INLINE agx::UInt& ConstraintBasePtr::jacobianIndex() { verifyIndex();
return getData()->jacobianIndex[calculateIndex()]; }
372 AGX_FORCE_INLINE agx::UInt const& ConstraintBasePtr::jacobianIndex()
const { verifyIndex();
return getData()->jacobianIndex[calculateIndex()]; }
374 AGX_FORCE_INLINE agx::UInt& ConstraintBasePtr::blockRowIndex() { verifyIndex();
return getData()->blockRowIndex[calculateIndex()]; }
375 AGX_FORCE_INLINE agx::UInt const& ConstraintBasePtr::blockRowIndex()
const { verifyIndex();
return getData()->blockRowIndex[calculateIndex()]; }
377 AGX_FORCE_INLINE agx::Bool& ConstraintBasePtr::isImpacting() { verifyIndex();
return getData()->isImpacting[calculateIndex()]; }
378 AGX_FORCE_INLINE agx::Bool const& ConstraintBasePtr::isImpacting()
const { verifyIndex();
return getData()->isImpacting[calculateIndex()]; }
382 AGX_FORCE_INLINE ConstraintBaseInstance::ConstraintBaseInstance(ConstraintBaseData* data,
agx::Index index) :
agx::Physics::InteractionInstance(data, index) {}
387 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
394 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
405 AGX_FORCE_INLINE agx::UInt& ConstraintBaseInstance::rowIndex() { verifyIndex();
return getData()->rowIndex[getIndex()]; }
406 AGX_FORCE_INLINE agx::UInt const& ConstraintBaseInstance::rowIndex()
const { verifyIndex();
return getData()->rowIndex[getIndex()]; }
409 AGX_FORCE_INLINE agx::UInt const& ConstraintBaseInstance::numRows()
const { verifyIndex();
return getData()->numRows[getIndex()]; }
411 AGX_FORCE_INLINE agx::UInt& ConstraintBaseInstance::jacobianIndex() { verifyIndex();
return getData()->jacobianIndex[getIndex()]; }
412 AGX_FORCE_INLINE agx::UInt const& ConstraintBaseInstance::jacobianIndex()
const { verifyIndex();
return getData()->jacobianIndex[getIndex()]; }
414 AGX_FORCE_INLINE agx::UInt& ConstraintBaseInstance::blockRowIndex() { verifyIndex();
return getData()->blockRowIndex[getIndex()]; }
415 AGX_FORCE_INLINE agx::UInt const& ConstraintBaseInstance::blockRowIndex()
const { verifyIndex();
return getData()->blockRowIndex[getIndex()]; }
417 AGX_FORCE_INLINE agx::Bool& ConstraintBaseInstance::isImpacting() { verifyIndex();
return getData()->isImpacting[getIndex()]; }
418 AGX_FORCE_INLINE agx::Bool const& ConstraintBaseInstance::isImpacting()
const { verifyIndex();
return getData()->isImpacting[getIndex()]; }
431 # pragma warning(pop)
434 #undef AGX_ENTITY_WRAPPER
435 #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...
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
EntityPtr & operator=(const EntityPtr &other)=default
Data storage for a collection of entity instances of a specified EntityModel.
agx::String fullPath() const
void setModel(agx::Model *model)
Set the object model (handled automatically).
Abstract description of the data attributes for the Physics.ConstraintBase entity.
static agxData::EntityStorage * defaultStorage()
static ConstraintBasePtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ScalarAttributeT< agx::UInt > * jacobianIndexAttribute
void construct(agx::Physics::ConstraintBasePtr constraintBase)
ConstraintBaseModel(const agx::String &name="ConstraintBase")
static ConstraintBaseModel * instance()
static agxData::ScalarAttributeT< agx::UInt > * rowIndexAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static agxData::PointerAttributeT< agx::ConstraintImplementation * > * modelAttribute
virtual ~ConstraintBaseModel()
virtual void construct(agxData::EntityPtr instance) override
virtual void configure(agx::TiXmlElement *eEntity) override
virtual void initAttributeAccessors() override
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
static agxData::ScalarAttributeT< agx::Bool > * isImpactingAttribute
static agxData::ScalarAttributeT< agx::UInt > * numRowsAttribute
static agxData::ScalarAttributeT< agx::UInt > * blockRowIndexAttribute
Pointer to a entity instance of type Physics.ConstraintBase.
ConstraintBaseData DataType
const ConstraintBaseData * getData() const
AGXPHYSICS_EXPORT ConstraintBasePtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Bool & isImpacting()
AGXPHYSICS_EXPORT agx::UInt & numRows()
ConstraintBaseInstance InstanceType
AGXPHYSICS_EXPORT agx::UInt & jacobianIndex()
AGXPHYSICS_EXPORT agx::ConstraintImplementation *& model()
ConstraintBaseModel ModelType
AGXPHYSICS_EXPORT agx::ConstraintImplementation *const & model() const
AGXPHYSICS_EXPORT agx::UInt const & numRows() const
AGXPHYSICS_EXPORT ConstraintBasePtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::UInt & rowIndex()
AGXPHYSICS_EXPORT const ConstraintBaseInstance instance() const
AGXPHYSICS_EXPORT ConstraintBaseSemantics * operator->()
AGXPHYSICS_EXPORT agx::Bool const & isImpacting() const
ConstraintBaseData * getData()
AGXPHYSICS_EXPORT ConstraintBaseInstance instance()
AGXPHYSICS_EXPORT agx::UInt const & rowIndex() const
AGXPHYSICS_EXPORT agx::UInt & blockRowIndex()
AGXPHYSICS_EXPORT ConstraintBasePtr()
AGXPHYSICS_EXPORT ConstraintBasePtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::UInt const & jacobianIndex() const
AGXPHYSICS_EXPORT const ConstraintBaseSemantics * operator->() const
AGXPHYSICS_EXPORT agx::UInt const & blockRowIndex() const
Abstract description of the data attributes for the Physics.Interaction entity.
Pointer to a entity instance of type Physics.Interaction.
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())