[][src]Module rust_3d::functions

utility functions

Functions

center

Positions the object in such a way that its center is at origin

center_2d

Returns the center of two IsBuildable2D

center_3d

Returns the center of two IsBuildable3D

closest_intersecting

Returns the closest intersection with the ray

closest_intersecting_mut

Returns the closest intersection with the ray

collect_intersections_ray_mesh

Collects all intersections between a ray and mesh

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

for_each_intersecting

Applies the function to each intersection candidate

index_closest_intersecting

Returns the index of the closest intersection with the ray

intersection

The intersection between a line and BoundingBox if there is any

intersection_ray_triangle

Finds the intersection between a ray and triangle

max64

Maximum of two f64 values

min64

Minimum of two f64 values

normal_of_face

Calculates the normal of a face given by three vertices

project_point_on_plane

Projects a point onto a plane

set_size

Scales the object to the required size

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