AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
ContactZoneDependencyEntity.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or
9having been advised so by Algoryx Simulation AB for a time limited evaluation,
10or having purchased a valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
18// AUTOMATICALLY GENERATED ENTITY, DO NOT EDIT! //
20
21#ifndef GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CONTACTZONEDEPENDENCY_H_PLUGIN
22#define GENERATED_AGX_PHYSICS_HIERARCHICALGRID_CONTACTZONEDEPENDENCY_H_PLUGIN
23
24#define AGX_ENTITY_WRAPPER 1
25
26
27#ifdef _MSC_VER
28# pragma warning(push)
29// warning C4505: 'agxData::VectorAttributeT<T>::print' : unreferenced local function has been removed
30# pragma warning( disable : 4505 )
31// warning C4251: 'X' : class 'Y' needs to have dll-interface to be used by clients of class 'Z'
32# pragma warning( disable : 4251 )
33// warning C4355: 'this' : used in base member initializer list
34# pragma warning( disable : 4355 )
35// marked as __forceinline not inlined
36# pragma warning( disable: 4714 )
37#endif
38
39#include <agxData/EntityModel.h>
41#include <agxData/EntityRef.h>
42#include <agxData/EntityPtr.h>
44#include <agx/Integer.h>
45#include <agx/Real.h>
46#include <agx/macros.h>
48
49namespace agx { namespace Physics { namespace HierarchicalGrid { class ContactZoneInstance; }}}
50namespace agx { namespace Physics { namespace HierarchicalGrid { class ContactZoneInstance; }}}
51namespace agx { namespace Physics { namespace HierarchicalGrid { class ContactZoneDependencyPtr; }}}
52
53namespace agx
54{
55 namespace Physics
56 {
57 namespace HierarchicalGrid
58 {
59
60 class ContactZoneDependencyModel;
61 class ContactZoneDependencyData;
62 class ContactZoneDependencyPtr;
63 class ContactZoneDependencyInstance;
64 class ContactZoneDependencySemantics;
65
66
68
73 {
74 public:
76
77 ContactZoneDependencyModel(const agx::String& name = "ContactZoneDependency");
78
81
84
87
89 virtual void shutdownCleanup() override;
90
91
92
93 /* Attributes */
97
98 protected:
100 virtual agxData::EntityData* createData(agxData::EntityStorage* storage) override;
101 virtual void configure(agx::TiXmlElement* eEntity) override;
102 virtual void initAttributeAccessors() override;
103 virtual void construct(agxData::EntityPtr instance) override;
105 };
106
107
109 #ifndef AGX_PHYSICS_HIERARCHICALGRID_CONTACTZONEDEPENDENCY_DATA_SET_OVERRIDE
110 #define AGX_PHYSICS_HIERARCHICALGRID_CONTACTZONEDEPENDENCY_DATA_SET
111 class AGXPHYSICS_EXPORT ContactZoneDependencyData : public agxData::EntityData
112 {
113 public:
114 ContactZoneDependencyInstance operator[] (size_t index);
115
116 public:
121
122 public:
123 typedef agx::Physics::HierarchicalGrid::ContactZoneInstance parentType;
124 typedef agx::Physics::HierarchicalGrid::ContactZoneInstance childType;
126
127 public:
128 ContactZoneDependencyData(agxData::EntityStorage* storage);
129 ContactZoneDependencyData();
130
131 protected:
132 virtual ~ContactZoneDependencyData() {}
133 virtual void setNumElements(agx::Index numElements) override;
134
135 private:
136 ContactZoneDependencyData& operator= (const ContactZoneDependencyData&) { return *this; }
137
138 };
139 #endif
141
142
144 class AGXPHYSICS_EXPORT ContactZoneDependencySemantics : protected agxData::EntityPtr
145 {
146 public:
147
148 // Automatic getters
149 agx::Physics::HierarchicalGrid::ContactZoneInstance const& getParent() const;
150 agx::Physics::HierarchicalGrid::ContactZoneInstance const& getChild() const;
152
153 // Semantics defined by explicit kernels
154
155 // Automatic setters
156 void setParent(agx::Physics::HierarchicalGrid::ContactZoneInstance const& value);
157 void setChild(agx::Physics::HierarchicalGrid::ContactZoneInstance const& value);
159
160
161 protected:
162 friend class ContactZoneDependencyPtr;
163 friend class ContactZoneDependencyInstance;
164 ContactZoneDependencySemantics();
165 };
167
168
169
172 class CALLABLE ContactZoneDependencyPtr : public agxData::EntityPtr
173 {
174 public:
176 typedef ContactZoneDependencyData DataType;
177 typedef ContactZoneDependencyInstance InstanceType;
178
179 public:
186 AGXPHYSICS_EXPORT ContactZoneDependencyInstance instance();
187 AGXPHYSICS_EXPORT const ContactZoneDependencyInstance instance() const;
188
189 AGXPHYSICS_EXPORT ContactZoneDependencySemantics* operator->();
190 AGXPHYSICS_EXPORT const ContactZoneDependencySemantics* operator->() const;
191
192 ContactZoneDependencyData* getData();
193 const ContactZoneDependencyData* getData() const;
194
195
197 AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneInstance& parent();
199 AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneInstance const& parent() const;
200
202 AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneInstance& child();
204 AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneInstance const& child() const;
205
210
211 };
212
213
215 class AGXPHYSICS_EXPORT ContactZoneDependencyInstance : public agxData::EntityInstance
216 {
217 public:
218 ContactZoneDependencyInstance();
219 ContactZoneDependencyInstance(ContactZoneDependencyData* data, agx::Index index);
220 ContactZoneDependencyInstance(agxData::EntityStorage *storage, agx::Index index);
221 ContactZoneDependencyInstance(const agxData::EntityInstance& other);
222 ContactZoneDependencyInstance(const agxData::EntityPtr& ptr);
223
224 ContactZoneDependencyData* getData();
225 const ContactZoneDependencyData* getData() const;
226
227 public:
229 agx::Physics::HierarchicalGrid::ContactZoneInstance& parent();
231 agx::Physics::HierarchicalGrid::ContactZoneInstance const& parent() const;
232
234 agx::Physics::HierarchicalGrid::ContactZoneInstance& child();
236 agx::Physics::HierarchicalGrid::ContactZoneInstance const& child() const;
237
242
243 };
245
246
247
250
251
252
254 /* Implementation */
255 //-----------------------------------------------------------------------------------------------------
256 //-----------------------------------------------------------------------------------------------------
257 inline ContactZoneDependencyInstance agx::Physics::HierarchicalGrid::ContactZoneDependencyData::operator[] (size_t index) { return ContactZoneDependencyInstance(this, (agx::Index)index); }
258 //-----------------------------------------------------------------------------------------------------
261 AGX_FORCE_INLINE ContactZoneDependencyPtr::ContactZoneDependencyPtr(const agxData::EntityPtr& ptr) : agxData::EntityPtr(ptr)
262 {
264 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
265 EntityPtr::getModel()->fullPath().c_str(), ContactZoneDependencyModel::instance()->fullPath().c_str());
266 }
267
268 AGX_FORCE_INLINE ContactZoneDependencyPtr::ContactZoneDependencyPtr(const agxData::EntityInstance& instance) : agxData::EntityPtr(instance)
269 {
271 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
272 EntityPtr::getModel()->fullPath().c_str(), ContactZoneDependencyModel::instance()->fullPath().c_str());
273 }
274
275 AGX_FORCE_INLINE ContactZoneDependencyPtr& ContactZoneDependencyPtr::operator= (const agxData::EntityPtr& ptr)
276 {
278 agxAssertN(!ptr || ptr.isInstanceOf(ContactZoneDependencyModel::instance()),
279 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
280 EntityPtr::getModel()->fullPath().c_str(), ContactZoneDependencyModel::instance()->fullPath().c_str());
281 return *this;
282 }
283
284 AGX_FORCE_INLINE ContactZoneDependencyPtr& ContactZoneDependencyPtr::operator= (const agxData::EntityInstance& instance)
285 {
287 agxAssertN(!instance || instance.isInstanceOf(ContactZoneDependencyModel::instance()),
288 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
289 EntityPtr::getModel()->fullPath().c_str(), ContactZoneDependencyModel::instance()->fullPath().c_str());
290 return *this;
291 }
292
293 inline ContactZoneDependencyInstance ContactZoneDependencyPtr::instance() { return agxData::EntityPtr::instance(); }
294 inline const ContactZoneDependencyInstance ContactZoneDependencyPtr::instance() const { return agxData::EntityPtr::instance(); }
295 AGX_FORCE_INLINE ContactZoneDependencySemantics* ContactZoneDependencyPtr::operator->() { return (ContactZoneDependencySemantics* )this; }
296 AGX_FORCE_INLINE const ContactZoneDependencySemantics* ContactZoneDependencyPtr::operator->() const { return (const ContactZoneDependencySemantics* )this; }
297 AGX_FORCE_INLINE ContactZoneDependencyData* ContactZoneDependencyPtr::getData() { return static_cast<ContactZoneDependencyData* >(agxData::EntityPtr::getData()); }
298 AGX_FORCE_INLINE const ContactZoneDependencyData* ContactZoneDependencyPtr::getData() const { return static_cast<const ContactZoneDependencyData* >(agxData::EntityPtr::getData()); }
299
300 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneInstance& ContactZoneDependencyPtr::parent() { verifyIndex(); return getData()->parent[calculateIndex()]; }
301 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneInstance const& ContactZoneDependencyPtr::parent() const { verifyIndex(); return getData()->parent[calculateIndex()]; }
302
303 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneInstance& ContactZoneDependencyPtr::child() { verifyIndex(); return getData()->child[calculateIndex()]; }
304 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneInstance const& ContactZoneDependencyPtr::child() const { verifyIndex(); return getData()->child[calculateIndex()]; }
305
306 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr& ContactZoneDependencyPtr::next() { verifyIndex(); return getData()->next[calculateIndex()]; }
307 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& ContactZoneDependencyPtr::next() const { verifyIndex(); return getData()->next[calculateIndex()]; }
308
309 //-----------------------------------------------------------------------------------------------------
310 AGX_FORCE_INLINE ContactZoneDependencyInstance::ContactZoneDependencyInstance() {}
311 AGX_FORCE_INLINE ContactZoneDependencyInstance::ContactZoneDependencyInstance(ContactZoneDependencyData* data, agx::Index index) : agxData::EntityInstance(data, index) {}
312 AGX_FORCE_INLINE ContactZoneDependencyInstance::ContactZoneDependencyInstance(agxData::EntityStorage* storage, agx::Index index) : agxData::EntityInstance(storage, index) {}
313 AGX_FORCE_INLINE ContactZoneDependencyInstance::ContactZoneDependencyInstance(const agxData::EntityInstance& other) : agxData::EntityInstance(other)
314 {
316 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
317 EntityInstance::getModel()->fullPath().c_str(), ContactZoneDependencyModel::instance()->fullPath().c_str());
318 }
319
320 AGX_FORCE_INLINE ContactZoneDependencyInstance::ContactZoneDependencyInstance(const agxData::EntityPtr& ptr) : agxData::EntityInstance(ptr)
321 {
323 "Entity type mismatch. Storage contains entity data for type \'%s\', instance pointer is of type \'%s\'",
324 EntityInstance::getModel()->fullPath().c_str(), ContactZoneDependencyModel::instance()->fullPath().c_str());
325 }
326
327
328 AGX_FORCE_INLINE ContactZoneDependencyData* ContactZoneDependencyInstance::getData() { return static_cast<ContactZoneDependencyData* >(agxData::EntityInstance::getData()); }
329 AGX_FORCE_INLINE const ContactZoneDependencyData* ContactZoneDependencyInstance::getData() const { return static_cast<const ContactZoneDependencyData* >(agxData::EntityInstance::getData()); }
330
331 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneInstance& ContactZoneDependencyInstance::parent() { verifyIndex(); return getData()->parent[getIndex()]; }
332 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneInstance const& ContactZoneDependencyInstance::parent() const { verifyIndex(); return getData()->parent[getIndex()]; }
333
334 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneInstance& ContactZoneDependencyInstance::child() { verifyIndex(); return getData()->child[getIndex()]; }
335 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneInstance const& ContactZoneDependencyInstance::child() const { verifyIndex(); return getData()->child[getIndex()]; }
336
337 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr& ContactZoneDependencyInstance::next() { verifyIndex(); return getData()->next[getIndex()]; }
338 AGX_FORCE_INLINE agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const& ContactZoneDependencyInstance::next() const { verifyIndex(); return getData()->next[getIndex()]; }
339
340 //-----------------------------------------------------------------------------------------------------
341 AGX_FORCE_INLINE ContactZoneDependencySemantics::ContactZoneDependencySemantics() {}
342 //-----------------------------------------------------------------------------------------------------
344 }
345 }
346}
347
348AGX_TYPE_BINDING(agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr, "Physics.HierarchicalGrid.ContactZoneDependencyPtr")
349AGX_TYPE_BINDING(agx::Physics::HierarchicalGrid::ContactZoneDependencyInstance, "Physics.HierarchicalGrid.ContactZoneDependencyInstance")
350
351#ifdef _MSC_VER
352# pragma warning(pop)
353#endif
354
355#undef AGX_ENTITY_WRAPPER
356#undef AGX_ENTITY_NAMESPACE
357#endif
358
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGX_TYPE_BINDING(_Type, _Name)
Definition: Type.h:179
#define AGXPHYSICS_EXPORT
Type-specific Array used for fast access into the data held by a Buffer.
Definition: Array.h:107
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...
Definition: EntityModel.h:64
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
Definition: EntityPtr.h:52
EntityPtr & operator=(const EntityPtr &other)=default
bool isInstanceOf(agxData::EntityModel *model) const
agxData::EntityData * getData()
agxData::EntityInstance instance()
Definition: EntityPtr.h:269
Data storage for a collection of entity instances of a specified EntityModel.
Definition: EntityStorage.h:73
agx::String fullPath() const
Abstract description of the data attributes for the Physics.HierarchicalGrid.ContactZoneDependency en...
static ContactZoneDependencyPtr createInstance()
Create and return a pointer to a new instance in the default storage for this entity model.
virtual void shutdownCleanup() override
This is part of internal cleanup and should not be called by users.
virtual void configure(agx::TiXmlElement *eEntity) override
void construct(agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr contactZoneDependency)
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr > * nextAttribute
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::ContactZoneInstance > * parentAttribute
static ContactZoneDependencyModel * instance()
static agxData::ScalarAttributeT< agx::Physics::HierarchicalGrid::ContactZoneInstance > * childAttribute
virtual agxData::EntityData * createData(agxData::EntityStorage *storage) override
virtual void construct(agxData::EntityPtr instance) override
ContactZoneDependencyModel(const agx::String &name="ContactZoneDependency")
Pointer to a entity instance of type Physics.HierarchicalGrid.ContactZoneDependency.
AGXPHYSICS_EXPORT ContactZoneDependencySemantics * operator->()
AGXPHYSICS_EXPORT const ContactZoneDependencySemantics * operator->() const
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneInstance & child()
AGXPHYSICS_EXPORT ContactZoneDependencyPtr(agxData::EntityStorage *storage, agx::Index id)
const ContactZoneDependencyData * getData() const
AGXPHYSICS_EXPORT const ContactZoneDependencyInstance instance() const
AGXPHYSICS_EXPORT ContactZoneDependencyPtr(const agxData::EntityInstance &instance)
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneInstance const & parent() const
AGXPHYSICS_EXPORT ContactZoneDependencyPtr(const agxData::EntityPtr &ptr)
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneInstance & parent()
AGXPHYSICS_EXPORT ContactZoneDependencyInstance instance()
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneInstance const & child() const
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr const & next() const
AGXPHYSICS_EXPORT agx::Physics::HierarchicalGrid::ContactZoneDependencyPtr & next()
Vector containing 'raw' data.
Definition: agx/Vector.h:246
#define agxAssertN(expr, format,...)
Definition: debug.h:145
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define CALLABLE
Definition: macros.h:72
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
#define AGX_FORCE_INLINE
Definition: macros.h:58
Contains classes for low level data storage for AGX.
Definition: Container.h:23
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
UInt32 Index
Definition: Integer.h:44