Simple data structure used to store a transform's data. Also provides functionality to read, write or compare data to a Transform, with a single line of code. Members two separate StoredTransform structures, one that hold local coordinate, one that hold world coordinates. When dealing with ACTUAL Transforms, all functions in this class will read BOTH world and local transforms, but only WRITE and COMPARE to one (which one, is selectable by parameter).
|
| StoredFullTransform (StoredTransform transform_to_copy) |
| This constructor allows one to convert a StoredTransform struct into a StoredFullTransform struct. An implicit (cast from StoredTransform) operator would create ambiguities, and so one is NOT provided. NOTE: The transformation data from the parameter will be stored in BOTH the local and world members.
|
|
| StoredFullTransform (Transform transform_to_copy) |
| Constructor requires a transform to copy data from. If no transform is provided it will use "unity" (no transformation for both local and world transformations). It will usually be simpler to just use the implicit (cast from Transform) operator than this constructor version.
|
|
void | AssignToTransform (Transform transformToAssignTo, bool localNotWorld=true) |
| Use to assign the values stored in this StoredTransform to an actual UnityEngine.Transform
|
|
override bool | Equals (object obj) |
| Generalized version of equality function. Determines if the object to compare is a Transform or StoredTransform. If so it compares each transform element for equality. If all element match it returns true. If the object is a transform, it's local coordinates will be compared.
|
|
bool | Equals (StoredFullTransform trasf) |
| Specific version of equality function used to compare with a Transform object. It will compare BOTH local and world coordinates for equality. Both must match for this function to return true.
|
|
bool | Equals (StoredTransform trasf, bool localNotWorld) |
| Specific version of equality function used to compare with a TransormStorage object. It will compare either local and world coordinates for equality. Both must match for this function to return true.
|
|
bool | Equals (Transform unityTransform) |
| Specific version of equality function used to compare with a Transform object. It will compare BOTH local and world coordinates for equality. Both must match for this function to return true.
|
|
override int | GetHashCode () |
| This struct has dynamic values, and therefore should not be used as a key. This function will simply return a constant, so there is no performance gain from using Hash Tables.
|
|
void | Reset () |
| Reset the stored values to unity/identity, which represents NO transformation.
|
|
override string | ToString () |
| Converts the local and world transforms to strings.
|
|