pub struct Object {
pub name: String,
pub transform: Transform,
/* private fields */
}
Fields§
§name: String
§transform: Transform
Implementations§
Source§impl Object
impl Object
pub fn new(name: Option<String>) -> Self
pub fn to_serializer(&self) -> ObjectSerializer
pub fn from_serializer(serializer: ObjectSerializer) -> Self
pub fn set_collision(&mut self, collision: bool)
pub fn get_collision(&self) -> &bool
pub fn get_unique_id(&self) -> Uuid
pub fn get_instance_id(&self) -> Uuid
pub fn break_instance(&mut self)
pub fn default() -> Self
pub fn has_skeletal_animation(&self) -> bool
pub fn get_bone_transform_buffer( &self, display: &Display<WindowSurface>, ) -> UniformBuffer<BoneTransforms>
pub fn play_animation(&mut self, name: &str, looping: bool)
pub fn stop_animation(&mut self)
pub fn get_current_animation(&self) -> &Option<AnimationState>
pub fn update(&mut self, delta_time: f32)
pub fn get_closest_lights(&self, lights: &Vec<Light>) -> Vec<Light>
pub fn add_shape(&mut self, shape: Shape)
pub fn get_vertex_buffers( &self, display: &Display<WindowSurface>, ) -> Vec<(VertexBufferAny, usize)>
pub fn get_index_buffers( &self, display: &Display<WindowSurface>, ) -> Vec<IndexBuffer<u32>>
pub fn get_bounding_box(&mut self) -> BoundingBox
pub fn get_materials(&self) -> &Vec<Uuid>
pub fn get_materials_mut(&mut self) -> &mut Vec<Uuid>
pub fn add_material(&mut self, material: Uuid)
pub fn get_shapes(&self) -> &Vec<Shape>
pub fn get_shapes_mut(&mut self) -> &mut Vec<Shape>
pub fn get_name(&self) -> &String
pub fn set_name(&mut self, name: String)
pub fn get_animations(&self) -> &HashMap<String, Animation>
pub fn get_animations_mut(&mut self) -> &mut HashMap<String, Animation>
pub fn get_skeleton(&self) -> &Option<Skeleton>
pub fn get_skeleton_mut(&mut self) -> &mut Option<Skeleton>
pub fn try_fix_object(&mut self) -> Result<EnigmaMessage, EnigmaError>
pub fn load_from_obj(path: &str) -> Self
pub fn load_from_gltf_resource( data: &[u8], rig_scale_multiplier: Option<f32>, ) -> Self
pub fn load_from_gltf(path: &str, rig_scale_multiplier: Option<f32>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.