pub enum CombineRule {
Average,
Min,
Multiply,
Max,
}Expand description
How two surfaces’ values for one property become the contact’s.
When the two surfaces ask for different rules, the one later in this list
wins — Average gives way to anything, and
Max to nothing. That precedence is PhysX’s PxCombineMode,
which Unity’s physics materials expose the same way; taking it rather than
inventing one means a content author’s expectation carries over.
Variants§
Average
The mean of the two values.
Min
The smaller value.
Multiply
The product of the values.
Max
The larger value.
Implementations§
Trait Implementations§
Source§impl Clone for CombineRule
impl Clone for CombineRule
impl Copy for CombineRule
Source§impl Debug for CombineRule
impl Debug for CombineRule
Source§impl Default for CombineRule
impl Default for CombineRule
impl Eq for CombineRule
Source§impl Hash for CombineRule
impl Hash for CombineRule
Source§impl Ord for CombineRule
impl Ord for CombineRule
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CombineRule
impl PartialEq for CombineRule
Source§impl PartialOrd for CombineRule
impl PartialOrd for CombineRule
impl StructuralPartialEq for CombineRule
Auto Trait Implementations§
impl Forget for CombineRule
impl Freeze for CombineRule
impl Move for CombineRule
impl RefUnwindSafe for CombineRule
impl Send for CombineRule
impl Sync for CombineRule
impl Unpin for CombineRule
impl UnsafeUnpin for CombineRule
impl UnwindSafe for CombineRule
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