pub enum GizmoMode {
Show 19 variants
RotateView,
RotateX,
RotateY,
RotateZ,
TranslateView,
TranslateX,
TranslateY,
TranslateZ,
TranslateXY,
TranslateXZ,
TranslateYZ,
ScaleUniform,
ScaleX,
ScaleY,
ScaleZ,
ScaleXY,
ScaleXZ,
ScaleYZ,
Arcball,
}
Expand description
Operation mode of a gizmo.
Variants§
RotateView
Rotate around the view forward axis
RotateX
Rotate around the X axis
RotateY
Rotate around the Y axis
RotateZ
Rotate around the Z axis
TranslateView
Translate along the view forward axis
TranslateX
Translate along the X axis
TranslateY
Translate along the Y axis
TranslateZ
Translate along the Z axis
TranslateXY
Translate along the XY plane
TranslateXZ
Translate along the XZ plane
TranslateYZ
Translate along the YZ plane
ScaleUniform
Scale uniformly in all directions
ScaleX
Scale along the X axis
ScaleY
Scale along the Y axis
ScaleZ
Scale along the Z axis
ScaleXY
Scale along the XY plane
ScaleXZ
Scale along the XZ plane
ScaleYZ
Scale along the YZ plane
Arcball
Rotate using an arcball (trackball)
Implementations§
Source§impl GizmoMode
impl GizmoMode
Sourcepub const fn all_rotate() -> EnumSet<Self>
pub const fn all_rotate() -> EnumSet<Self>
All rotation modes
Sourcepub const fn all_translate() -> EnumSet<Self>
pub const fn all_translate() -> EnumSet<Self>
All translation modes
Sourcepub fn is_translate(&self) -> bool
pub fn is_translate(&self) -> bool
Is this mode for translation
Sourcepub fn axes(&self) -> EnumSet<GizmoDirection>
pub fn axes(&self) -> EnumSet<GizmoDirection>
Axes this mode acts on
Sourcepub fn all_from_axes(axes: EnumSet<GizmoDirection>) -> EnumSet<Self>
pub fn all_from_axes(axes: EnumSet<GizmoDirection>) -> EnumSet<Self>
Returns the modes that match to given axes exactly
pub fn kind(&self) -> GizmoModeKind
pub fn all_from_kind(kind: GizmoModeKind) -> EnumSet<Self>
pub fn from_kind_and_axes( kind: GizmoModeKind, axes: EnumSet<GizmoDirection>, ) -> Option<Self>
Trait Implementations§
Source§impl EnumSetTypePrivate for GizmoMode
impl EnumSetTypePrivate for GizmoMode
Source§const CONST_HELPER_INSTANCE: __EnumSetConstHelper = __EnumSetConstHelper
const CONST_HELPER_INSTANCE: __EnumSetConstHelper = __EnumSetConstHelper
The instance of the
ConstHelper
.Source§const ALL_BITS: Self::Repr = {transmute(0x0007ffff): <config::GizmoMode as enumset::__internal::EnumSetTypePrivate>::Repr}
const ALL_BITS: Self::Repr = {transmute(0x0007ffff): <config::GizmoMode as enumset::__internal::EnumSetTypePrivate>::Repr}
A mask of bits that are valid in the bitset.
Source§const VARIANT_COUNT: u32 = 19u32
const VARIANT_COUNT: u32 = 19u32
The number of variants in the bitset.
Source§type ConstHelper = __EnumSetConstHelper
type ConstHelper = __EnumSetConstHelper
A helper type used to implement the
enum_set!
macro among other things.Source§fn enum_into_u32(self) -> u32
fn enum_into_u32(self) -> u32
Converts an enum of this type into its bit position.
Source§unsafe fn enum_from_u32(val: u32) -> Self
unsafe fn enum_from_u32(val: u32) -> Self
Converts a bit position into an enum value.
impl Copy for GizmoMode
impl EnumSetType for GizmoMode
impl Eq for GizmoMode
Auto Trait Implementations§
impl Freeze for GizmoMode
impl RefUnwindSafe for GizmoMode
impl Send for GizmoMode
impl Sync for GizmoMode
impl Unpin for GizmoMode
impl UnwindSafe for GizmoMode
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