pub struct Axis2Placement2D<'m> { /* private fields */ }Expand description
A borrowed view of an IfcAxis2Placement2D: origin plus local X.
The local Y is not stored: it is the 90-degree counter-clockwise rotation
of X (IfcOrthogonalComplement), so it is derived here rather than read.
Implementations§
Source§impl<'m> Axis2Placement2D<'m>
impl<'m> Axis2Placement2D<'m>
Sourcepub fn new(id: EntityId, entity: &'m Entity) -> Self
pub fn new(id: EntityId, entity: &'m Entity) -> Self
Wrap an entity assumed to be an IfcAxis2Placement2D.
Sourcepub fn location(&self, model: &'m Model) -> GeometryResult<[f64; 3]>
pub fn location(&self, model: &'m Model) -> GeometryResult<[f64; 3]>
The origin, promoted to 3D (z = 0).
Sourcepub fn ref_direction(&self, model: &'m Model) -> GeometryResult<[f64; 3]>
pub fn ref_direction(&self, model: &'m Model) -> GeometryResult<[f64; 3]>
The local X direction, normalized; global X when absent.
Sourcepub fn transform(&self, model: &'m Model) -> GeometryResult<Transform>
pub fn transform(&self, model: &'m Model) -> GeometryResult<Transform>
The placement as a 3D transform in the z=0 plane.
Local Z is forced to global Z so the derived Y matches
IfcOrthogonalComplement ([-x2, x1]), i.e. X rotated a quarter turn
counter-clockwise. Any other Z would silently mirror 2D profiles.
Trait Implementations§
Source§impl<'m> Clone for Axis2Placement2D<'m>
impl<'m> Clone for Axis2Placement2D<'m>
Source§fn clone(&self) -> Axis2Placement2D<'m>
fn clone(&self) -> Axis2Placement2D<'m>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'m> Copy for Axis2Placement2D<'m>
Auto Trait Implementations§
impl<'m> Freeze for Axis2Placement2D<'m>
impl<'m> RefUnwindSafe for Axis2Placement2D<'m>
impl<'m> Send for Axis2Placement2D<'m>
impl<'m> Sync for Axis2Placement2D<'m>
impl<'m> Unpin for Axis2Placement2D<'m>
impl<'m> UnsafeUnpin for Axis2Placement2D<'m>
impl<'m> UnwindSafe for Axis2Placement2D<'m>
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