pub struct TransformGizmoStyle {Show 36 fields
pub show_axis_lines: bool,
pub show_translate: bool,
pub translate_axes: AxisToggles,
pub show_rotate: bool,
pub rotate_axes: AxisToggles,
pub show_scale: bool,
pub scale_axes: AxisToggles,
pub line_width: f32,
pub depth_bias: f32,
pub axis_length: f32,
pub axis_lines: AxisColors,
pub translate: AxisColors,
pub rotate: AxisColors,
pub scale: AxisColors,
pub translate_cone_length: f32,
pub translate_cone_radius: f32,
pub translate_hit_radius: f32,
pub scale_cube_size: f32,
pub scale_cube_offset: f32,
pub scale_hit_radius: f32,
pub rotation_arc_degrees: f32,
pub rotation_arc_segments: usize,
pub rotation_arc_thickness: f32,
pub rotation_hit_thickness: f32,
pub bounds_radius: f32,
pub show_translate_planes: bool,
pub translate_plane_size: f32,
pub translate_plane_offset: f32,
pub translate_plane_hit_thickness: f32,
pub show_scale_uniform: bool,
pub scale_uniform_size: f32,
pub scale_uniform_hit_radius: f32,
pub scale_uniform_colors: GizmoStateColors,
pub show_origin_dot: bool,
pub origin_dot_size: f32,
pub origin_dot_color: Color,
}Expand description
Visual style and sizing configuration for the transform gizmo.
This resource controls all aspects of gizmo appearance including colors, sizes, and which elements are visible. Modify this at runtime to customize the gizmo appearance.
Fields§
§show_axis_lines: boolWhether to draw the primary XYZ axis lines.
show_translate: boolWhether to show translation handles.
translate_axes: AxisTogglesWhich axes have translation handles enabled.
show_rotate: boolWhether to show rotation handles.
rotate_axes: AxisTogglesWhich axes have rotation handles enabled.
show_scale: boolWhether to show scale handles.
scale_axes: AxisTogglesWhich axes have scale handles enabled.
line_width: f32Line width for gizmo rendering (in pixels).
depth_bias: f32Depth bias to draw gizmos on top of regular geometry. Negative values bring the gizmo closer to the camera.
axis_length: f32Length of each axis line (in world units).
axis_lines: AxisColorsColors for the main axis lines.
translate: AxisColorsColors for translation handles.
rotate: AxisColorsColors for rotation handles.
scale: AxisColorsColors for scale handles.
translate_cone_length: f32Length of the translation cone from base to tip.
translate_cone_radius: f32Radius of the translation cone at its base.
translate_hit_radius: f32Hit detection radius for translation cones.
scale_cube_size: f32Edge length of the scale cube handles.
scale_cube_offset: f32Position of scale cubes as a fraction of axis_length.
scale_hit_radius: f32Hit detection radius for scale cubes.
rotation_arc_degrees: f32Angular extent of each rotation arc (in degrees).
rotation_arc_segments: usizeNumber of line segments per rotation arc.
rotation_arc_thickness: f32Visual thickness of rotation arcs.
rotation_hit_thickness: f32Hit detection thickness for rotation arcs.
bounds_radius: f32Bounding sphere radius for early-out hit testing.
show_translate_planes: boolWhether to show planar translation handles (XY, XZ, YZ planes).
translate_plane_size: f32Side length of planar translation rectangles.
translate_plane_offset: f32Offset of plane handles from the origin along each axis.
translate_plane_hit_thickness: f32Hit detection padding for planar handles.
show_scale_uniform: boolWhether to show the uniform scale handle at the origin.
scale_uniform_size: f32Side length of the uniform scale square.
scale_uniform_hit_radius: f32Hit detection radius for the uniform scale handle.
scale_uniform_colors: GizmoStateColorsColors for the uniform scale handle.
show_origin_dot: boolWhether to draw the origin marker.
origin_dot_size: f32Size of the origin marker.
origin_dot_color: ColorColor of the origin marker.
Trait Implementations§
Source§impl Clone for TransformGizmoStyle
impl Clone for TransformGizmoStyle
Source§fn clone(&self) -> TransformGizmoStyle
fn clone(&self) -> TransformGizmoStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Component for TransformGizmoStyle
impl Component for TransformGizmoStyle
Source§const STORAGE_TYPE: StorageType = ::bevy::ecs::component::StorageType::SparseSet
const STORAGE_TYPE: StorageType = ::bevy::ecs::component::StorageType::SparseSet
Source§type Mutability = Mutable
type Mutability = Mutable
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Source§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
ComponentRelationshipAccessor required for working with relationships in dynamic contexts. Read moreSource§fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read moreSource§impl Default for TransformGizmoStyle
impl Default for TransformGizmoStyle
impl Resource for TransformGizmoStyle
Auto Trait Implementations§
impl Freeze for TransformGizmoStyle
impl RefUnwindSafe for TransformGizmoStyle
impl Send for TransformGizmoStyle
impl Sync for TransformGizmoStyle
impl Unpin for TransformGizmoStyle
impl UnsafeUnpin for TransformGizmoStyle
impl UnwindSafe for TransformGizmoStyle
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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
Source§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut ComponentsRegistrator<'_>, ) -> impl Iterator<Item = ComponentId> + use<C>
Source§fn get_component_ids(
components: &Components,
) -> impl Iterator<Item = Option<ComponentId>>
fn get_component_ids( components: &Components, ) -> impl Iterator<Item = Option<ComponentId>>
Source§impl<C> BundleFromComponents for Cwhere
C: Component,
impl<C> BundleFromComponents for Cwhere
C: Component,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
Source§unsafe fn get_components(
ptr: MovingPtr<'_, C>,
func: &mut impl FnMut(StorageType, OwningPtr<'_>),
) -> <C as DynamicBundle>::Effect
unsafe fn get_components( ptr: MovingPtr<'_, C>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), ) -> <C as DynamicBundle>::Effect
Source§unsafe fn apply_effect(
_ptr: MovingPtr<'_, MaybeUninit<C>>,
_entity: &mut EntityWorldMut<'_>,
)
unsafe fn apply_effect( _ptr: MovingPtr<'_, MaybeUninit<C>>, _entity: &mut EntityWorldMut<'_>, )
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
impl<T> Settings for T
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.