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;
86 virtual void shutdownCleanup()
override;
101 virtual void configure(agx::TiXmlElement* eEntity)
override;
102 virtual void initAttributeAccessors()
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);
175 friend class ConstraintBaseInstance;
176 ConstraintBaseSemantics();
204 ConstraintBaseData* getData();
205 const ConstraintBaseData* getData()
const;
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\'",
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()]; }
428 AGX_TYPE_BINDING(agx::Physics::ConstraintBaseInstance,
"Physics.ConstraintBaseInstance")
431 # pragma warning(pop) 434 #undef AGX_ENTITY_WRAPPER 435 #undef AGX_ENTITY_NAMESPACE agxData::EntityData * getData()
void setModel(agx::Model *model)
Set the object model (handled automatically).
agxData::EntityInstance instance()
static agxData::ScalarAttributeT< agx::Bool > * isImpactingAttribute
Data storage for a collection of entity instances of a specified EntityModel.
#define agxAssertN(expr, format,...)
agxData::EntityData * getData()
agx::String fullPath() const
#define AGX_TYPE_BINDING(_Type, _Name)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
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...
#define AGX_DECLARE_POINTER_TYPES(type)
bool isInstanceOf(agxData::EntityModel *model) const
AGXPHYSICS_EXPORT ConstraintBasePtr & operator=(const agxData::EntityPtr &ptr)
static agxData::ScalarAttributeT< agx::UInt > * rowIndexAttribute
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.
AGXPHYSICS_EXPORT ConstraintBaseSemantics * operator->()
ConstraintBaseModel ModelType
static agxData::ScalarAttributeT< agx::UInt > * numRowsAttribute
ConstraintBaseData DataType
Vector containing 'raw' data.
EntityPtr & operator=(const EntityPtr &other)=default
Namespace agx contains the dynamics/math part of the AGX Dynamics API.
Abstract description of the data attributes for the Physics.ConstraintBase entity.
static ConstraintBaseModel * instance()
AGXPHYSICS_EXPORT agx::Bool & isImpacting()
Contains classes for low level data storage for AGX.
Pointer to a entity instance of type Physics.ConstraintBase.
static agxData::ScalarAttributeT< agx::UInt > * blockRowIndexAttribute
static agxData::PointerAttributeT< agx::ConstraintImplementation * > * modelAttribute
AGXPHYSICS_EXPORT agx::UInt & rowIndex()
AGXPHYSICS_EXPORT agx::ConstraintImplementation *& model()
static agxData::ScalarAttributeT< agx::UInt > * jacobianIndexAttribute
ConstraintBaseData * getData()
AGXPHYSICS_EXPORT ConstraintBasePtr()
bool isInstanceOf(agxData::EntityModel *model) const
AGXPHYSICS_EXPORT agx::UInt & blockRowIndex()
ConstraintBaseInstance InstanceType
AGXPHYSICS_EXPORT agx::UInt & numRows()
#define DOXYGEN_END_INTERNAL_BLOCK()
AGXPHYSICS_EXPORT agx::UInt & jacobianIndex()
#define DOXYGEN_START_INTERNAL_BLOCK()
AGXPHYSICS_EXPORT ConstraintBaseInstance instance()