Module rust_3d::functions [] [src]

utility 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

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

extrude

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

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