AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
AttributePtr.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 having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid 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
17#ifndef AGXDATA_ATTRIBUTEPTR_H
18#define AGXDATA_ATTRIBUTEPTR_H
19
20#include <agxData/EntityPtr.h>
21//#include <agxData/Attribute.h>
22
23namespace agxData
24{
25 class Attribute;
26
27 template <typename T>
29 {
30 public:
32 AttributePtr(EntityPtr entity, const Attribute *attribute);
33
34 T& get();
35 const T& get() const;
36
37 bool isValid() const;
38
39 bool operator!() const;
40
41 operator bool() const;
42
43 inline void setEntityPtr( EntityPtr entity ) { m_entityPtr = entity; }
44
45 private:
46 EntityPtr m_entityPtr;
47 const Attribute *m_attribute;
48 };
49}
50
51
52#endif /* AGXDATA_ATTRIBUTEPTR_H */
void setEntityPtr(EntityPtr entity)
Definition: AttributePtr.h:43
bool operator!() const
An abstract attribute description, part of an Entity.
Definition: Attribute.h:58
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
Definition: EntityPtr.h:52
Contains classes for low level data storage for AGX.
Definition: Container.h:23