Struct lotus_script::gizmos::Gizmo
pub struct Gizmo {
pub kind: GizmoKind,
pub color: Color,
}
Expand description
A gizmo to draw in the game. A gizmo is a visual indicator of something in the game. It is used to help with debugging and development. Gizmos are drawn relative to the center of the object the script is attached to.
Fields§
§kind: GizmoKind
§color: Color
Implementations§
§impl Gizmo
impl Gizmo
pub fn wire_cube(
center: impl Into<Vec3>,
half_extents: impl Into<Vec3>,
color: Color
) -> Gizmo
pub fn wire_cube( center: impl Into<Vec3>, half_extents: impl Into<Vec3>, color: Color ) -> Gizmo
Create a new wire cube gizmo.
pub fn wire_sphere(
center: impl Into<Vec3>,
radius: impl Into<f32>,
color: Color
) -> Gizmo
pub fn wire_sphere( center: impl Into<Vec3>, radius: impl Into<f32>, color: Color ) -> Gizmo
Create a new wire sphere gizmo.
pub fn arrow(
start: impl Into<Vec3>,
end: impl Into<Vec3>,
color: Color
) -> Gizmo
pub fn arrow( start: impl Into<Vec3>, end: impl Into<Vec3>, color: Color ) -> Gizmo
Create a new arrow gizmo.
pub fn draw(&self)
pub fn draw(&self)
Draw the gizmo.
Trait Implementations§
§impl<'de> Deserialize<'de> for Gizmo
impl<'de> Deserialize<'de> for Gizmo
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Gizmo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Gizmo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for Gizmo
impl Serialize for Gizmo
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for Gizmo
Auto Trait Implementations§
impl Freeze for Gizmo
impl RefUnwindSafe for Gizmo
impl Send for Gizmo
impl Sync for Gizmo
impl Unpin for Gizmo
impl UnwindSafe for Gizmo
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