pub struct BendFrame {
pub tau: Vector3,
pub m: Vector3,
pub n: Vector3,
pub sigma: Scalar,
pub r_a: Scalar,
pub r_b: Scalar,
pub cos: Scalar,
pub sin: Scalar,
pub center: Vector3,
}Expand description
How a bend turns, worked out from its parent flat: the frame of its first edge and its radii.
Fields§
§tau: Vector3Along the parent’s edge, in the direction its loop runs it.
m: Vector3Out of the parent, across the edge, in its plane.
n: Vector3The parent’s normal.
sigma: Scalar1 turning towards the B side, -1 away from it.
r_a: ScalarThe radius of its A side and of its B side.
r_b: Scalar§cos: Scalar§sin: Scalar§center: Vector3A point on the axis.
Implementations§
Source§impl BendFrame
impl BendFrame
Sourcepub fn new(
place: &Placement,
[a, b]: [Vector2; 2],
angle: Scalar,
radius: Scalar,
thickness: Scalar,
toward_b: bool,
) -> GeopResult<Self>
pub fn new( place: &Placement, [a, b]: [Vector2; 2], angle: Scalar, radius: Scalar, thickness: Scalar, toward_b: bool, ) -> GeopResult<Self>
A bend from the straight parent edge a -> b of a flat placed at
place, turning by angle with inner radius radius in a sheet
thickness thick.
Sourcepub fn rotate(&self, x: &Vector3) -> Vector3
pub fn rotate(&self, x: &Vector3) -> Vector3
The vector x turned by the bend: m towards the side it turns
to, about its axis.
Sourcepub fn child_placement(&self, parent: &Placement) -> Placement
pub fn child_placement(&self, parent: &Placement) -> Placement
Where the child flat lies: the parent’s placement turned about the bend’s axis. Its edge where the bend ends is the parent’s where it starts, in sheet coordinates.
Auto Trait Implementations§
impl Freeze for BendFrame
impl RefUnwindSafe for BendFrame
impl Send for BendFrame
impl Sync for BendFrame
impl Unpin for BendFrame
impl UnsafeUnpin for BendFrame
impl UnwindSafe for BendFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more