[−][src]Struct kiss3d::resource::PlanarMesh
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]
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]
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]
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]
&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]
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]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
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>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> Downcast for T where
T: Any,
T: Any,