Struct truck_geometry::decorators::IntersectionCurve
source · pub struct IntersectionCurve<C, S> { /* private fields */ }
Expand description
Intersection curve between two surfaces.
Implementations§
source§impl<C, S> IntersectionCurve<C, S>
impl<C, S> IntersectionCurve<C, S>
sourcepub fn surface0(&self) -> &S
pub fn surface0(&self) -> &S
This curve is a part of intersection of self.surface0()
and self.surface1()
.
sourcepub fn surface1(&self) -> &S
pub fn surface1(&self) -> &S
This curve is a part of intersection of self.surface0()
and self.surface1()
.
sourcepub fn leader(&self) -> &C
pub fn leader(&self) -> &C
Returns the polyline leading this curve.
Examples found in repository?
src/decorators/intersection_curve.rs (line 205)
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
fn search_parameter<H: Into<SPHint1D>>(
&self,
point: Point3,
hint: H,
trials: usize,
) -> Option<f64> {
let t = self
.leader()
.search_nearest_parameter(point, hint, trials)
.unwrap();
let pt = self.subs(t);
match pt.near(&point) {
true => Some(t),
false => None,
}
}
}
/// Only derive from leading curve. Not precise.
impl<C, S> SearchNearestParameter<D1> for IntersectionCurve<C, S>
where
C: ParametricCurve3D + SearchNearestParameter<D1, Point = Point3>,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
{
type Point = Point3;
fn search_nearest_parameter<H: Into<SPHint1D>>(
&self,
point: Point3,
hint: H,
trials: usize,
) -> Option<f64> {
self.leader().search_nearest_parameter(point, hint, trials)
}
sourcepub fn new_unchecked(
surface0: Box<S>,
surface1: Box<S>,
leader: C,
tol: f64
) -> Self
pub fn new_unchecked(
surface0: Box<S>,
surface1: Box<S>,
leader: C,
tol: f64
) -> Self
Creates intersection curve with unchecked bound. This method is only for developer of truck
, deplicated for users.
source§impl<C, S> IntersectionCurve<C, S>where
C: ParametricCurve3D,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
impl<C, S> IntersectionCurve<C, S>where
C: ParametricCurve3D,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
Trait Implementations§
source§impl<C, S> BoundedCurve for IntersectionCurve<C, S>where
C: ParametricCurve3D + BoundedCurve,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
impl<C, S> BoundedCurve for IntersectionCurve<C, S>where
C: ParametricCurve3D + BoundedCurve,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
source§impl<C: Clone, S: Clone> Clone for IntersectionCurve<C, S>
impl<C: Clone, S: Clone> Clone for IntersectionCurve<C, S>
source§fn clone(&self) -> IntersectionCurve<C, S>
fn clone(&self) -> IntersectionCurve<C, S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<C, S> Cut for IntersectionCurve<C, S>where
C: Cut<Point = Point3, Vector = Vector3>,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
impl<C, S> Cut for IntersectionCurve<C, S>where
C: Cut<Point = Point3, Vector = Vector3>,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
source§impl<'de, C, S> Deserialize<'de> for IntersectionCurve<C, S>where
C: Deserialize<'de>,
S: Deserialize<'de>,
impl<'de, C, S> Deserialize<'de> for IntersectionCurve<C, S>where
C: Deserialize<'de>,
S: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<C: Invertible, S: Clone> Invertible for IntersectionCurve<C, S>
impl<C: Invertible, S: Clone> Invertible for IntersectionCurve<C, S>
source§impl<C, S> ParameterDivision1D for IntersectionCurve<C, S>where
C: ParametricCurve3D,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
impl<C, S> ParameterDivision1D for IntersectionCurve<C, S>where
C: ParametricCurve3D,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
source§impl<C, S> ParametricCurve for IntersectionCurve<C, S>where
C: ParametricCurve3D,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
impl<C, S> ParametricCurve for IntersectionCurve<C, S>where
C: ParametricCurve3D,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
source§impl<C, S> SearchNearestParameter<D1> for IntersectionCurve<C, S>where
C: ParametricCurve3D + SearchNearestParameter<D1, Point = Point3>,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
impl<C, S> SearchNearestParameter<D1> for IntersectionCurve<C, S>where
C: ParametricCurve3D + SearchNearestParameter<D1, Point = Point3>,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
Only derive from leading curve. Not precise.
source§impl<C, S> SearchParameter<D1> for IntersectionCurve<C, S>where
C: ParametricCurve3D + SearchNearestParameter<D1, Point = Point3>,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
impl<C, S> SearchParameter<D1> for IntersectionCurve<C, S>where
C: ParametricCurve3D + SearchNearestParameter<D1, Point = Point3>,
S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>,
source§impl<C, S> Transformed<Matrix4<f64>> for IntersectionCurve<C, S>where
C: Transformed<Matrix4>,
S: Transformed<Matrix4>,
impl<C, S> Transformed<Matrix4<f64>> for IntersectionCurve<C, S>where
C: Transformed<Matrix4>,
S: Transformed<Matrix4>,
source§fn transform_by(&mut self, trans: Matrix4)
fn transform_by(&mut self, trans: Matrix4)
transform by
trans
.source§fn transformed(&self, trans: T) -> Self
fn transformed(&self, trans: T) -> Self
transformed geometry by
trans
.