pub struct BoundaryPrism {
pub origin: DVec3,
pub x: DVec3,
pub y: DVec3,
pub axis: DVec3,
}Expand description
Where a bounded half-space’s boundary stands and which way its prism runs (#321).
The boundary point (u, v) lies at origin + u x + v y, and the prism
is the set of lines through the boundary’s region parallel to axis,
infinite both ways. x and y are used as given: their lengths scale
the boundary, the angle between them shears it, and their handedness
mirrors it. Only the direction of axis counts, not its length or sign.
Fields§
§origin: DVec3Where the boundary’s (0, 0) lies.
x: DVec3The image of the boundary’s +u.
y: DVec3The image of the boundary’s +v.
axis: DVec3The direction of the prism’s lines.
Implementations§
Source§impl BoundaryPrism
impl BoundaryPrism
Sourcepub fn along_normal(
frame: PlaneFrame,
plane: Plane3,
tolerance: Tolerance,
) -> Result<BoundaryPrism, GeomError>
pub fn along_normal( frame: PlaneFrame, plane: Plane3, tolerance: Tolerance, ) -> Result<BoundaryPrism, GeomError>
The prism along plane’s normal of a boundary authored in frame
(bounded_half_space_in_frame): frame’s x projected into the
plane fixes the boundary’s rotation about the normal, its y is the
normal cross that x – or its opposite for a frame mirrored about
the normal, whose x cross y points against it (#322) – and its
origin is projected onto the plane.
§Errors
InvalidInput, by name, for a plane without a normal, a frame whose
x is parallel to it, and a frame standing perpendicular to the
plane (within the angular tolerance), which has no handedness there.
Sourcepub fn along_plane_normal(
placement: DAffine3,
plane: Plane3,
tolerance: Tolerance,
) -> Result<BoundaryPrism, GeomError>
pub fn along_plane_normal( placement: DAffine3, plane: Plane3, tolerance: Tolerance, ) -> Result<BoundaryPrism, GeomError>
The prism along plane’s normal of a boundary authored in
placement’s xy plane, the whole frame honoured (#322): the
boundary keeps the shape the placement gives it – the length of its
x, the length and lean of its y against that x – and the
placement’s handedness, laid into the plane with its x along the
placement’s x projected there and its y to the side the normal
cross that x points, or the other side for a left-handed
placement, whose x, y and z are mirrored. The origin is
projected onto the plane. For a right-handed placement with unit,
perpendicular x and y this is BoundaryPrism::along_normal.
§Errors
InvalidInput, by name, for a plane without a normal, a non-finite
placement, a degenerate one, whose x, y and z columns do not
span space within the angular tolerance (parallel or zero axes), and
one whose x is parallel to the normal.
Sourcepub fn along_placement_z(
placement: DAffine3,
tolerance: Tolerance,
) -> Result<BoundaryPrism, GeomError>
pub fn along_placement_z( placement: DAffine3, tolerance: Tolerance, ) -> Result<BoundaryPrism, GeomError>
The prism of a boundary authored in placement’s xy plane and
running along its z (#321): the point (u, v) at
placement * (u, v, 0), the axis placement’s z column. This is
how IFC bounds an IfcPolygonalBoundedHalfSpace, by its
Position.
§Errors
InvalidInput, by name, for a non-finite placement and for a
degenerate one, whose x, y and z columns do not span space
within the angular tolerance (parallel or zero axes): its boundary
has no area, or its prism no direction off the boundary’s plane.
Sourcepub fn crossing(
&self,
plane: Plane3,
tolerance: Tolerance,
) -> Result<f64, GeomError>
pub fn crossing( &self, plane: Plane3, tolerance: Tolerance, ) -> Result<f64, GeomError>
The cosine of the prism’s axis against plane’s unit normal, signed:
how steeply, and from which side, the prism crosses the plane.
§Errors
InvalidInput, by name, for a plane without a normal, an axis that
is zero or not finite, and an axis within the angular tolerance of
the plane: its prism never crosses it.
Trait Implementations§
Source§impl Clone for BoundaryPrism
impl Clone for BoundaryPrism
Source§fn clone(&self) -> BoundaryPrism
fn clone(&self) -> BoundaryPrism
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BoundaryPrism
Source§impl Debug for BoundaryPrism
impl Debug for BoundaryPrism
Source§impl PartialEq for BoundaryPrism
impl PartialEq for BoundaryPrism
impl StructuralPartialEq for BoundaryPrism
Auto Trait Implementations§
impl Freeze for BoundaryPrism
impl RefUnwindSafe for BoundaryPrism
impl Send for BoundaryPrism
impl Sync for BoundaryPrism
impl Unpin for BoundaryPrism
impl UnsafeUnpin for BoundaryPrism
impl UnwindSafe for BoundaryPrism
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more