GameObject

Trait GameObject 

Source
pub trait GameObject:
    GameObjectBoxClone
    + Scriptable
    + Drawable
    + Parent
    + Child
    + Any
    + 'static
    + Send
    + Sync {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn cast_camera_arc_rwlock(
        &self,
        this: Arc<RwLock<dyn GameObject>>,
    ) -> Result<Arc<RwLock<dyn Camera>>, ()>;
    fn cast_light_arc_rwlock(
        &self,
        this: Arc<RwLock<dyn GameObject>>,
    ) -> Result<Arc<RwLock<dyn Light>>, ()>;
    fn get_id(&self) -> ID;
    fn get_subspace(&self) -> Space;
    fn get_inversed_subspace(&self) -> Space;
}

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn cast_camera_arc_rwlock( &self, this: Arc<RwLock<dyn GameObject>>, ) -> Result<Arc<RwLock<dyn Camera>>, ()>

Source

fn cast_light_arc_rwlock( &self, this: Arc<RwLock<dyn GameObject>>, ) -> Result<Arc<RwLock<dyn Light>>, ()>

Source

fn get_id(&self) -> ID

Source

fn get_subspace(&self) -> Space

Source

fn get_inversed_subspace(&self) -> Space

Trait Implementations§

Source§

impl Clone for Box<dyn GameObject>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for dyn GameObject

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for dyn GameObject

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Implementors§