pub struct Grabber { /* private fields */ }Expand description
A grabber which is used to render a part of the scene to a texture by a grid of vertices.
Implementations§
Source§impl Grabber
impl Grabber
Sourcepub fn set_camera(&mut self, val: &dyn ICamera)
pub fn set_camera(&mut self, val: &dyn ICamera)
Sets the camera used to render the texture.
Sourcepub fn get_camera(&self) -> Option<Camera>
pub fn get_camera(&self) -> Option<Camera>
Gets the camera used to render the texture.
Sourcepub fn set_effect(&mut self, val: &SpriteEffect)
pub fn set_effect(&mut self, val: &SpriteEffect)
Sets the sprite effect applied to the texture.
Sourcepub fn get_effect(&self) -> Option<SpriteEffect>
pub fn get_effect(&self) -> Option<SpriteEffect>
Gets the sprite effect applied to the texture.
Sourcepub fn set_blend_func(&mut self, val: BlendFunc)
pub fn set_blend_func(&mut self, val: BlendFunc)
Sets the blend function for the grabber.
Sourcepub fn get_blend_func(&self) -> BlendFunc
pub fn get_blend_func(&self) -> BlendFunc
Gets the blend function for the grabber.
Sourcepub fn set_clear_color(&mut self, val: &Color)
pub fn set_clear_color(&mut self, val: &Color)
Sets the clear color used to clear the texture.
Sourcepub fn get_clear_color(&self) -> Color
pub fn get_clear_color(&self) -> Color
Gets the clear color used to clear the texture.
Sourcepub fn set_pos(&mut self, x: i32, y: i32, pos: &Vec2, z: f32)
pub fn set_pos(&mut self, x: i32, y: i32, pos: &Vec2, z: f32)
Sets the position of a vertex in the grabber grid.
§Arguments
x- The x-index of the vertex in the grabber grid.y- The y-index of the vertex in the grabber grid.pos- The new position of the vertex, represented by a Vec2 object.z- An optional argument representing the new z-coordinate of the vertex.
Sourcepub fn set_color(&mut self, x: i32, y: i32, color: &Color)
pub fn set_color(&mut self, x: i32, y: i32, color: &Color)
Sets the color of a vertex in the grabber grid.
§Arguments
x- The x-index of the vertex in the grabber grid.y- The y-index of the vertex in the grabber grid.color- The new color of the vertex, represented by a Color object.
Sourcepub fn move_uv(&mut self, x: i32, y: i32, offset: &Vec2)
pub fn move_uv(&mut self, x: i32, y: i32, offset: &Vec2)
Sets the UV coordinates of a vertex in the grabber grid.
§Arguments
x- The x-index of the vertex in the grabber grid.y- The y-index of the vertex in the grabber grid.offset- The new UV coordinates of the vertex, represented by a Vec2 object.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Grabber
impl RefUnwindSafe for Grabber
impl Send for Grabber
impl Sync for Grabber
impl Unpin for Grabber
impl UnwindSafe for Grabber
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