AGX Dynamics  2.37.3.2
Parameter.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGX_PARAMETER_H
18 #define AGX_PARAMETER_H
19 
20 #ifdef _MSC_VER
21 # pragma warning( disable: 4714 )// const' marked as __forceinline not inlined
22 #endif
23 
24 
25 #include <agx/Object.h>
26 #include <agxData/Value.h>
27 #include <agx/Pointer.h>
28 #include <agxData/Buffer.h>
29 #include <agxData/EntityModel.h>
30 #include <agxData/EntityStorage.h>
31 
32 namespace agxData { class FunctionValue; }
33 
34 namespace agx
35 {
36  class Task;
45 
54 
56 
62  {
63  public:
64  static agx::Model *ClassModel();
65 
67  Event bindEvent;
68  Event unbindEvent;
69  Event updateEvent;
70 
72  enum MetaType
73  {
80  UNRESOLVED
81  };
82 
83  public:
87  agx::Task *getTask();
88  const agx::Task *getTask() const;
89 
93  size_t getIndex() const;
94 
98  MetaType getMetaType() const;
99 
103  const agx::String& getMetaTypeName() const;
104 
108  bool isRequired() const;
109 
113  void setRequired(bool flag);
114 
119  const agxData::Format *getFormat() const;
120 
124  virtual agxData::Type* getType();
125  virtual const agxData::Type* getType() const;
126 
130  UInt8 getAccessMode() const;
131 
135  const agx::Path& getBindPath() const;
136 
140  // bool isValid() const;
141  virtual bool isValid() const = 0;
142 
146  agx::Object *getBinding();
147  const agx::Object *getBinding() const;
148 
149 
153  void bind(agx::Object *binding);
154 
158  void bind(const agx::Path& path);
159 
163  void set(agx::Object *binding);
164 
168  void unbind();
169 
171  virtual bool hasGlobalResult() const;
172 
173 
174  virtual void rebind() override;
175  virtual Object *getResourceImpl(const Path& path, agx::Model *model) override;
176 
177  virtual void update() = 0;
178  virtual void commit() = 0;
179 
180  bool needUpdate();
181  bool needCommit();
182 
183  protected:
184  Parameter(Model *model, MetaType type, const Name& name, agxData::Format *format, UInt8 accessMode, const Path& bindPath = Path());
185  virtual ~Parameter();
186  virtual void _bind(Object *binding) = 0;
187 
188  private:
189  Parameter& operator=(const Parameter&) = delete;
190  friend class Task;
192  friend class EntityDataParameter;
193  void setTask(Task *task, size_t index);
194 
195  virtual void prepareGlobalResultSorting(size_t numJobs);
196 
197  protected:
199  size_t m_index;
208  };
209 
210  //---------------------------------------------------------------
211 
216  {
217  public:
218  static agx::Model *ClassModel();
219 
220  static UnresolvedParameter *load(TiXmlElement *eParameter, Device *device);
221  virtual void configure(TiXmlElement *eParameter) override;
222 
223  public:
224  UnresolvedParameter(const agx::Name& name, const agx::String& expression);
225  UnresolvedParameter(const agx::Name& name, MetaType type, const agx::String& expression);
226 
227  virtual bool isValid() const override;
228 
229  agxData::Type *getType() override;
230  const agxData::Type *getType() const override;
231 
232  protected:
233  virtual ~UnresolvedParameter();
234  virtual void _bind(Object *binding) override;
235  virtual void update() override;
236  virtual void commit() override;
237  void triggerUpdateCallback(agxData::Value *value);
238  void init(const String& expression);
239 
240  private:
241  UnresolvedParameter& operator=(const UnresolvedParameter&) = delete;
242 
243  private:
244  agxData::TypeRef m_type;
245  agxData::Value::Event::CallbackType m_updateCallback;
246  agxData::ValueRef m_localValue;
247  };
248 
249 
250  //---------------------------------------------------------------
251 
256  {
257  public:
258  static agx::Model *ClassModel();
259 
260  static ScalarParameter *load(TiXmlElement *eParameter, Device *device);
261  virtual void configure(TiXmlElement *eParameter) override;
262 
263  public:
264  ScalarParameter(const agx::Name& name, agxData::Format *format, UInt8 accessMode = agxData::READ, const String& expression = "");
265  ScalarParameter(const agx::Name& name, agxData::Format *format, UInt8 accessMode, agxData::Value *binding);
266 
270  agxData::Value *getValue();
271  const agxData::Value *getValue() const;
272 
273  template <typename T>
274  const T& get() const;
275 
279  void set(agxData::Value *value);
280 
281  template <typename T>
282  void set(const T& value);
283 
285  template <typename T>
286  void write(const T& value, const Task* owner);
287 
291  void setExpression(const String& expression);
292 
293 
294  // Only used by kernel dispatching
295  void *ptr();
296 
297  virtual bool isValid() const override;
298  virtual Object *getResourceImpl(const Path& path, agx::Model *model) override;
299 
300 
301  void setReal( Real value );
302  Real getReal();
303 
304  virtual void update() override;
305  virtual void commit() override;
306 
307  protected:
308  virtual ~ScalarParameter();
309  virtual void _bind(Object *binding) override;
310 
311  private:
312  ScalarParameter& operator=(const ScalarParameter&) = delete;
313  void init();
314  void triggerUpdateCallback(agxData::Value *value);
315 
316  private:
317  // Parameter value is never replaced, binding the parameter will bind the value.
318  agxData::ValueRef m_value;
319 
320  agxData::Value::Event::CallbackType m_updateCallback;
321  };
322 
323  //---------------------------------------------------------------
324 
329  {
330  public:
331  static agx::Model *ClassModel();
332 
333 
334  static ArrayParameter *load(TiXmlElement *eParameter, Device *device);
335  virtual void configure(TiXmlElement *eParameter) override;
336 
337  public:
338  ArrayParameter(const agx::Name& name, agxData::Type *type, UInt8 accessMode = agxData::READ, const Path& bindPath = Path());
339  ArrayParameter(const agx::Name& name, agxData::Type *type, UInt8 accessMode, agxData::Buffer *binding);
340 
341  ArrayParameter(const agx::Name& name, agxData::Format *format, UInt8 accessMode = agxData::READ, const Path& bindPath = Path());
342  ArrayParameter(const agx::Name& name, agxData::Format *format, UInt8 accessMode, agxData::Buffer *binding);
343 
347  agxData::Type *getType() override;
348  const agxData::Type *getType() const override;
349 
353  agxData::Buffer *getBuffer();
354  const agxData::Buffer *getBuffer() const;
355 
359  template <typename T>
360  agxData::Array<T>& get();
361 
362  template <typename T>
363  const agxData::Array<T>& get() const;
364 
368  void setLocalSize(size_t numElements);
369 
373  size_t getLocalSize() const;
374 
378  size_t getNumElements() const;
379 
380 
384  void setGlobalResultMode(UInt mode);
385 
389  UInt getGlobalResultMode() const;
390 
394  GlobalResultBuffer *getGlobalResult();
395  const GlobalResultBuffer *getGlobalResult() const;
396 
397  virtual bool hasGlobalResult() const override;
398 
399 
400  virtual bool isValid() const override;
401  virtual Object *getResourceImpl(const Path& path, agx::Model *model) override;
402 
403  virtual void update() override;
404  virtual void commit() override;
405 
406  protected:
407  virtual ~ArrayParameter();
408  virtual void _bind(Object *binding) override;
409  virtual void prepareGlobalResultSorting(size_t numJobs) override;
410 
411  private:
412  ArrayParameter& operator=(const ArrayParameter&) = delete;
413  friend class Task;
414  void parentBindCallback(Parameter *parent);
415  void parentUnbindCallback(Parameter *parent);
416  void setBuffer(agxData::Buffer *buffer);
417 
418  private:
419  static agxData::AbstractArray s_dummyArray;
420  agxData::TypeRef m_type;
421  agxData::BufferObserver m_buffer;
422  size_t m_localMemorySize;
423  UInt m_globalResultMode;
424  GlobalResultBufferRef m_globalResult;
425  Parameter::Event::CallbackType m_parentBindCallback;
426  Parameter::Event::CallbackType m_parentUnbindCallback;
427  };
428 
429  //---------------------------------------------------------------
430 
434  class AGXCORE_EXPORT PointerParameter : public Parameter, public Object::EventListener
435  {
436  public:
437  static agx::Model *ClassModel();
438 
439  static PointerParameter *load(TiXmlElement *eParameter, Device *device);
440  virtual void configure(TiXmlElement *eParameter) override;
441 
442  public:
443  PointerParameter(const agx::Name& name, const Path& bindPath = Path());
444  PointerParameter(const agx::Name& name, Object *binding);
445 
446  Object* get();
447  const Object* get() const;
448 
449  template <typename T>
450  T* get();
451 
452  template <typename T>
453  const T* get() const;
454 
455  virtual bool isValid() const override;
456  virtual Object *getResourceImpl(const Path& path, agx::Model *model) override;
457 
458  virtual void update() override;
459  virtual void commit() override;
460 
461  protected:
462  virtual ~PointerParameter();
463  virtual void _bind(Object *binding) override;
464 
465  // From Object::EventListener
466  virtual void destroyCallback(agx::Object* object) override;
467 
468  private:
469  PointerParameter& operator=(const PointerParameter&) = delete;
470  void init();
471  void triggerUpdateCallback(agxData::Value *value);
472 
473  private:
474  agxData::Value::Event::CallbackType m_updateCallback;
475  };
476 
477  //---------------------------------------------------------------
478 
483  {
484  public:
485  static agx::Model *ClassModel();
486 
487 
488  static EntityDataParameter *load(TiXmlElement *eParameter, Device *device);
489  virtual void configure(TiXmlElement *eParameter) override;
490 
491  public:
492  EntityDataParameter(const agx::Name& name, agxData::EntityModel *entity, const Path& bindPath);
493 
494  void addChildParameter(ArrayParameter *parameter);
495  void addChildParameter(ScalarParameter* parameter);
496 
500  agxData::EntityModel *getEntityModel();
501 
506 
510  agxData::EntityData *getData();
511 
512  template <typename T>
513  T& getData();
514 
518  void setGlobalResultMode(UInt mode);
519 
523  UInt getGlobalResultMode() const;
524 
528  GlobalResultStorage *getGlobalResult();
529  const GlobalResultStorage *getGlobalResult() const;
530 
531  // Only used by KernelGenerator for non-required parameters to set up a dummy binding
532  void setData(agxData::EntityData *dataSet);
533 
534  const ParameterRefVector& getChildParameters() const;
535 
536  virtual bool isValid() const override;
537  virtual Object *getResourceImpl(const Path& path, agx::Model *model) override;
538 
539  virtual void update() override;
540  virtual void commit() override;
541 
542  virtual bool hasGlobalResult() const override;
543 
544  protected:
545  virtual ~EntityDataParameter();
546  virtual void _bind(Object *binding) override;
547  virtual void prepareGlobalResultSorting(size_t numJobs) override;
548 
549  // Protected because only Scalar- and ArrayParameters may be added.
550  void addChildParameter(Parameter* parameter);
551 
552  private:
553  EntityDataParameter& operator=(const EntityDataParameter&) = delete;
554 
555  private:
556  agxData::EntityModelRef m_entityModel;
557  agxData::EntityStorageRef m_storage;
558  agxData::EntityDataRef m_dataSet;
559  ParameterRefVector m_children;
560  UInt m_globalResultMode;
561  GlobalResultStorageRef m_globalResult;
562  bool m_childrenNeedCommit;
563  };
564 
565 
570  {
571  public:
572  static agx::Model *ClassModel();
573 
574  static EntityPtrParameter *load(TiXmlElement *eParameter, Device *device);
575  virtual void configure(TiXmlElement *eParameter) override;
576 
577  public:
578  EntityPtrParameter(const agx::Name& name, agxData::EntityModel *entity);
579 
580  void registerAttributeAccess(const agxData::Attribute *attribute, agx::UInt8 mode);
581 
582  void bind(agxData::EntityPtr ptr);
583 
587  agxData::EntityModel *getEntityModel();
588 
592  agxData::EntityPtr getBinding();
593 
594  template <typename T>
595  T getBinding();
596 
597 
598  virtual bool isValid() const override;
599 
600  virtual void update() override;
601  virtual void commit() override;
602 
603  protected:
604  virtual ~EntityPtrParameter();
605  virtual void _bind(Object *binding) override;
606 
607  private:
608  EntityPtrParameter& operator=(EntityPtrParameter&) = delete;
609 
610  private:
611  agxData::EntityModelRef m_entityModel;
612  agxData::EntityPtr m_ptr;
613 
614  struct AttributeAccess
615  {
616  AttributeAccess() : attribute(nullptr), buffer(nullptr), mode(agx::InvalidIndex) {}
617  AttributeAccess(const agxData::Attribute *_attribute, agx::UInt8 _mode) : attribute(_attribute), buffer(nullptr), mode(_mode) {}
618 
619  const agxData::Attribute *attribute;
620  agxData::Buffer *buffer;
621  agx::UInt8 mode;
622  };
623 
624  VectorPOD<AttributeAccess> m_attributeAccessVector;
625  };
626 
627 
632  {
633  public:
634  static agx::Model *ClassModel();
635 
636  static EntityInstanceParameter *load(TiXmlElement *eParameter, Device *device);
637  virtual void configure(TiXmlElement *eParameter) override;
638 
639  public:
641 
642  void registerAttributeAccess(const agxData::Attribute *attribute, agx::UInt8 mode);
643 
644  void bind(agxData::EntityInstance instance);
645 
649  agxData::EntityModel *getEntityModel();
650 
654  agxData::EntityInstance getBinding();
655 
656  template <typename T>
657  T getBinding();
658 
659 
660  virtual bool isValid() const override;
661 
662  virtual void update() override;
663  virtual void commit() override;
664 
665  protected:
666  virtual ~EntityInstanceParameter();
667  virtual void _bind(Object *binding) override;
668 
669  private:
670  EntityInstanceParameter& operator=(const EntityInstanceParameter&) = delete;
671 
672  private:
673  agxData::EntityModelRef m_entityModel;
674  agxData::EntityInstance m_instance;
675 
676  struct AttributeAccess
677  {
678  AttributeAccess() : attribute(nullptr), buffer(nullptr), mode(agx::InvalidIndex) {}
679  AttributeAccess(const agxData::Attribute *_attribute, agx::UInt8 _mode) : attribute(_attribute), buffer(nullptr), mode(_mode) {}
680 
681  const agxData::Attribute *attribute;
682  agxData::Buffer *buffer;
683  agx::UInt8 mode;
684  };
685 
686  VectorPOD<AttributeAccess> m_attributeAccessVector;
687  };
688 
689 
690  //---------------------------------------------------------------
691 
692 
693  /* Implementation */
694 
695  AGX_FORCE_INLINE Task *Parameter::getTask() { return m_task; }
696  AGX_FORCE_INLINE const Task *Parameter::getTask() const { return m_task; }
697  AGX_FORCE_INLINE size_t Parameter::getIndex() const { return m_index; }
698  AGX_FORCE_INLINE Parameter::MetaType Parameter::getMetaType() const { return (MetaType)m_metaType; }
699  AGX_FORCE_INLINE bool Parameter::isRequired() const { return m_required; }
701  AGX_FORCE_INLINE const agxData::Format *Parameter::getFormat() const { return m_format; }
702  AGX_FORCE_INLINE UInt8 Parameter::getAccessMode() const { return m_accessMode; }
703  AGX_FORCE_INLINE const Path& Parameter::getBindPath() const { return m_bindPath; }
704  AGX_FORCE_INLINE Object *Parameter::getBinding() { return m_binding; }
705  AGX_FORCE_INLINE const Object *Parameter::getBinding() const { return m_binding; }
706  AGX_FORCE_INLINE agxData::Type *Parameter::getType() { return m_format ? m_format->getType() : nullptr; }
707  AGX_FORCE_INLINE const agxData::Type *Parameter::getType() const { return m_format ? m_format->getType() : nullptr; }
708  AGX_FORCE_INLINE bool Parameter::needUpdate() { return m_needUpdate; }
709  AGX_FORCE_INLINE bool Parameter::needCommit() { return m_needCommit; }
710 
712 
713  AGX_FORCE_INLINE agxData::Value *ScalarParameter::getValue() { return m_value; }
714  AGX_FORCE_INLINE const agxData::Value *ScalarParameter::getValue() const { return m_value; }
715 
716  template <typename T>
717  AGX_FORCE_INLINE const T& ScalarParameter::get() const
718  {
719  agxAssertN(agxData::getFormat<T>() == m_format, "%s: Type mismatch, parameter is type %s, dereferencing using type %s", this->getPath().c_str(), m_format->fullName().c_str(), agxData::getFormat<T>()->fullName().c_str());
720  agxAssertN(m_value && m_value->isValid(), "%s: Can not dereference an unbound parameter", this->getPath().c_str());
721  return m_value->get<T>();
722  }
723 
724  template <typename T>
725  AGX_FORCE_INLINE void ScalarParameter::set(const T& value)
726  {
727  if (m_binding.get() != m_value.get())
728  {
729  this->unbind();
730  m_binding = m_value;
731  }
732  m_value->set(value);
733  }
734 
735  template <typename T>
736 #ifdef AGX_DEBUG
737 AGX_FORCE_INLINE void ScalarParameter::write(const T& value, const Task* owner)
738 #else
739 AGX_FORCE_INLINE void ScalarParameter::write(const T& value, const Task* /*owner*/)
740 #endif
741  {
742  agxAssert(owner == this->getTask());
743  agxAssert(m_format->is(agxData::getFormat<T>()));
744  *(T*)this->ptr() = value;
745  }
746 
747  AGX_FORCE_INLINE void *ScalarParameter::ptr()
748  {
749  return const_cast<void *>(m_value->ptr());
750  }
751 
752 
753  AGX_FORCE_INLINE void ScalarParameter::setReal( Real value )
754  {
755  this->set( value );
756  }
757 
758  AGX_FORCE_INLINE Real ScalarParameter::getReal()
759  {
760  return this->get<Real>();
761  }
762 
764 
765  AGX_FORCE_INLINE agxData::Buffer *ArrayParameter::getBuffer() { return m_buffer; }
766  AGX_FORCE_INLINE const agxData::Buffer *ArrayParameter::getBuffer() const { return m_buffer; }
768  AGX_FORCE_INLINE const agxData::Type *ArrayParameter::getType() const { return m_type; }
769 
770  template <typename T>
771  AGX_FORCE_INLINE agxData::Array<T>& ArrayParameter::get()
772  {
773  agxAssertN(!m_required || m_buffer, "%s: Can not dereference an unbound array parameter", this->getPath().c_str());
774  agxAssertN(agxData::getFormat<T>() == m_format, "%s: Type mismatch, parameter is type %s, dereferencing using type %s", this->getPath().c_str(), m_format->fullName().c_str(), agxData::getFormat<T>()->fullName().c_str());
775 
776  return m_buffer ? m_buffer->getArray<T>() : static_cast<agxData::Array<T>&>(s_dummyArray);
777  }
778 
779  template <typename T>
780  AGX_FORCE_INLINE const agxData::Array<T>& ArrayParameter::get() const { return const_cast<ArrayParameter *>(this)->get<T>(); }
781 
782  AGX_FORCE_INLINE size_t ArrayParameter::getLocalSize() const { return m_localMemorySize; }
783 
784  AGX_FORCE_INLINE size_t ArrayParameter::getNumElements() const
785  {
786  agxAssert(this->getBuffer());
787  return this->getBuffer()->size() / this->getBuffer()->getElementArraySize();
788  }
789 
790 
791  AGX_FORCE_INLINE GlobalResultBuffer *ArrayParameter::getGlobalResult() { return m_globalResult; }
792  AGX_FORCE_INLINE const GlobalResultBuffer *ArrayParameter::getGlobalResult() const { return m_globalResult; }
793 
794  AGX_FORCE_INLINE UInt ArrayParameter::getGlobalResultMode() const { return m_globalResultMode; }
795 
797 
798  template <typename T>
799  AGX_FORCE_INLINE T* PointerParameter::get()
800  {
801  agxAssertN(!this->isRequired() || dynamic_cast<T *>(m_binding.get()), "%s: Pointer parameter does not have a binding!", getPath().c_str());
802  return static_cast<T *>(m_binding.get());
803  }
804 
805  AGX_FORCE_INLINE Object* PointerParameter::get() { return m_binding; }
806  AGX_FORCE_INLINE const Object* PointerParameter::get() const { return m_binding; }
807 
808  template <typename T>
809  AGX_FORCE_INLINE const T* PointerParameter::get() const { return const_cast<PointerParameter *>(this)->get<T>(); }
810 
811 
813 
814  AGX_FORCE_INLINE agxData::EntityModel *EntityDataParameter::getEntityModel() { return m_entityModel; }
816  AGX_FORCE_INLINE agxData::EntityData *EntityDataParameter::getData() { return m_dataSet; }
817 
818  template <typename T>
819  AGX_FORCE_INLINE T& EntityDataParameter::getData() { agxAssert(m_dataSet); return *static_cast<T *>(m_dataSet.get()); }
820 
821  AGX_FORCE_INLINE const ParameterRefVector& EntityDataParameter::getChildParameters() const { return m_children; }
822 
823 
824  AGX_FORCE_INLINE GlobalResultStorage *EntityDataParameter::getGlobalResult() { return m_globalResult; }
825  AGX_FORCE_INLINE const GlobalResultStorage *EntityDataParameter::getGlobalResult() const { return m_globalResult; }
826 
827  AGX_FORCE_INLINE UInt EntityDataParameter::getGlobalResultMode() const { return m_globalResultMode; }
828 
830 
831  AGX_FORCE_INLINE agxData::EntityModel *EntityPtrParameter::getEntityModel() { return m_entityModel; }
832  inline agxData::EntityPtr EntityPtrParameter::getBinding() { return m_ptr; }
833 
834  template <typename T>
835  AGX_FORCE_INLINE T EntityPtrParameter::getBinding() { return T(m_ptr); }
836 
838 
839  inline agxData::EntityModel *EntityInstanceParameter::getEntityModel() { return m_entityModel; }
840  inline agxData::EntityInstance EntityInstanceParameter::getBinding() { return m_instance; }
841 
842  template <typename T>
843  AGX_FORCE_INLINE T EntityInstanceParameter::getBinding() { return T(m_instance); }
844 
845 }
846 
847 
848 #endif
Representation of a path, a list of name components.
Definition: Path.h:32
AGXCORE_EXPORT agx::UInt getAccessMode(const agx::String &modeName)
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API...
AGXCORE_EXPORT Type * getType(const agx::String &name)
MetaType
Specify which kind of parameter.
Definition: Parameter.h:72
Data storage for a collection of entity instances of a specified EntityModel.
Definition: EntityStorage.h:72
A model is an abstract representation of the class of an agx::Object.
Definition: Model.h:40
Event updateEvent
Definition: Parameter.h:69
Abstract representation of a value.
Definition: Value.h:48
AGXCORE_EXPORT Format * getFormat(const agx::String &typeFormatName)
#define agxAssertN(expr, format,...)
Definition: debug.h:145
agxData::FormatRef m_format
Definition: Parameter.h:200
size_t m_index
Definition: Parameter.h:199
uint8_t UInt8
Definition: Integer.h:38
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...
Definition: EntityPtr.h:51
AGXCORE_EXPORT const InvalidIndexStruct InvalidIndex
A format is an implementation of a agxData::Type.
Definition: Format.h:63
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
A representation of a generic task.
Definition: Task.h:57
Representation of a name string.
Definition: Name.h:32
#define AGX_FORCE_INLINE
Definition: Object.h:59
Arrays are fast accessors into the data, or a portion of it, held by a Buffer.
Definition: Array.h:36
const UInt8 m_accessMode
Definition: Parameter.h:203
Type-specific Array used for fast access into the data held by a Buffer.
Definition: agxData.h:30
uint32_t UInt
Definition: Integer.h:34
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Pointer parameter.
Definition: Parameter.h:434
Templated callback with one argument.
Definition: Callback.h:100
Abstracted type.
Definition: Type.h:97
A representation of a task/kernel parameter, which can be bound using a string path or explicitly to ...
Definition: Parameter.h:61
An abstract attribute description, part of an Entity.
Definition: Attribute.h:57
Abstract representation of a data buffer.
Definition: Buffer.h:55
Event bindEvent
Definition: Parameter.h:67
Task * m_task
Definition: Parameter.h:198
Contains classes for low level data storage for AGX.
Definition: Container.h:23
EntityInstance parameter.
Definition: Parameter.h:631
bool m_needUpdate
Definition: Parameter.h:206
bool AGXPHYSICS_EXPORT write(const std::string &filename, const agxStream::Serializable *data)
Write a Serializable object to a file.
Scalar parameter.
Definition: Parameter.h:255
UInt8 m_metaType
Definition: Parameter.h:205
#define agxAssert(expr)
Definition: debug.h:143
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
Definition: EntityModel.h:63
Entity parameter.
Definition: Parameter.h:482
EntityPtr parameter.
Definition: Parameter.h:569
bool m_needCommit
Definition: Parameter.h:207
HashTable< String, UnresolvedParameterRef > ParameterTable
Definition: Parameter.h:55
AGXTERRAIN_EXPORT TimingStorage & getStorage()
ObjectObserver m_binding
Definition: Parameter.h:202
double Real
Definition: Real.h:42
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition: Vector.h:34
Array parameter.
Definition: Parameter.h:328
Inheritance with partial specialization due to bug with ref_ptr containers.
Event1< Parameter * > Event
Definition: Parameter.h:66
Event unbindEvent
Definition: Parameter.h:68
An agx::Device is an abstract representation of a device on which data can be stored and processed...
Definition: Device.h:57
Unresolved parameter.
Definition: Parameter.h:215
#define AGXCORE_EXPORT
agx::Object is a refcounted object with a name.
Definition: Object.h:58