Basically a simple data structure used to store a transform's data. Many operators provides functionality to read, write or compare this data to a unity Transform, (or other transformation storage classes provided with this module), using a single line of code. Additional operators allow the actual transformation of vectors using the stored data. Members are specified as localPosition,localRotation and localScale but they COULD in fact be storing world coordinates. They are no more than vectors and Quaternions, that can be used as transformation data.
It is only when dealing with ACTUAL Transforms, that this becomes important, and all such functions within have options to the Transform's local or world coordinates (except the implicit operator, which assume local).
|
| StoredTransform (StoredFullTransform transform_to_copy, bool localNotWorld) |
| Create a new transform storage object, with the option to copy the source StoredFullTransform's local or world values. The constructor for this struct requires a transform from which it will copy the transform data. If no transform is provided, values will be set unity (no transformation).
|
|
| StoredTransform (Transform transform_to_copy) |
| Create a new transform storage object. The constructor for this struct requires a transform from which it will copy the transform data. If no transform is provided, values will be set unity (no transformation). It will generally prove more efficient to simple use the implicit casting operator, than this constructor. while nearly identical to the constructor version that takes a bool param, this constructor signature is useful
|
|
| StoredTransform (Transform transform_to_copy, bool localNotWorld) |
| Create a new transform storage object, with the option to copy the source Transform's local or world values. The constructor for this struct requires a transform from which it will copy the transform data. If no transform is provided, values will be set to identity (no transformation).
|
|
| StoredTransform (Vector3 position, Quaternion orientation, Vector3 scale) |
| Constructor used to create a new StoredTransform, given a Translation, Rotation and Scaling components of the transform.
|
|
bool | AproxEquals (StoredTransform trasformStorage) |
| Specific version of equality function used to compare with a StoredTransform structs, Uses Mathf.Approx to compute equality.
|
|
void | AssignToTransform (Transform transformToAssignTo, bool localNotWorld=true) |
| Use to assign the values stored in the StoredTransform to an actual UnityEngine.Transform
|
|
void | Copy (StoredTransform transform_to_copy) |
| Copies the source StoredTransform into the calling StoredTransform's variables. Does not create a new Object. The constructor for this struct requires a transform from which it will copy the transform data. If no transform is provided, values will be set unity (no transformation).
|
|
void | Copy (Transform transform_to_copy, bool localNotWorld=true) |
| Copies the source Transform's local or world values, into the calling StoredTransform's variables. Does not create a new Object. The constructor for this struct requires a transform from which it will copy the transform data. If no transform is provided, values will be set unity (no transformation).
|
|
override bool | Equals (object objectToCompare) |
| 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.
|
|
bool | Equals (StoredFullTransform fullTransform, bool localNotWorld=true) |
| 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.
|
|
bool | Equals (StoredTransform trasformStorage) |
| Specific version of equality function used to compare with a StoredTransform structs.
|
|
bool | Equals (Transform unityTransform, bool localNotWorld) |
| 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.
|
|
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 no there is performance gain from using Hash Tables.
|
|
void | Reset () |
| Reset the stored values to unity, which represents NO transformation.
|
|
Matrix4x4 | ToMatrix () |
| Provides a TRS Matrix4X4 based upon this stored transform.
|
|
override string | ToString () |
| Output transform storage as single line string, useful for debugging.
|
|
Vector3 | TransformDirection (Vector3 direction) |
| Function used to Transform a provided direction by this storedTransform. In detail: this function applies ONLY the rotation component of the StoredTransform to the provided Vector3.
|
|
Vector3 | TransformPoint (Vector3 point) |
| Function used to Transform a provided point by this storedTransform. The provided Vector3 point is scaled, rotated, and translated, in that order.
|
|