pub struct Texture {
pub uuid: Uuid,
pub texture_type: TextureType,
}Fields§
§uuid: Uuid§texture_type: TextureTypeImplementations§
Source§impl Texture
impl Texture
Sourcepub fn new(texture_type: TextureType) -> Self
pub fn new(texture_type: TextureType) -> Self
Examples found in repository?
examples/demo.rs (line 52)
49fn valkyrie_head() -> LumpedObject {
50 LumpedObject::builder()
51 .image(Image::new("examples/data/HeadTextureMultisense.png"))
52 .texture(Texture::new(TextureType::new_image()))
53 .geometries(vec![Geometry::new(
54 utils::load_mesh("examples/data/head_multisense.obj").expect("Failed to load mesh"),
55 )])
56 .object(Object::new(
57 Isometry3::from_parts(
58 nalgebra::Translation3::new(0.0, 0.0, 0.0),
59 nalgebra::UnitQuaternion::from_euler_angles(0.0, 0.0, 0.0),
60 ),
61 ObjectType::Mesh,
62 ))
63 .build()
64}Trait Implementations§
Source§impl<'de> Deserialize<'de> for Texture
impl<'de> Deserialize<'de> for Texture
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Texture
impl RefUnwindSafe for Texture
impl Send for Texture
impl Sync for Texture
impl Unpin for Texture
impl UnwindSafe for Texture
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<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.