[][src]Struct kiss3d::resource::PlanarMesh

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]

pub fn new(
    coords: Vec<Point2<f32>>,
    faces: Vec<Point3<u16>>,
    uvs: Option<Vec<Point2<f32>>>,
    dynamic_draw: bool
) -> PlanarMesh
[src]

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]

Creates a new mesh. Arguments set to None are automatically computed.

pub fn bind_coords(&mut self, coords: &mut ShaderAttribute<Point2<f32>>)[src]

Binds this mesh vertex coordinates buffer to a vertex attribute.

pub fn bind_uvs(&mut self, uvs: &mut ShaderAttribute<Point2<f32>>)[src]

Binds this mesh vertex uvs buffer to a vertex attribute.

pub fn bind_faces(&mut self)[src]

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]

Binds this mesh buffers to vertex attributes.

pub fn bind_edges(&mut self)[src]

Binds this mesh buffers to vertex attributes.

pub fn unbind(&self)[src]

Unbind this mesh buffers to vertex attributes.

pub fn num_pts(&self) -> usize[src]

Number of points needed to draw this mesh.

pub fn faces(&self) -> &Arc<RwLock<GPUVec<Point3<u16>>>>[src]

This mesh faces.

pub fn coords(&self) -> &Arc<RwLock<GPUVec<Point2<f32>>>>[src]

This mesh vertex coordinates.

pub fn uvs(&self) -> &Arc<RwLock<GPUVec<Point2<f32>>>>[src]

This mesh texture coordinates.

Auto Trait Implementations

impl Send for PlanarMesh

impl Sync for PlanarMesh

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> Same for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> Downcast for T where
    T: Any

impl<T> Erased for T