[−][src]Struct codenano::opengl::OpenGL
This type represents an abstract OpenGL drawing. After it is built
using the new
and reset
methods, its points
field can be
sent to OpenGL as a triangle strip for rendering.
Fields
points: Vec<f32>
Points of the vertices to render.
size: usize
The size of a single point, in f32 (i.e. the size in bytes is four times this field).
sphere_n: usize
Number of subdivisions (horizontal and vertical) in a sphere.
backbone_n: usize
Number of subdivisions in the backbone cylinders.
pair_n: usize
Number of subdivisions in the basepair cylinders.
Implementations
impl OpenGL
[src]
pub fn new(
use_geometry_shader: bool,
sphere_n: usize,
backbone_n: usize,
pair_n: usize
) -> Self
[src]
use_geometry_shader: bool,
sphere_n: usize,
backbone_n: usize,
pair_n: usize
) -> Self
Create a new OpenGL
. This does not load any design, but
merely creates the necessary structures.
pub fn reset<A, B>(&mut self, design: &Design<A, B>)
[src]
Reset this type and load a new design. This must also be used
initially after calling the new
method.
Auto Trait Implementations
impl RefUnwindSafe for OpenGL
impl Send for OpenGL
impl Sync for OpenGL
impl Unpin for OpenGL
impl UnwindSafe for OpenGL
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,