/// <summary> /// Gets a support point for a given normalized direction vector. /// </summary> /// <param name="directionNormalized"> /// The normalized direction vector for which to get the support point. /// </param> /// <returns>A support point regarding the given direction.</returns> /// <remarks> /// A support point regarding a direction is an extreme point of the shape that is furthest away /// from the center regarding the given direction. This point is not necessarily unique. /// </remarks> public override Vector3F GetSupportPointNormalized(Vector3F directionNormalized) { if (_scale.X == _scale.Y && _scale.Y == _scale.Z) { // Uniform scaling: Simply scale the support point position. // No need to change directionNormalized. We can use GetSupportPointNormalized. return(_shape.GetSupportPointNormalized(directionNormalized) * _scale); } else { // Non-uniform scaling: We have to scale the support direction see comments in // GetSupportPoint(). We cannot use GetSupportPointNORMALIZED(). return(_shape.GetSupportPoint(directionNormalized, _scale)); } }