17 #ifndef AGXDATA_FRAME_H
18 #define AGXDATA_FRAME_H
25 #pragma warning( push )
26 #pragma warning( disable : 4275 ) // non dll-interface class 'std::runtime_error' used as base for dll-interface class 'agxData::Frame::MergeException'
27 #pragma warning( disable : 4290 ) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
71 Header getHeader()
const;
76 void setKeyFrame(
bool flag);
81 bool isKeyFrame()
const;
122 const Track *getTrack()
const;
127 MergeException(
const Object* node,
const Object* collisionNode);
130 const Object *getCollisionNode()
const;
133 const Object *m_node;
134 const Object *m_collisionNode;
142 void merge(
const Frame *other,
bool allowOverwrite =
false);
145 Buffer *getBuffer(
const agx::Path& path);
148 void addComponent(Component *component,
const agx::Path& path);
149 void addStorage(EntityStorage *storage,
const agx::Path& path);
150 void addBuffer(Buffer *buffer,
const agx::Path& path);
151 void addBuffer(PartialBuffer *buffer,
const agx::Path& path);
163 void addEvents(
const agx::Object::EventRefVector& events);
164 agx::Object::EventRefVector& getEvents();
165 const agx::Object::EventRefVector& getEvents()
const;
167 void evaluateEventsLocally();
168 bool isQueued()
const;
169 bool isDiscardedFromCache()
const;
170 bool isJumpFrame()
const;
171 bool isSerialized()
const;
183 void setTrack(Track *track);
185 void setQueued(
bool flag);
187 void setDiscardedFromCache(
bool flag);
189 void setJumpFrame(
bool flag);
191 void setSerialized(
bool flag);
204 void merge(
agx::Component *targetParent,
const PartialBuffer *buffer,
bool allowOverwrite);
205 void merge(
agx::Component *targetParent,
const EntityStorage *storage,
bool allowOverwrite);
208 void merge(
agx::Component *targetParent,
const agx::ObjectRefVector& objects,
bool allowOverwrite);
210 void addNode(Component *parent, Object *
object);
211 void removeNode(Object *
object);
212 static size_t calculateNumBytes(Object *node);
217 bool m_isDiscardedFromCache;
225 agx::Object::EventRefVector m_events;
227 const agxData::Frame* m_mergeFrame;
254 bool isRecursive()
const;
257 void setRecursive(
bool flag);
260 virtual ~DataBinding() {}
276 PartialBuffer(
const agx::Name& name,
size_t size,
size_t fullSize);
281 size_t fullSize()
const;
285 void resize(
size_t size);
296 size_t getNumBytes()
const;
298 void merge(
const PartialBuffer *other,
bool allowOverwrite);
300 PartialBuffer *clone()
const;
303 virtual ~PartialBuffer();
322 const EntityModel *
getModel()
const;
326 size_t capacity()
const;
329 void setSize(
size_t size);
330 void setCapacity(
size_t capacity);
337 void resize(
size_t size);
338 void reserve(
size_t capacity);
342 virtual ~EntityStorage();
351 BufferHash m_attributeBuffers;
369 AGX_FORCE_INLINE bool Frame::isDiscardedFromCache()
const {
return m_isDiscardedFromCache; }
377 AGX_FORCE_INLINE const agx::Object::EventRefVector& Frame::getEvents()
const {
return m_events; }
378 AGX_FORCE_INLINE agx::Object::EventRefVector& Frame::getEvents() {
return m_events; }
382 AGX_FORCE_INLINE bool Frame::PartialBuffer::empty()
const {
return size() == 0; }
383 AGX_FORCE_INLINE size_t Frame::PartialBuffer::size()
const {
return m_dataBuffer ? m_dataBuffer->size() : 0; }
384 AGX_FORCE_INLINE size_t Frame::PartialBuffer::fullSize()
const {
return m_fullSize; }
398 AGX_FORCE_INLINE bool Frame::EntityStorage::empty()
const {
return size() == 0; }
407 #pragma warning( pop )
Representation of a path, a list of name components.
Inheritance with partial specialization due to bug with ref_ptr containers.
Data storage for a collection of entity instances of a specified EntityModel.
std::ostream & operator<<(std::ostream &stream, const AtomicValueT< T > &value)
A component is an object containing other objects, enabling hierarchical structuring.
A model is an abstract representation of the class of an agx::Object.
Abstract representation of a value.
AGXCORE_EXPORT Format * getFormat(const agx::String &typeFormatName)
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())
AGXPYTHON_EXPORT ScriptContext * getContext()
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
AGXCORE_EXPORT const InvalidIndexStruct InvalidIndex
#define AGX_DECLARE_POINTER_TYPES(type)
Representation of a name string.
Base class providing referencing counted objects.
const Node * getNode(const IteratorCompatibleContainer &container, agx::Real distanceFromStart)
Finds the wire node given current distance from the start of the wire (wire defined to be iterator co...
An abstract attribute description, part of an Entity.
Abstract representation of a data buffer.
An abstract description of a data entity stored using SOA (structure of arrays) pattern in a EntitySt...
virtual void removeObject(agx::Object *object)
Remove an object from the component.
static agx::Model * ClassModel()
Clock class keeps representation of virtual/simulated time.
virtual void addObject(agx::Object *object, bool assignContext=true)
Add an object to the component.
#define AGX_DECLARE_VECTOR_TYPES(type)
AGXCORE_EXPORT Component * root()
Inheritance with partial specialization due to bug with ref_ptr containers.
AGX_DECLARE_VECTOR_TYPES(Event)
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
agx::Object is a refcounted object with a name.