Polarith AI
1.8

◆ MapBySensitivityPlane()

float MapBySensitivityPlane ( MappingType  mapping,
Structure  structure,
Vector3  planeDirection1,
Vector3  planeDirection2,
float  offset,
float  sensitivityOffset = 0.0f 
)
protectedinherited

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
mappingDetermines the type of the used mapping function.
structureThe Structure to obtain the sensitivity and direction for.
planeDirection1The first vector defining the plane.
planeDirection2The second vector defining the plane.
offsetAn angular offset which manipulates the plane (in degrees).
sensitivityOffsetIs added to the Structure.Sensitivity as threshold.
Returns
The mapped value between 0 and 1.
Exceptions
NullReferenceExceptionIf structure is null.
Imprint