[−][src]Struct kiss3d::scene::Object
A 3d objects on the scene.
This is the only interface to manipulate the object position, color, vertices and texture.
Methods
impl Object
[src]
pub fn data(&self) -> &ObjectData
[src]
Gets the data of this object.
pub fn data_mut(&mut self) -> &mut ObjectData
[src]
Gets the data of this object.
pub fn enable_backface_culling(&mut self, active: bool)
[src]
Enables or disables backface culling for this object.
pub fn set_user_data(&mut self, user_data: Box<dyn Any + 'static>)
[src]
Attaches user-defined data to this object.
pub fn material(&self) -> Rc<RefCell<Box<dyn Material + 'static>>>
[src]
Gets the material of this object.
pub fn set_material(
&mut self,
material: Rc<RefCell<Box<dyn Material + 'static>>>
)
[src]
&mut self,
material: Rc<RefCell<Box<dyn Material + 'static>>>
)
Sets the material of this object.
pub fn set_lines_width(&mut self, width: f32)
[src]
Sets the width of the lines drawn for this object.
pub fn lines_width(&self) -> f32
[src]
Returns the width of the lines drawn for this object.
pub fn set_points_size(&mut self, size: f32)
[src]
Sets the size of the points drawn for this object.
pub fn points_size(&self) -> f32
[src]
Returns the size of the points drawn for this object.
pub fn set_surface_rendering_activation(&mut self, active: bool)
[src]
Activate or deactivate the rendering of this object surface.
pub fn surface_rendering_activation(&self) -> bool
[src]
Activate or deactivate the rendering of this object surface.
pub fn mesh(&self) -> &Rc<RefCell<Mesh>>
[src]
This object's mesh.
pub fn modify_vertices<F: FnMut(&mut Vec<Point3<f32>>)>(&mut self, f: &mut F)
[src]
Mutably access the object's vertices.
pub fn read_vertices<F: FnMut(&[Point3<f32>])>(&self, f: &mut F)
[src]
Access the object's vertices.
pub fn recompute_normals(&mut self)
[src]
Recomputes the normals of this object's mesh.
pub fn modify_normals<F: FnMut(&mut Vec<Vector3<f32>>)>(&mut self, f: &mut F)
[src]
Mutably access the object's normals.
pub fn read_normals<F: FnMut(&[Vector3<f32>])>(&self, f: &mut F)
[src]
Access the object's normals.
pub fn modify_faces<F: FnMut(&mut Vec<Point3<u16>>)>(&mut self, f: &mut F)
[src]
Mutably access the object's faces.
pub fn read_faces<F: FnMut(&[Point3<u16>])>(&self, f: &mut F)
[src]
Access the object's faces.
pub fn modify_uvs<F: FnMut(&mut Vec<Point2<f32>>)>(&mut self, f: &mut F)
[src]
Mutably access the object's texture coordinates.
pub fn read_uvs<F: FnMut(&[Point2<f32>])>(&self, f: &mut F)
[src]
Access the object's texture coordinates.
pub fn set_color(&mut self, r: f32, g: f32, b: f32)
[src]
Sets the color of the object.
Colors components must be on the range [0.0, 1.0]
.
pub fn set_texture_from_file(&mut self, path: &Path, name: &str)
[src]
Sets the texture of the object.
The texture is loaded from a file and registered by the global TextureManager
.
Arguments
path
- relative path of the texture on the disk
pub fn set_texture_with_name(&mut self, name: &str)
[src]
Sets the texture of the object.
The texture must already have been registered as name
.
pub fn set_texture(&mut self, texture: Rc<Texture>)
[src]
Sets the texture of the object.
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> Same for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> Downcast for T where
T: Any,
T: Any,