Struct crystal_ball::shapes::Object
source · pub struct Object {
pub shape: Arc<dyn Shape>,
pub material: Arc<dyn Material>,
}
Fields§
§shape: Arc<dyn Shape>
§material: Arc<dyn Material>
Implementations§
source§impl Object
impl Object
sourcepub fn load_gltf<P: AsRef<Path>>(path: P) -> Result<Vec<Object>, Error>
pub fn load_gltf<P: AsRef<Path>>(path: P) -> Result<Vec<Object>, Error>
Load all meshes from a glTF document.
- If a mesh does not have indices or vertices, it will be skipped.
- If a mesh does not have normals, flat shading normals will be generated.
- If a mesh does not have tangents, normal mapping won’t be applied.
- If a mesh does not have UVs, all vertices will have
(0.0, 0.0)
as their UVs.
For information about supported materials see PbrMaterial
.
Returns an Error
if the document can not be parsed.
Trait Implementations§
Auto Trait Implementations§
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