pub struct Circle<M: Material> { /* private fields */ }Implementations
sourceimpl<M: Material> Circle<M>
impl<M: Material> Circle<M>
pub fn new_with_material(
context: &Context,
center: Vec2,
radius: f32,
material: M
) -> ThreeDResult<Self>
pub fn set_radius(&mut self, radius: f32)
pub fn radius(&self) -> f32
pub fn set_center(&mut self, center: Vec2)
pub fn center(&self) -> &Vec2
Trait Implementations
sourceimpl<M: Material> Object2D for Circle<M>
impl<M: Material> Object2D for Circle<M>
sourcefn render(&self, viewport: Viewport) -> ThreeDResult<()>
fn render(&self, viewport: Viewport) -> ThreeDResult<()>
Render the object. Must be called in a render target render function, for example in the callback function of Screen::write. Read more
sourcefn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Returns whether or not this object should be considered transparent. Read more
sourceimpl<M: Material> Shadable2D for Circle<M>
impl<M: Material> Shadable2D for Circle<M>
sourcefn render_with_material(
&self,
material: &dyn Material,
viewport: Viewport
) -> ThreeDResult<()>
fn render_with_material(
&self,
material: &dyn Material,
viewport: Viewport
) -> ThreeDResult<()>
Render the object with the given material. Must be called in a render target render function, for example in the callback function of Screen::write. Read more
sourcefn render_forward(
&self,
material: &dyn Material,
viewport: Viewport
) -> ThreeDResult<()>
fn render_forward(
&self,
material: &dyn Material,
viewport: Viewport
) -> ThreeDResult<()>
use render_with_material instead
Render the object with the given material. Must be called in a render target render function, for example in the callback function of Screen::write. Read more
Auto Trait Implementations
impl<M> !RefUnwindSafe for Circle<M>
impl<M> !Send for Circle<M>
impl<M> !Sync for Circle<M>
impl<M> Unpin for Circle<M> where
M: Unpin,
impl<M> !UnwindSafe for Circle<M>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more