Struct three::Object
[−]
[src]
pub struct Object { /* fields omitted */ }
Object
represents an entity that can be added to the scene.
There is no need to use Object
directly, there are specific wrapper types
for each case (e.g. Camera
,
AmbientLight
,
Mesh
, ...).
Methods
impl Object
[src]
fn set_visible(&mut self, visible: bool)
Invisible objects are not rendered by cameras.
fn look_at<P>(&mut self, eye: P, target: P, up: Option<Vector3<f32>>) where
P: Into<[f32; 3]>,
P: Into<[f32; 3]>,
Rotates object in the specific direction of target
.
fn set_transform<P, Q>(&mut self, pos: P, rot: Q, scale: f32) where
P: Into<Point3<f32>>,
Q: Into<Quaternion<f32>>,
P: Into<Point3<f32>>,
Q: Into<Quaternion<f32>>,
Set both position, orientation and scale.
fn set_position<P>(&mut self, pos: P) where
P: Into<Point3<f32>>,
P: Into<Point3<f32>>,
Set position.
fn set_orientation<Q>(&mut self, rot: Q) where
Q: Into<Quaternion<f32>>,
Q: Into<Quaternion<f32>>,
Set orientation.
fn set_scale(&mut self, scale: f32)
Set scale.
fn sync(&mut self, scene: &Scene) -> NodeInfo
Get actual information about itself from the scene
.
Panics
Panics if scene
doesn't have this Object
.
Trait Implementations
impl AsRef<NodePointer> for Object
[src]
fn as_ref(&self) -> &NodePointer
Performs the conversion.
impl Clone for Object
[src]
fn clone(&self) -> Object
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more