Trait three::Object
[−]
[src]
pub trait Object: AsRef<Base> { fn upcast(&self) -> Base { ... } fn set_visible(&self, visible: bool) { ... } fn set_transform<P, Q>(&self, pos: P, rot: Q, scale: f32)
where
Self: Sized,
P: Into<Point3<f32>>,
Q: Into<Quaternion<f32>>, { ... } fn set_position<P>(&self, pos: P)
where
Self: Sized,
P: Into<Point3<f32>>, { ... } fn set_orientation<Q>(&self, rot: Q)
where
Self: Sized,
Q: Into<Quaternion<f32>>, { ... } fn set_scale(&self, scale: f32) { ... } fn set_weights(&self, weights: Vec<f32>) { ... } fn look_at<E, T>(&self, eye: E, target: T, up: Option<Vector3<f32>>)
where
Self: Sized,
E: Into<Point3<f32>>,
T: Into<Point3<f32>>, { ... } }
Marks data structures that are able to added to the scene graph.
Provided Methods
fn upcast(&self) -> Base
Converts into the base type.
fn set_visible(&self, visible: bool)
Invisible objects are not rendered by cameras.
fn set_transform<P, Q>(&self, pos: P, rot: Q, scale: f32) where
Self: Sized,
P: Into<Point3<f32>>,
Q: Into<Quaternion<f32>>,
Self: Sized,
P: Into<Point3<f32>>,
Q: Into<Quaternion<f32>>,
Set both position, orientation and scale.
fn set_position<P>(&self, pos: P) where
Self: Sized,
P: Into<Point3<f32>>,
Self: Sized,
P: Into<Point3<f32>>,
Set position.
fn set_orientation<Q>(&self, rot: Q) where
Self: Sized,
Q: Into<Quaternion<f32>>,
Self: Sized,
Q: Into<Quaternion<f32>>,
Set orientation.
fn set_scale(&self, scale: f32)
Set scale.
fn set_weights(&self, weights: Vec<f32>)
Set weights.
fn look_at<E, T>(&self, eye: E, target: T, up: Option<Vector3<f32>>) where
Self: Sized,
E: Into<Point3<f32>>,
T: Into<Point3<f32>>,
Self: Sized,
E: Into<Point3<f32>>,
T: Into<Point3<f32>>,
Rotates object in the specific direction of target
.
Implementors
impl Object for Source
impl Object for Camera
impl Object for Ambient
impl Object for Directional
impl Object for Hemisphere
impl Object for Point
impl Object for Mesh
impl Object for DynamicMesh
impl Object for Base
impl Object for Group
impl Object for Skeleton
impl Object for Bone
impl Object for Sprite
impl Object for Text