21#ifndef GENERATED_AGX_PHYSICS_GRAPHNODE_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_GRAPHNODE_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 agxData {
class EntityPtr; }
59 class GraphNodeInstance;
60 class GraphNodeSemantics;
102 virtual void configure(agx::TiXmlElement* eEntity)
override;
110 #ifndef AGX_PHYSICS_GRAPHNODE_DATA_SET_OVERRIDE
111 #define AGX_PHYSICS_GRAPHNODE_DATA_SET
115 GraphNodeInstance operator[] (
size_t index);
143 virtual ~GraphNodeData() {}
144 virtual void setNumElements(
agx::Index numElements)
override;
147 GraphNodeData& operator= (
const GraphNodeData&) {
return *
this; }
183 friend class GraphNodePtr;
184 friend class GraphNodeInstance;
185 GraphNodeSemantics();
265 GraphNodeInstance(GraphNodeData* data,
agx::Index index);
270 GraphNodeData* getData();
271 const GraphNodeData* getData()
const;
328 inline GraphNodeInstance
agx::Physics::GraphNodeData::operator[] (
size_t index) {
return GraphNodeInstance(
this, (
agx::Index)index); }
335 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
342 "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\'",
351 EntityPtr::getModel()->fullPath().c_str(), GraphNodeModel::instance()->fullPath().c_str());
359 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
360 EntityPtr::getModel()->fullPath().c_str(), GraphNodeModel::instance()->fullPath().c_str());
366 AGX_FORCE_INLINE GraphNodeSemantics* GraphNodePtr::operator->() {
return (GraphNodeSemantics* )
this; }
367 AGX_FORCE_INLINE const GraphNodeSemantics* GraphNodePtr::operator->()
const {
return (
const GraphNodeSemantics* )
this; }
393 AGX_FORCE_INLINE agx::UInt32 const& GraphNodePtr::subindex()
const { verifyIndex();
return getData()->subindex[calculateIndex()]; }
402 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
409 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
455#undef AGX_ENTITY_WRAPPER
456#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()
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
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.GraphNode entity.
static agxData::ScalarAttributeT< agxData::EntityPtr > * sourceAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * tagAttribute
virtual void construct(agxData::EntityPtr instance) override
static agxData::ScalarAttributeT< agx::UInt8 > * typeAttribute
static GraphNodeModel * instance()
virtual ~GraphNodeModel()
static agxData::ArrayAttributeT< agx::UInt > * edgesAttribute
static agxData::ScalarAttributeT< agx::UInt32 > * islandAttribute
static agxData::EntityStorage * defaultStorage()
static agxData::ScalarAttributeT< agx::UInt8 > * stateAttribute
static GraphNodePtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
static agxData::ScalarAttributeT< agx::UInt32 > * colorAttribute
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
virtual void configure(agx::TiXmlElement *eEntity) override
GraphNodeModel(const agx::String &name="GraphNode")
static agxData::ScalarAttributeT< agx::UInt32 > * subindexAttribute
virtual void initAttributeAccessors() override
void construct(agx::Physics::GraphNodePtr graphNode)
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
Pointer to a entity instance of type Physics.GraphNode.
AGXPHYSICS_EXPORT GraphNodePtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::UInt32 & color()
const GraphNodeData * getData() const
AGXPHYSICS_EXPORT const GraphNodeInstance instance() const
AGXPHYSICS_EXPORT GraphNodeInstance instance()
AGXPHYSICS_EXPORT agx::UInt32 const & color() const
AGXPHYSICS_EXPORT agx::UInt32 & tag()
AGXPHYSICS_EXPORT GraphNodePtr(agxData::EntityStorage *storage, agx::Index id)
AGXPHYSICS_EXPORT agx::UInt32 const & tag() const
AGXPHYSICS_EXPORT agx::UInt8 & type()
GraphNodeInstance InstanceType
AGXPHYSICS_EXPORT agx::UInt8 & state()
AGXPHYSICS_EXPORT agx::UInt32 const & island() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt > & edges()
AGXPHYSICS_EXPORT const GraphNodeSemantics * operator->() const
AGXPHYSICS_EXPORT GraphNodePtr()
AGXPHYSICS_EXPORT agx::UInt32 & island()
AGXPHYSICS_EXPORT agx::UInt32 const & subindex() const
GraphNodeData * getData()
AGXPHYSICS_EXPORT GraphNodePtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::UInt8 const & type() const
AGXPHYSICS_EXPORT agxData::EntityPtr const & source() const
AGXPHYSICS_EXPORT agx::UInt8 const & state() const
AGXPHYSICS_EXPORT agxData::Array< agx::UInt > const & edges() const
AGXPHYSICS_EXPORT agx::UInt32 & subindex()
AGXPHYSICS_EXPORT GraphNodeSemantics * operator->()
AGXPHYSICS_EXPORT agxData::EntityPtr & source()
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.
AGXCORE_EXPORT Type * getType(const agx::String &name)
The agx namespace contains the dynamics/math part of the AGX Dynamics API.