RNA Folding simulation
Macros | Functions | Variables
main.cpp File Reference
#include <GL/glew.h>
#include <GL/freeglut.h>
#include "rna_folding.hh"
#include "herrlog.hh"
#include "stb_image.h"
Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

void drawText (const char *text, float x, float y)
 
void loadTexture (const char *filename)
 Loads an RGBA image. More...
 
void drawTexturedQuad ()
 Draws a textured quad on the screen. Keeps the aspect ratio of the image intact.
 
void keyboardDown (unsigned char key, int x, int y)
 Callback function for keyboard events (Down press) More...
 
void keyboardUp (unsigned char key, int x, int y)
 Callback function for keyboard events (Up press) More...
 
void update ()
 Callback function for updating the keyboard input.
 
void reshape (int width, int height)
 Callback function called when reshaping window. More...
 
void display ()
 Callback function for displaying the image and the text.
 
int main (int argc, char **argv)
 

Variables

std::string rna_name
 Global variable to store rna name. More...
 
int number_of_nucleotides = 0
 Number of nucleotides in input.
 
int number_of_bonds = 0
 Number of bonds in input.
 
GLuint texture
 OpenGL reference to the RNA structure image.
 
int textureWidth
 Global variables to keep track of RNA structure image width.
 
int textureHeight
 Global variables to keep track of RNA structure image width.
 
float pan_x = 0.0f
 Pan along the x-axis.
 
float pan_y = 0.0f
 Pan along the y-axis.
 
float zoom = 1.0f
 Zoom factor.
 
bool keys [256] = {false}
 Keeps track of which key was pressed on the keyboard.
 

Detailed Description

Author
Adarsh Das (saphereye.github.io)

Definition in file main.cpp.

Function Documentation

◆ keyboardDown()

void keyboardDown ( unsigned char  key,
int  x,
int  y 
)

Callback function for keyboard events (Down press)

Parameters
key
x
y

Definition at line 129 of file main.cpp.

◆ keyboardUp()

void keyboardUp ( unsigned char  key,
int  x,
int  y 
)

Callback function for keyboard events (Up press)

Parameters
key
x
y

Definition at line 138 of file main.cpp.

◆ loadTexture()

void loadTexture ( const char *  filename)

Loads an RGBA image.

Parameters
filename

Definition at line 54 of file main.cpp.

◆ reshape()

void reshape ( int  width,
int  height 
)

Callback function called when reshaping window.

Parameters
width
height

Definition at line 162 of file main.cpp.

Variable Documentation

◆ rna_name

std::string rna_name
Initial value:
=
"ACA box 91 (SNORA91)"

Global variable to store rna name.

Definition at line 19 of file main.cpp.