Module linestring::cgmath_3d [−][src]
This module is optional. To use if you must include the feature impl-cgmath
in your Cargo.toml
file.
By default all features are enabled (this is a work-around to enable the automatic rust doc).
If you want to only enable the impl-cgmath
feature you must first disable the default features with default-features=false
.
Cargo.toml example: linestring = {version="<current version>",default-features=false,features=["impl-cgmath"]}
Structs
Aabb3 | A simple 3d AABB If min_max is none the data has not been assigned yet. |
Line3 | A 3d line |
LineString3 | A 3d line string, aka polyline. If the ‘connected’ field is set the ‘as_lines()’ method will connect start point with the end-point. Todo: The builder structure of this struct needs to be revisited |
LineStringSet3 | A set of linestrings + an aabb Intended to contain related 3d shapes. E.g. outlines of letters with holes |
Enums
Plane | Axis aligned planes, used to describe how imported ‘flat’ data is arranged in space |
Shape3d | Placeholder for different 3d shapes |
Functions
distance_to_line_squared | The distance between the line a->b to the point p is the same as distance = |(a-p)×(a-b)|/|a-b| https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Another_vector_formulation Make sure to not call this function with a-b==0 This function returns the distance² |
distance_to_point_squared | The distance² between the two points |
point_ulps_eq | |
save_to_obj_file | Rudimentary save line strings to .obj file function It is extremely inefficient, but it works. It saves with 6 decimals because that’s what Blender uses. |