Module rust_3d::functions [] [src]

utiliy functions

Functions

apply_view_2d

Applies a view to the given point cloud returning a new point cloud with only the allowed positions

apply_view_3d

Applies a view to the given point cloud returning a new point cloud with only the allowed positions

calc_direction

Calculates the direction of one point to another in terms of an enum

calc_sub_min_max

Calculates the min and max values of sub nodes of an OcTree

center

Returns the center of two IsBuildable3D

conn

Calculates the vector between two positions

cross

Returns the cross product between a Is3D and a IsBuildable3D

dimension_compare

Compares two IsBuildable3D at a given dimensions

dimension_dist

Calculates the distance within a given dimension between two IsBuildable3D

dist

Returns the distance between two IsND in case their number of dimensions match

dist_2d

Returns the distance between two Is2D

dist_3d

Returns the distance between two Is3D

dist_nd

Returns the distance between two IsND in case their number of dimensions match

extrude

Extrudes a 2D point cloud into 3D space with a given center and direction

in_bb

Checks whether a point is within a bounding box

project_point_on_plane

Projects a point onto a plane

sort_and_limit

Helper function to keep a collection of positions limited in size and sorted

sort_vec_2d_x

Helper function to sort a Vec of Is2D by x

sort_vec_2d_y

Helper function to sort a Vec of Is2D by y

sort_vec_3d_x

Helper function to sort a Vec of Is3D by x

sort_vec_3d_y

Helper function to sort a Vec of Is3D by y

sort_vec_3d_z

Helper function to sort a Vec of Is3D by z

sqr_dist

Returns the squared distance between two IsND in case their number of dimensions match

sqr_dist_2d

Returns the squared distance between two Is2D

sqr_dist_3d

Returns the squared distance between two Is3D

sqr_dist_nd

Returns the squared distance between two IsND in case their number of dimensions match