[][src]Trait three::object::Object

pub trait Object: AsRef<Base> {
    type Data;
    fn resolve_data(&self, sync_guard: &SyncGuard) -> Self::Data;

    fn upcast(&self) -> Base { ... }
fn set_visible(&self, visible: bool) { ... }
fn set_name<S: Into<String>>(&self, name: S) { ... }
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.

Associated Types

The internal data for the object.

Three-rs objects normally expose a write-only interface, making it possible to change an object's internal values but not possible to read those values. SyncGuard::resolve_data allows for that data to be read in a controlled way, with. the data for the specific object type determined by the Data trait member.

Each object type has its own internal data, and not all object types can provide access to meaningful data. Types that cannot provide user-facing data will specify () for Data.

Loading content...

Required methods

Retrieves the internal data for the object.

Prefer to use SyncGuard::resolve_data over calling this directly.

Loading content...

Provided methods

Converts into the base type.

Invisible objects are not rendered by cameras.

Sets the name of the object.

Set both position, orientation and scale.

Set position.

Set orientation.

Set scale.

Set weights.

Rotates object in the specific direction of target.

Loading content...

Implementors

impl Object for Source
[src]

impl Object for Camera
[src]

impl Object for Ambient
[src]

impl Object for Directional
[src]

impl Object for Hemisphere
[src]

impl Object for Point
[src]

impl Object for Base
[src]

impl Object for Group
[src]

impl Object for Bone
[src]

impl Object for Skeleton
[src]

impl Object for DynamicMesh
[src]

impl Object for Mesh
[src]

impl Object for Sprite
[src]

impl Object for Text
[src]

Loading content...