Function triangle_cuboid_find_local_separating_normal_oneway

Source
pub fn triangle_cuboid_find_local_separating_normal_oneway(
    triangle1: &Triangle,
    shape2: &Cuboid,
    pos12: &Isometry<f32>,
) -> (f32, Vector<f32>)
Expand description

Finds the best separating axis by testing a triangle’s normals against a cuboid (2D only).

This is a specialized version of triangle_support_map_find_local_separating_normal_oneway for the specific case of a triangle and cuboid. In 2D, it tests the three edge normals of the triangle.

§Parameters

  • triangle1: The triangle whose edge normals will be tested
  • shape2: The cuboid
  • pos12: The position of the cuboid relative to the triangle

§Returns

A tuple containing the maximum separation and the corresponding edge normal direction.

See triangle_support_map_find_local_separating_normal_oneway for more details and examples.