Struct three_d::CPUMesh [−][src]
pub struct CPUMesh { pub name: String, pub material_name: Option<String>, pub positions: Vec<f32>, pub indices: Option<Vec<u32>>, pub normals: Option<Vec<f32>>, pub uvs: Option<Vec<f32>>, pub colors: Option<Vec<u8>>, }
Expand description
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]
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]
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]
pub fn compute_aabb(&self) -> AxisAlignedBoundingBox
[src]Computes the axis aligned bounding box of the mesh.