Struct graphene::Plane [−][src]
pub struct Plane(_);
Expand description
A 2D plane that extends infinitely in a 3D volume.
The contents of the graphene_plane_t
are private, and should not be
modified directly.
Implementations
Initializes the given Plane
using the given normal
vector
and constant
values.
normal
a unit length normal vector defining the plane pointing towards the origin; if unset, we use the X axis by default
constant
the distance from the origin to the plane along the normal vector; the sign determines the half-space occupied by the plane
Returns
the initialized plane
Transforms a Plane
self
using the given matrix
and normal_matrix
.
If normal_matrix
is None
, a transformation matrix for the plane
normal will be computed from matrix
. If you are transforming
multiple planes using the same matrix
it’s recommended to compute
the normal matrix beforehand to avoid incurring in the cost of
recomputing it every time.
matrix
a Matrix
normal_matrix
a Matrix
Returns
res
the transformed plane
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for Plane
impl UnwindSafe for Plane
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<'a, T, C> FromValueOptional<'a> for T where
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,