Struct three_d::definition::CPUMesh [−][src]
A CPU-side version of a triangle mesh (for example Mesh). Can be constructed manually or loaded via io or via the utility functions for generating simple triangle meshes.
Fields
name: String
material_name: Option<String>
positions: Vec<f32>
indices: Option<Vec<u32>>
normals: Option<Vec<f32>>
uvs: Option<Vec<f32>>
colors: Option<Vec<u8>>
Implementations
impl CPUMesh
[src]
pub fn square(size: f32) -> Self
[src]
pub fn circle(radius: f32, angle_subdivisions: u32) -> Self
[src]
pub fn sphere(radius: f32) -> Self
[src]
pub fn cylinder(radius: f32, length: f32, angle_subdivisions: u32) -> Self
[src]
pub fn cone(radius: f32, length: f32, angle_subdivisions: u32) -> Self
[src]
pub fn arrow(radius: f32, length: f32, angle_subdivisions: u32) -> Self
[src]
pub fn compute_normals(&mut self)
[src]
Computes the per vertex normals and updates the normals of the mesh. It will override the current normals if they already exist.
pub fn compute_aabb(&self) -> AxisAlignedBoundingBox
[src]
Computes the axis aligned bounding box of the mesh.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CPUMesh
impl Send for CPUMesh
impl Sync for CPUMesh
impl Unpin for CPUMesh
impl UnwindSafe for CPUMesh
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,