processing/shapes/
mould.rs1use glium::uniforms::Uniforms;
2
3use shaders::ShaderInfo;
4use shapes::Shape;
5
6pub struct Mould<U: Uniforms, S: Shape> {
11 shape: S,
12 shader: ShaderInfo<U>,
13}
14
15impl<U: Uniforms, S: Shape> Mould<U, S> {
16 pub fn new(shape: S, shader: ShaderInfo<U>) -> Self {
17 Mould {
18 shape: shape,
19 shader: shader,
20 }
21 }
22
23 pub fn get_shape(&self) -> &S {
24 &self.shape
25 }
26
27 pub fn get_shader(&self) -> &ShaderInfo<U> {
28 &self.shader
29 }
30
31 pub fn set(&mut self, uniforms: U) {
32 self.shader.set(uniforms)
33 }
34}