Click or drag to resize
AB4D logo

LineSelectorDataCheckBoundingBox Property

Gets or sets Boolean that specifies if performance is optimized by first checking the bounding box before calculating screen positions. See remarks for more info. Default value is false (for backwards compatibility).

Namespace: Ab3d.Utilities
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public bool CheckBoundingBox { get; set; }

Property Value

Boolean
Remarks

Gets or sets Boolean that specifies if performance is optimized by first checking the bounding box before calculating screen positions.

When true and when number of positions is more than 30, then CalculateScreenSpacePositions method calculates screen positions only for the 8 corners of the positions bounding box. This is much faster than calculating screen positions for all positions.

Then the GetClosestDistance method first checks if the mouse position is outside the screen bounding box. In this case the methods immediately returns with double.MaxValue (and not an actual distance of the line). If the mouse position is inside the bounding box, then screen positions are calculated for all the positions and then a new bounding box is calculated from actual screen positions. If mouse is stil inside the new bounding box, then the actual distance to the line is calculated by checking all line segments.

When CheckBoundingBox is false, then CalculateScreenSpacePositions method always calculates screen positions for all positions and the GetClosestDistance method always returns an actual distance to the line (and not double.MaxValue in case the mouse is outside the bounding box).

Default value is false for backwards compatibility (when calling GetClosestDistance it should always return the actual distance to the line and not double.MaxValue).

See Also