[][src]Struct codenano::opengl::OpenGL

pub struct OpenGL {
    pub points: Vec<f32>,
    pub size: usize,
    pub sphere_n: usize,
    pub backbone_n: usize,
    pub pair_n: usize,
    // some fields omitted
}

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]

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]

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.