Stores a navigable tree of StoredTransforms. Each StoredTransform contains only local coordinates, not global.
Provides functions to read, write, and compare the store tree with a transform's local transform and those of its descendants.
Public Member Functions | |
TreeOfLocalTransforms (Transform transformToStore) | |
Constructor that creates a TreeOfLocalTransforms using the provided Unity Transform. | |
virtual void | AssignToTransform (Transform transformToAssignTo, bool ignored=true) |
Use this function to assign the values stored in the TransformStorageTree to an actual UnityEngine.Transform. NOTE: This function assumes the hierarchy, including sibling order, of the transform's descendants has not changed since recording it. Any nodes no longer exist in the transform's descendants will be ignored: NO new Transform/GameObject will be created. If new transforms have been added as children in front of recorded child transform, they will be overwritten. | |
override StoredTransform | DefaultNodeData () |
this function overridden to provide a default transformation storage value | |
virtual bool | Equals (Transform compareTransform) |
Specific version of equality function used to compare with a Transform object. It allows the caller to specify weather to compare the StoredTransform with the Transforms local or world coordinates. | |
virtual bool | Equals (Transform transformToCheck, bool localNotWorld) |
Use to compare with an existing transform. This class does not actually store global coordinates, so the second parameter is ignored. | |
virtual void | StoreTransformAndChildren (Transform transformToStore) |
this function is called to Store a transform Object in the StoredTransform Object. All descendants of the transform will be added to the IStoreTransformHierarchy, appropriately. | |
![]() | |
void | OnAfterDeserialize () |
This function is required by the ISerializationCallbackReceiver Interface. Called automatically via the interface, it will deserialize the stored data into the runtime structure. | |
void | OnBeforeSerialize () |
This function is required by the ISerializationCallbackReceiver Interface. Called automatically via the interface, it will serialize the runtime data for storage. | |
![]() | |
bool | Equals (object objectToCompare) |
Generalized version of equality function. Determines if the object to compare is a Transform or IStoreTransformHierarchy. If a IStoreTransformHierarchy, it compares each transform element for equality. If all element match it returns true. | |
Static Public Member Functions | |
static implicit | operator TreeOfLocalTransforms (Transform transform_to_copy) |
The implicit Transform assignment operator will create a new TreeOfLocalTransforms object, and assign it the local values of the provided Transform. | |