21#ifndef GENERATED_AGX_PHYSICS_SOLVEISLAND_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_SOLVEISLAND_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 )
51namespace agx {
namespace Physics {
class SolveGroupPtr; }}
58 class SolveIslandModel;
59 class SolveIslandData;
61 class SolveIslandInstance;
62 class SolveIslandSemantics;
102 virtual void configure(agx::TiXmlElement* eEntity)
override;
110 #ifndef AGX_PHYSICS_SOLVEISLAND_DATA_SET_OVERRIDE
111 #define AGX_PHYSICS_SOLVEISLAND_DATA_SET
112 class AGXPHYSICS_EXPORT SolveIslandData :
public agx::Physics::InteractionGroupData
115 SolveIslandInstance operator[] (
size_t index);
128 typedef agx::Bool iterativeFrictionRefinementType;
129 typedef agx::UInt directSolveCostEstimateType;
139 virtual ~SolveIslandData() {}
140 virtual void setNumElements(
agx::Index numElements)
override;
143 SolveIslandData& operator= (
const SolveIslandData&) {
return *
this; }
157 agx::Bool const& getIterativeFrictionRefinement()
const;
158 agx::UInt const& getDirectSolveCostEstimate()
const;
159 agx::UInt const& getCurrentIteration()
const;
166 void setIsImpacting(
agx::Bool const& value);
167 void setIterativeFrictionRefinement(
agx::Bool const& value);
168 void setDirectSolveCostEstimate(
agx::UInt const& value);
169 void setCurrentIteration(
agx::UInt const& value);
175 friend class SolveIslandPtr;
176 friend class SolveIslandInstance;
177 SolveIslandSemantics();
246 SolveIslandInstance();
247 SolveIslandInstance(SolveIslandData* data,
agx::Index index);
252 SolveIslandData* getData();
253 const SolveIslandData* getData()
const;
262 agx::Bool& iterativeFrictionRefinement();
264 agx::Bool const& iterativeFrictionRefinement()
const;
269 agx::UInt const& directSolveCostEstimate()
const;
274 agx::UInt const& currentIteration()
const;
300 inline SolveIslandInstance
agx::Physics::SolveIslandData::operator[] (
size_t index) {
return SolveIslandInstance(
this, (
agx::Index)index); }
307 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
314 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
322 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
323 EntityPtr::getModel()->fullPath().c_str(), SolveIslandModel::instance()->fullPath().c_str());
331 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
332 EntityPtr::getModel()->fullPath().c_str(), SolveIslandModel::instance()->fullPath().c_str());
338 AGX_FORCE_INLINE SolveIslandSemantics* SolveIslandPtr::operator->() {
return (SolveIslandSemantics* )
this; }
339 AGX_FORCE_INLINE const SolveIslandSemantics* SolveIslandPtr::operator->()
const {
return (
const SolveIslandSemantics* )
this; }
343 AGX_FORCE_INLINE agx::Bool& SolveIslandPtr::isImpacting() { verifyIndex();
return getData()->isImpacting[calculateIndex()]; }
344 AGX_FORCE_INLINE agx::Bool const& SolveIslandPtr::isImpacting()
const { verifyIndex();
return getData()->isImpacting[calculateIndex()]; }
346 AGX_FORCE_INLINE agx::Bool& SolveIslandPtr::iterativeFrictionRefinement() { verifyIndex();
return getData()->iterativeFrictionRefinement[calculateIndex()]; }
347 AGX_FORCE_INLINE agx::Bool const& SolveIslandPtr::iterativeFrictionRefinement()
const { verifyIndex();
return getData()->iterativeFrictionRefinement[calculateIndex()]; }
349 AGX_FORCE_INLINE agx::UInt& SolveIslandPtr::directSolveCostEstimate() { verifyIndex();
return getData()->directSolveCostEstimate[calculateIndex()]; }
350 AGX_FORCE_INLINE agx::UInt const& SolveIslandPtr::directSolveCostEstimate()
const { verifyIndex();
return getData()->directSolveCostEstimate[calculateIndex()]; }
352 AGX_FORCE_INLINE agx::UInt& SolveIslandPtr::currentIteration() { verifyIndex();
return getData()->currentIteration[calculateIndex()]; }
353 AGX_FORCE_INLINE agx::UInt const& SolveIslandPtr::currentIteration()
const { verifyIndex();
return getData()->currentIteration[calculateIndex()]; }
363 AGX_FORCE_INLINE SolveIslandInstance::SolveIslandInstance(SolveIslandData* data,
agx::Index index) :
agx::Physics::InteractionGroupInstance(data, index) {}
368 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
375 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
383 AGX_FORCE_INLINE agx::Bool& SolveIslandInstance::isImpacting() { verifyIndex();
return getData()->isImpacting[getIndex()]; }
384 AGX_FORCE_INLINE agx::Bool const& SolveIslandInstance::isImpacting()
const { verifyIndex();
return getData()->isImpacting[getIndex()]; }
386 AGX_FORCE_INLINE agx::Bool& SolveIslandInstance::iterativeFrictionRefinement() { verifyIndex();
return getData()->iterativeFrictionRefinement[getIndex()]; }
387 AGX_FORCE_INLINE agx::Bool const& SolveIslandInstance::iterativeFrictionRefinement()
const { verifyIndex();
return getData()->iterativeFrictionRefinement[getIndex()]; }
389 AGX_FORCE_INLINE agx::UInt& SolveIslandInstance::directSolveCostEstimate() { verifyIndex();
return getData()->directSolveCostEstimate[getIndex()]; }
390 AGX_FORCE_INLINE agx::UInt const& SolveIslandInstance::directSolveCostEstimate()
const { verifyIndex();
return getData()->directSolveCostEstimate[getIndex()]; }
392 AGX_FORCE_INLINE agx::UInt& SolveIslandInstance::currentIteration() { verifyIndex();
return getData()->currentIteration[getIndex()]; }
393 AGX_FORCE_INLINE agx::UInt const& SolveIslandInstance::currentIteration()
const { verifyIndex();
return getData()->currentIteration[getIndex()]; }
415#undef AGX_ENTITY_WRAPPER
416#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.InteractionGroup entity.
Pointer to a entity instance of type Physics.InteractionGroup.
Abstract description of the data attributes for the Physics.SolveIsland entity.
static SolveIslandPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ScalarAttributeT< agx::UInt > * directSolveCostEstimateAttribute
static agxData::ScalarAttributeT< agx::UInt > * currentIterationAttribute
static agxData::ScalarAttributeT< agx::Bool > * iterativeFrictionRefinementAttribute
virtual ~SolveIslandModel()
static SolveIslandModel * instance()
SolveIslandModel(const agx::String &name="SolveIsland")
virtual void initAttributeAccessors() override
virtual void construct(agxData::EntityPtr instance) override
static agxData::EntityStorage * defaultStorage()
void construct(agx::Physics::SolveIslandPtr solveIsland)
static agxData::ScalarAttributeT< agx::Bool > * isImpactingAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
static agxData::ArrayAttributeT< agx::Physics::SolveGroupPtr > * groupsAttribute
virtual void configure(agx::TiXmlElement *eEntity) override
static agxData::ArrayAttributeT< agx::UInt32 > * directBodiesAttribute
Pointer to a entity instance of type Physics.SolveIsland.
AGXPHYSICS_EXPORT SolveIslandSemantics * operator->()
AGXPHYSICS_EXPORT const SolveIslandInstance instance() const
AGXPHYSICS_EXPORT SolveIslandPtr(const agxData::EntityPtr &ptr)
SolveIslandData * getData()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > const & directBodies() const
AGXPHYSICS_EXPORT agx::UInt const & currentIteration() const
AGXPHYSICS_EXPORT agxData::Array< agx::Physics::SolveGroupPtr > & groups()
AGXPHYSICS_EXPORT agx::Bool const & isImpacting() const
SolveIslandModel ModelType
AGXPHYSICS_EXPORT agx::Bool & isImpacting()
AGXPHYSICS_EXPORT SolveIslandPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT const SolveIslandSemantics * operator->() const
AGXPHYSICS_EXPORT agx::Bool const & iterativeFrictionRefinement() const
SolveIslandInstance InstanceType
AGXPHYSICS_EXPORT agx::Bool & iterativeFrictionRefinement()
AGXPHYSICS_EXPORT agx::UInt const & directSolveCostEstimate() const
AGXPHYSICS_EXPORT SolveIslandInstance instance()
const SolveIslandData * getData() const
AGXPHYSICS_EXPORT agx::UInt & directSolveCostEstimate()
AGXPHYSICS_EXPORT SolveIslandPtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT SolveIslandPtr()
AGXPHYSICS_EXPORT agx::UInt & currentIteration()
AGXPHYSICS_EXPORT agxData::Array< agx::UInt32 > & directBodies()
AGXPHYSICS_EXPORT agxData::Array< agx::Physics::SolveGroupPtr > const & groups() const
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.