Struct bevy_debug_grid::GridAxis
source · pub struct GridAxis {
pub x: Option<Color>,
pub y: Option<Color>,
pub z: Option<Color>,
}Expand description
Custom color overrides for axis of a grid. Spawn it next to a grid for it to have effect.
Fields§
§x: Option<Color>Color of the X axis
y: Option<Color>Color of the Y axis
z: Option<Color>Color of the Z axis
Implementations§
source§impl GridAxis
impl GridAxis
sourcepub fn new_rgb() -> Self
pub fn new_rgb() -> Self
Creates a grid axis with each axis having a color. Red for X, green for Y, and blue for Z.
sourcepub fn create_single_axis(size: f32, alignment: GridAlignment) -> [Vec3; 2]
pub fn create_single_axis(size: f32, alignment: GridAlignment) -> [Vec3; 2]
Creates a single axis mesh consisting of two Vec3s
sourcepub fn create_axis(&self) -> (Vec<(GridAlignment, Color)>, Vec<GridAlignment>)
pub fn create_axis(&self) -> (Vec<(GridAlignment, Color)>, Vec<GridAlignment>)
Creates grid axis from the configured colors.
Returns a vector of used axis with their corresponding color, as well as a vector of unused axis, (used, unused).
sourcepub fn default_axis() -> [GridAlignment; 2]
pub fn default_axis() -> [GridAlignment; 2]
Returns the default axis for a grid
sourcepub fn get_by_alignment(&self, alignment: &GridAlignment) -> Option<Color>
pub fn get_by_alignment(&self, alignment: &GridAlignment) -> Option<Color>
Returns an axis color by grid alignment, if such a color is configured per that axis
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for GridAxis
impl Send for GridAxis
impl Sync for GridAxis
impl Unpin for GridAxis
impl UnwindSafe for GridAxis
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere U: ShaderType, &'a T: for<'a> Into<U>,
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
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
Mutably borrows from an owned value. Read more
§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId) )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> Cwhere F: for<'a> FnMut(&'a mut T) -> OwningPtr<'a, Aligned>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere C: Component,
fn get_components( self, func: &mut impl FnMut(StorageType, OwningPtr<'_, Aligned>) )
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self using data from the given [World]