Module math

Source

Modules§

aabb
curve
frustum
octree
pack
Rectangle packer packs small rectangles into a bigger one.
plane
quadtree
Quadrilateral (quad) tree is used for space partitioning and fast spatial queries.
ray
segment
triangulator

Structs§

OptionRect
A version of Rect that is optionally None. This simplifies the process of creating a bounding rect from a series of points, as it can start as None and then build an initial rect from the first point.
Rect
A rectangle defined by position and size.
SmoothAngle
TriangleDefinition
TriangleEdge

Enums§

PlaneClass
RotationOrder

Traits§

Matrix3Ext
Matrix4Ext
Number
Arbitrary number.
PositionProvider
Vector2Ext
Vector3Ext

Functions§

barycentric_is_inside
barycentric_to_world
classify_plane
cubicf
cubicf_derivative
get_arbitrary_line_perpendicular
get_barycentric_coords
get_barycentric_coords_2d
get_closest_point
Tries to find a point closest to given point.
get_closest_point_triangle_set
Returns a tuple of (point index; triangle index) closest to the given point.
get_closest_point_triangles
Returns a tuple of (point index; triangle index) closest to the given point.
get_farthest_point
get_polygon_normal
get_signed_triangle_area
ieee_remainder
There are two versions of remainder, the standard % operator which does x - (x/y).trunc()*y and IEEE remainder which does x - (x/y).round()*y.
inf_sup_cubicf
is_point_inside_2d_triangle
is_point_inside_triangle
lerpf
m4x4_approx_eq
quat_from_euler
ray_rect_intersection
round_to_step
solve_quadratic
spherical_to_cartesian
triangle_area
vec3_to_vec2_by_plane
vector_to_quat
Returns rotation quaternion that represents rotation basis with Z axis aligned on vec. This function handles singularities for you.
wrap_angle
wrapf