pub struct SdfModel(_);
Expand description
An Sdf (signed distance field) that can be rendered directly.
It can also be used as the shape of a bone. Unlike the procedural api, ref counting is not built in, wrap it in an Arc if you need it.
Implementations
sourceimpl SdfModel
impl SdfModel
Simple Saft Sdf graph rendering. Any parameter can be directly modified by changing the dynamic constants.
Changing dynamic_constants
will result in full re-meshing.
sourcepub fn draw(
&self,
instance_data: &[SdfInstanceData],
dynamic_constants: &[f32],
bounding_boxes: &[BoundingBox]
)
pub fn draw(
&self,
instance_data: &[SdfInstanceData],
dynamic_constants: &[f32],
bounding_boxes: &[BoundingBox]
)
Renders the Sdf function.
In instance_data
you can specify a world transform and other parameters.
Changing the shape through dynamic_constants
may incur a performance hit due to remeshing.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SdfModel
impl Send for SdfModel
impl Sync for SdfModel
impl Unpin for SdfModel
impl UnwindSafe for SdfModel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more