[−][src]Struct kiss3d::scene::SceneNodeData
The datas contained by a SceneNode
.
Implementations
impl SceneNodeData
[src]
pub fn has_object(&self) -> bool
[src]
Whether this node contains an Object
.
pub fn is_root(&self) -> bool
[src]
Whether this node has no parent.
pub fn render(&mut self, pass: usize, camera: &mut dyn Camera, light: &Light)
[src]
Render the scene graph rooted by this node.
pub fn object(&self) -> Option<&Object>
[src]
A reference to the object possibly contained by this node.
pub fn object_mut(&mut self) -> Option<&mut Object>
[src]
A mutable reference to the object possibly contained by this node.
pub fn get_object(&self) -> &Object
[src]
A reference to the object possibly contained by this node.
Failure
Fails of this node does not contains an object.
pub fn get_object_mut(&mut self) -> &mut Object
[src]
A mutable reference to the object possibly contained by this node.
Failure
Fails of this node does not contains an 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 the objects contained by this node and its children.
pub fn set_material_with_name(&mut self, name: &str)
[src]
Sets the material of the objects contained by this node and its children.
The material must already have been registered as name
.
pub fn set_lines_width(&mut self, width: f32)
[src]
Sets the width of the lines drawn for the objects contained by this node and its children.
pub fn set_lines_color(&mut self, color: Option<Point3<f32>>)
[src]
Sets the color of the lines drawn for the objects contained by this node and its children.
pub fn set_points_size(&mut self, size: f32)
[src]
Sets the size of the points drawn for the objects contained by this node and its children.
pub fn set_surface_rendering_activation(&mut self, active: bool)
[src]
Activates or deactivates the rendering of the surfaces of the objects contained by this node and its children.
pub fn enable_backface_culling(&mut self, active: bool)
[src]
Activates or deactivates backface culling for the objects contained by this node and its children.
pub fn modify_vertices<F: FnMut(&mut Vec<Point3<f32>>)>(&mut self, f: &mut F)
[src]
Mutably accesses the vertices of the objects contained by this node and its children.
The provided closure is called once per object.
pub fn read_vertices<F: FnMut(&[Point3<f32>])>(&self, f: &mut F)
[src]
Accesses the vertices of the objects contained by this node and its children.
The provided closure is called once per object.
pub fn recompute_normals(&mut self)
[src]
Recomputes the normals of the meshes of the objects contained by this node and its children.
pub fn modify_normals<F: FnMut(&mut Vec<Vector3<f32>>)>(&mut self, f: &mut F)
[src]
Mutably accesses the normals of the objects contained by this node and its children.
The provided closure is called once per object.
pub fn read_normals<F: FnMut(&[Vector3<f32>])>(&self, f: &mut F)
[src]
Accesses the normals of the objects contained by this node and its children.
The provided closure is called once per object.
pub fn modify_faces<F: FnMut(&mut Vec<Point3<u16>>)>(&mut self, f: &mut F)
[src]
Mutably accesses the faces of the objects contained by this node and its children.
The provided closure is called once per object.
pub fn read_faces<F: FnMut(&[Point3<u16>])>(&self, f: &mut F)
[src]
Accesses the faces of the objects contained by this node and its children.
The provided closure is called once per object.
pub fn modify_uvs<F: FnMut(&mut Vec<Point2<f32>>)>(&mut self, f: &mut F)
[src]
Mutably accesses the texture coordinates of the objects contained by this node and its children.
The provided closure is called once per object.
pub fn read_uvs<F: FnMut(&[Point2<f32>])>(&self, f: &mut F)
[src]
Accesses the texture coordinates of the objects contained by this node and its children.
The provided closure is called once per object.
pub fn is_visible(&self) -> bool
[src]
Get the visibility status of node.
pub fn set_visible(&mut self, visible: bool)
[src]
Sets the visibility of this node.
The node and its children are not rendered if it is not visible.
pub fn set_color(&mut self, r: f32, g: f32, b: f32)
[src]
Sets the color of the objects contained by this node and its children.
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 objects contained by this node and its children.
The texture is loaded from a file and registered by the global TextureManager
.
Arguments
path
- relative path of the texture on the diskname
- &str identifier to store this texture under
pub fn set_texture_from_memory(&mut self, image_data: &[u8], name: &str)
[src]
Sets the texture of the objects contained by this node and its children.
The texture is loaded from a byte slice and registered by the global TextureManager
.
Arguments
path
- relative path of the texture on the diskimage_data
- slice of bytes containing encoded imagename
- &str identifier to store this texture under
pub fn set_texture_with_name(&mut self, name: &str)
[src]
Sets the texture of the objects contained by this node and its children.
The texture must already have been registered as name
.
pub fn set_texture(&mut self, texture: Rc<Texture>)
[src]
Sets the texture of the objects contained by this node and its children.
pub fn apply_to_objects_mut<F: FnMut(&mut Object)>(&mut self, f: &mut F)
[src]
Applies a closure to each object contained by this node and its children.
pub fn apply_to_objects<F: FnMut(&Object)>(&self, f: &mut F)
[src]
Applies a closure to each object contained by this node and its children.
pub fn set_local_scale(&mut self, sx: f32, sy: f32, sz: f32)
[src]
Sets the local scaling factors of the object.
pub fn local_scale(&self) -> Vector3<f32>
[src]
Returns the scaling factors of the object.
pub fn reorient(
&mut self,
eye: &Point3<f32>,
at: &Point3<f32>,
up: &Vector3<f32>
)
[src]
&mut self,
eye: &Point3<f32>,
at: &Point3<f32>,
up: &Vector3<f32>
)
Move and orient the object such that it is placed at the point eye
and have its z
axis
oriented toward at
.
pub fn local_transformation(&self) -> Isometry3<f32>
[src]
This node local transformation.
pub fn inverse_local_transformation(&self) -> Isometry3<f32>
[src]
Inverse of this node local transformation.
pub fn world_transformation(&self) -> Isometry3<f32>
[src]
This node world transformation.
This will force an update of the world transformation of its parents if they have been invalidated.
pub fn inverse_world_transformation(&self) -> Isometry3<f32>
[src]
The inverse of this node world transformation.
This will force an update of the world transformation of its parents if they have been invalidated.
pub fn append_transformation(&mut self, t: &Isometry3<f32>)
[src]
Appends a transformation to this node local transformation.
pub fn prepend_to_local_transformation(&mut self, t: &Isometry3<f32>)
[src]
Prepends a transformation to this node local transformation.
pub fn set_local_transformation(&mut self, t: Isometry3<f32>)
[src]
Set this node local transformation.
pub fn local_translation(&self) -> Translation3<f32>
[src]
This node local translation.
pub fn inverse_local_translation(&self) -> Translation3<f32>
[src]
The inverse of this node local translation.
pub fn append_translation(&mut self, t: &Translation3<f32>)
[src]
Appends a translation to this node local transformation.
pub fn prepend_to_local_translation(&mut self, t: &Translation3<f32>)
[src]
Prepends a translation to this node local transformation.
pub fn set_local_translation(&mut self, t: Translation3<f32>)
[src]
Sets the local translation of this node.
pub fn local_rotation(&self) -> UnitQuaternion<f32>
[src]
This node local rotation.
pub fn inverse_local_rotation(&self) -> UnitQuaternion<f32>
[src]
The inverse of this node local rotation.
pub fn append_rotation(&mut self, r: &UnitQuaternion<f32>)
[src]
Appends a rotation to this node local transformation.
pub fn append_rotation_wrt_center(&mut self, r: &UnitQuaternion<f32>)
[src]
Appends a rotation to this node local transformation.
pub fn prepend_to_local_rotation(&mut self, r: &UnitQuaternion<f32>)
[src]
Prepends a rotation to this node local transformation.
pub fn set_local_rotation(&mut self, r: UnitQuaternion<f32>)
[src]
Sets the local rotation of this node.
Auto Trait Implementations
impl !RefUnwindSafe for SceneNodeData
[src]
impl !Send for SceneNodeData
[src]
impl !Sync for SceneNodeData
[src]
impl Unpin for SceneNodeData
[src]
impl !UnwindSafe for SceneNodeData
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,