Struct kiss3d::resource::PlanarMesh [−][src]
pub struct PlanarMesh { /* fields omitted */ }
Aggregation of vertices, indices, normals and texture coordinates.
It also contains the GPU location of those buffers.
Methods
impl PlanarMesh
[src]
impl PlanarMesh
pub fn new(
coords: Vec<Point2<f32>>,
faces: Vec<Point3<u16>>,
uvs: Option<Vec<Point2<f32>>>,
dynamic_draw: bool
) -> PlanarMesh
[src]
pub fn new(
coords: Vec<Point2<f32>>,
faces: Vec<Point3<u16>>,
uvs: Option<Vec<Point2<f32>>>,
dynamic_draw: bool
) -> PlanarMesh
Creates a new mesh.
If the normals and uvs are not given, they are automatically computed.
pub fn new_with_gpu_vectors(
coords: Arc<RwLock<GPUVec<Point2<f32>>>>,
faces: Arc<RwLock<GPUVec<Point3<u16>>>>,
uvs: Arc<RwLock<GPUVec<Point2<f32>>>>
) -> PlanarMesh
[src]
pub fn new_with_gpu_vectors(
coords: Arc<RwLock<GPUVec<Point2<f32>>>>,
faces: Arc<RwLock<GPUVec<Point3<u16>>>>,
uvs: Arc<RwLock<GPUVec<Point2<f32>>>>
) -> PlanarMesh
Creates a new mesh. Arguments set to None
are automatically computed.
pub fn bind_coords(&mut self, coords: &mut ShaderAttribute<Point2<f32>>)
[src]
pub fn bind_coords(&mut self, coords: &mut ShaderAttribute<Point2<f32>>)
Binds this mesh vertex coordinates buffer to a vertex attribute.
pub fn bind_uvs(&mut self, uvs: &mut ShaderAttribute<Point2<f32>>)
[src]
pub fn bind_uvs(&mut self, uvs: &mut ShaderAttribute<Point2<f32>>)
Binds this mesh vertex uvs buffer to a vertex attribute.
pub fn bind_faces(&mut self)
[src]
pub fn bind_faces(&mut self)
Binds this mesh vertex uvs buffer to a vertex attribute.
pub fn bind(
&mut self,
coords: &mut ShaderAttribute<Point2<f32>>,
uvs: &mut ShaderAttribute<Point2<f32>>
)
[src]
pub fn bind(
&mut self,
coords: &mut ShaderAttribute<Point2<f32>>,
uvs: &mut ShaderAttribute<Point2<f32>>
)
Binds this mesh buffers to vertex attributes.
pub fn bind_edges(&mut self)
[src]
pub fn bind_edges(&mut self)
Binds this mesh buffers to vertex attributes.
pub fn unbind(&self)
[src]
pub fn unbind(&self)
Unbind this mesh buffers to vertex attributes.
pub fn num_pts(&self) -> usize
[src]
pub fn num_pts(&self) -> usize
Number of points needed to draw this mesh.
pub fn faces(&self) -> &Arc<RwLock<GPUVec<Point3<u16>>>>
[src]
pub fn faces(&self) -> &Arc<RwLock<GPUVec<Point3<u16>>>>
This mesh faces.
pub fn coords(&self) -> &Arc<RwLock<GPUVec<Point2<f32>>>>
[src]
pub fn coords(&self) -> &Arc<RwLock<GPUVec<Point2<f32>>>>
This mesh vertex coordinates.
pub fn uvs(&self) -> &Arc<RwLock<GPUVec<Point2<f32>>>>
[src]
pub fn uvs(&self) -> &Arc<RwLock<GPUVec<Point2<f32>>>>
This mesh texture coordinates.
Auto Trait Implementations
impl Send for PlanarMesh
impl Send for PlanarMesh
impl Sync for PlanarMesh
impl Sync for PlanarMesh