Maps (magnitude) values by sensitivity so that the Structure.Sensitivity (plus the given sensitivityOffset ) is used as similarity threshold for the smallest angle between a plane defined by planeDirection1 , planeDirection2 and the Structure.Direction.
When mapping is MappingType.InverseLinear, then: the more similar the direction vectors, the greater the returned result. If the angle between the two vectors is greater than or equal to the applied threshold, then the result is 0. If the two directions are equal (which means that the angle is 0), then the result is 1. This logic can be applied analogously for the other mapping types.
- Parameters
-
mapping | Determines the type of the used mapping function. |
structure | The Structure to obtain the sensitivity and direction for. |
planeDirection1 | The first vector defining the plane. |
planeDirection2 | The second vector defining the plane. |
offset | An angular offset which manipulates the plane (in degrees). |
sensitivityOffset | Is added to the Structure.Sensitivity as threshold. |
- Returns
- The mapped value between 0 and 1.
- Exceptions
-
NullReferenceException | If structure is null . |