pub struct Tree(/* private fields */);Expand description
Owned handle for a standalone math tree
Implementations§
Source§impl Tree
impl Tree
Sourcepub fn as_ptr(&self) -> *const TreeOp
pub fn as_ptr(&self) -> *const TreeOp
Returns a pointer to the inner TreeOp
This can be used as a strong (but not unique) identity.
Sourcepub fn remap_xyz(&self, x: Tree, y: Tree, z: Tree) -> Tree
pub fn remap_xyz(&self, x: Tree, y: Tree, z: Tree) -> Tree
Remaps the axes of the given tree
If the mapping is affine, then remap_affine
should be preferred.
The remapping is lazy; it is not evaluated until the tree is imported
into a Context.
Sourcepub fn remap_affine(&self, mat: Affine3<f64>) -> Tree
pub fn remap_affine(&self, mat: Affine3<f64>) -> Tree
Performs an affine remapping of the given tree
The remapping is lazy; it is not evaluated until the tree is imported
into a Context.
Source§impl Tree
See Context for documentation of these functions
impl Tree
See Context for documentation of these functions
pub fn x() -> Self
pub fn y() -> Self
pub fn z() -> Self
pub fn constant(f: f64) -> Self
pub fn square(&self) -> Self
pub fn floor(&self) -> Self
pub fn ceil(&self) -> Self
pub fn round(&self) -> Self
pub fn sqrt(&self) -> Self
pub fn max<T: Into<Tree>>(&self, other: T) -> Self
pub fn min<T: Into<Tree>>(&self, other: T) -> Self
pub fn compare<T: Into<Tree>>(&self, other: T) -> Self
pub fn modulo<T: Into<Tree>>(&self, other: T) -> Self
pub fn and<T: Into<Tree>>(&self, other: T) -> Self
pub fn or<T: Into<Tree>>(&self, other: T) -> Self
pub fn atan2<T: Into<Tree>>(&self, other: T) -> Self
pub fn neg(&self) -> Self
pub fn recip(&self) -> Self
pub fn sin(&self) -> Self
pub fn cos(&self) -> Self
pub fn tan(&self) -> Self
pub fn asin(&self) -> Self
pub fn acos(&self) -> Self
pub fn atan(&self) -> Self
pub fn exp(&self) -> Self
pub fn ln(&self) -> Self
pub fn not(&self) -> Self
pub fn abs(&self) -> Self
Trait Implementations§
Source§impl<A: Into<Tree>> AddAssign<A> for Tree
impl<A: Into<Tree>> AddAssign<A> for Tree
Source§fn add_assign(&mut self, other: A)
fn add_assign(&mut self, other: A)
Performs the
+= operation. Read moreSource§impl<A: Into<Tree>> DivAssign<A> for Tree
impl<A: Into<Tree>> DivAssign<A> for Tree
Source§fn div_assign(&mut self, other: A)
fn div_assign(&mut self, other: A)
Performs the
/= operation. Read moreSource§impl<A: Into<Tree>> MulAssign<A> for Tree
impl<A: Into<Tree>> MulAssign<A> for Tree
Source§fn mul_assign(&mut self, other: A)
fn mul_assign(&mut self, other: A)
Performs the
*= operation. Read moreSource§impl<A: Into<Tree>> SubAssign<A> for Tree
impl<A: Into<Tree>> SubAssign<A> for Tree
Source§fn sub_assign(&mut self, other: A)
fn sub_assign(&mut self, other: A)
Performs the
-= operation. Read moreimpl Eq for Tree
Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnsafeUnpin for Tree
impl UnwindSafe for Tree
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.