Struct three::Geometry
[−]
[src]
pub struct Geometry { pub base_shape: GeometryShape, pub shapes: HashMap<String, GeometryShape>, pub faces: Vec<[u16; 3]>, }
A collection of vertices, their normals, and faces that defines the shape of a polyhedral object.
Fields
base_shape: GeometryShape
The original shape of geometry.
shapes: HashMap<String, GeometryShape>
A map containing blend shapes and their names.
faces: Vec<[u16; 3]>
Faces.
Methods
impl Geometry
[src]
fn empty() -> Self
Create new Geometry
without any data in it.
fn from_vertices(vertices: Vec<Point3<f32>>) -> Self
Create Geometry
from vector of vertices.
fn new_plane(sx: f32, sy: f32) -> Self
Create new Plane with desired size.
fn new_box(sx: f32, sy: f32, sz: f32) -> Self
Create new Box with desired size.
fn new_cylinder(
radius_top: f32,
radius_bottom: f32,
height: f32,
radius_segments: usize
) -> Self
radius_top: f32,
radius_bottom: f32,
height: f32,
radius_segments: usize
) -> Self
Create new Cylinder or Cone with desired top and bottom radius, height and number of segments.
fn new_sphere(
radius: f32,
width_segments: usize,
height_segments: usize
) -> Self
radius: f32,
width_segments: usize,
height_segments: usize
) -> Self
Create new Sphere with desired radius and number of segments.
Trait Implementations
impl Clone for Geometry
[src]
fn clone(&self) -> Geometry
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more