pub struct Group {
pub id: ID,
pub name: String,
pub parent: ParentWrapper,
pub subspace: Space,
pub visible: bool,
pub script: Option<Box<Script<Self>>>,
pub children: Vec<Arc<RwLock<dyn GameObject>>>,
}Fields§
§id: ID§name: String§parent: ParentWrapper§subspace: Space§visible: bool§script: Option<Box<Script<Self>>>§children: Vec<Arc<RwLock<dyn GameObject>>>Implementations§
Trait Implementations§
Source§impl Child for Group
impl Child for Group
fn get_parent(&self) -> ParentWrapper
Source§unsafe fn set_parent(&mut self, parent: ParentWrapper)
unsafe fn set_parent(&mut self, parent: ParentWrapper)
Safety Read more
Source§impl Drawable for Group
impl Drawable for Group
Source§fn add_to_draw_pass_manager(&self, draw_pass_manager: &mut DrawPassManager)
fn add_to_draw_pass_manager(&self, draw_pass_manager: &mut DrawPassManager)
Adds self’s visible characteristics and its children to the draw pass.
Source§fn load_into_managers(
&self,
this: ParentWrapper,
draw_pass_manager: &mut DrawPassManager,
lighting_pass_manager: &mut LightingPassManager,
)
fn load_into_managers( &self, this: ParentWrapper, draw_pass_manager: &mut DrawPassManager, lighting_pass_manager: &mut LightingPassManager, )
Adds self’s relevant characteristics and its children to the pass managers.
Source§fn add_triangle_mesh(&mut self, mesh: Arc<TriangleMesh>) -> Result<(), ()>
fn add_triangle_mesh(&mut self, mesh: Arc<TriangleMesh>) -> Result<(), ()>
Adds a triangle mesh to the Drawable struct
Source§fn get_visible(&self) -> bool
fn get_visible(&self) -> bool
Checks if an object is visible
fn get_triangle_mesh(&self) -> Vec<Arc<TriangleMesh>>
fn get_vertex_buffer(&self) -> Vec<Option<Arc<CpuAccessibleBuffer<[Vertex]>>>>
fn get_normals_buffer(&self) -> Vec<Option<Arc<CpuAccessibleBuffer<[Normal]>>>>
fn get_texture_indices_buffer( &self, ) -> Vec<Option<Arc<CpuAccessibleBuffer<[TextureIndex]>>>>
Source§impl GameObject for Group
impl GameObject for Group
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
Source§impl Parent for Group
impl Parent for Group
fn get_children(&self) -> Vec<Arc<RwLock<dyn GameObject>>>
fn add_child(&mut self, child: Arc<RwLock<dyn GameObject>>)
Source§unsafe fn remove_child(
&mut self,
child: Arc<RwLock<dyn GameObject>>,
) -> Result<(), ()>
unsafe fn remove_child( &mut self, child: Arc<RwLock<dyn GameObject>>, ) -> Result<(), ()>
Safety Read more
Source§unsafe fn replace_child(
&mut self,
old: Arc<RwLock<dyn GameObject>>,
new: Arc<RwLock<dyn GameObject>>,
) -> Result<(), ()>
unsafe fn replace_child( &mut self, old: Arc<RwLock<dyn GameObject>>, new: Arc<RwLock<dyn GameObject>>, ) -> Result<(), ()>
Safety Read more
fn get_child_by_name( &self, name: &str, ) -> Result<Arc<RwLock<dyn GameObject>>, &str>
Source§impl Scriptable for Group
impl Scriptable for Group
fn spawn_script_core( &mut self, this: Arc<RwLock<dyn GameObject>>, spawner: Spawner, )
fn spawn_script_handler<'a>( &mut self, this: Arc<RwLock<dyn GameObject>>, spawner: Spawner, event: Event<'static, UserEvent<Arc<dyn Any + Send + Sync>>>, )
fn get_globals(&self) -> Result<Box<dyn Global>, &'static str>
fn set_globals(&mut self, globals: Box<dyn Global>) -> Result<(), &'static str>
Auto Trait Implementations§
impl Freeze for Group
impl !RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl !UnwindSafe for Group
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Content for T
impl<T> Content for T
Source§fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
Source§fn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.
Source§impl<T> GameObjectBoxClone for Twhere
T: 'static + GameObject + Clone,
impl<T> GameObjectBoxClone for Twhere
T: 'static + GameObject + Clone,
fn clone_game_object(&self) -> Box<dyn GameObject>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more