[][src]Struct kiss3d::scene::SceneNodeData

pub struct SceneNodeData { /* fields omitted */ }

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]

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 disk
  • name - &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 disk
  • image_data - slice of bytes containing encoded image
  • name - &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]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,