class SceneObjectHierarchyDelta

Inherits: IReflectable

Contains modifications between two scene object hierarchies.

The modifications are a set of added/removed children or components and per-field deltas of their components.

Public

Methods

staticCreate

static SPtr<SceneObjectHierarchyDelta> Create(const HSceneObject &original, const HSceneObject &modified, SceneObjectHierarchyDeltaFlags flags = SceneObjectHierarchyDeltaFlag::None)

Creates a new delta by recording changes present in , compared to .

Apply

void Apply(const HSceneObject &original, SceneObjectHierarchyDeltaFlags flags = SceneObjectHierarchyDeltaFlag::None)

Applies the delta to the provided object.

staticGetRttiStatic

static RTTIType *GetRttiStatic()

GetRtti

RTTIType *GetRtti() const override

Returns an interface you can use to access class' Run Time Type Information.

Private

Methods

staticGenerateHierarchyDelta

static void GenerateHierarchyDelta(const HSceneObject &original, const HSceneObject &modified, RTTIOperationContext &context, SceneObjectHierarchyDeltaFlags flags, SPtr<SceneObjectHierarchyDelta> &outDelta)

Recursively generates differences between original and the modified version, for every scene object in the hierarchy.

staticGenerateSceneObjectDelta

static bool GenerateSceneObjectDelta(const HSceneObject &original, const HSceneObject &modified, RTTIOperationContext &context, SceneObjectHierarchyDeltaFlags flags, bool ignoreParent, SPtr<SceneObjectHierarchyDelta> &outDelta)

Generates differences between the two provided scene objects.

If the object IDs match, a delta of their properties is recorded. If one of the scene objects is not valid, we record the relevant ID in the added or removed scene object list. Note this does not iterate over the child hierarchy. will be created if changes are found if not already created.

staticGenerateComponentDelta

static void GenerateComponentDelta(const HSceneObject &original, const HSceneObject &modified, RTTIOperationContext &context, SceneObjectHierarchyDeltaFlags flags, SPtr<SceneObjectHierarchyDelta> &outDelta)

Generates differences between components of the two provided scene objects.

If components with matching ids are found, a delta of their properties is recorded. Otherwise a component is registered in either the added or removed component list. will be created if changes are found, if not already created.

Fields

Objects

UnorderedMap<UUID, SPtr<SceneObjectHierarchyDeltaObject>> Objects

AddedComponents

Vector<UUID> AddedComponents

Ordered list of added components.

RemovedComponents

UnorderedSet<UUID> RemovedComponents

AddedSceneObjects

Vector<UUID> AddedSceneObjects

Ordered list of added scene objects.

RemovedSceneObjects

Vector<UUID> RemovedSceneObjects

Ordered list of removed scene objects.

mRTTIData

Any mRTTIData

*********************************************************************