#include <movie.h>
Public Member Functions | |
void | get_limits (double min_coords[3], double max_coords[3]) |
Function to get the limits from a movie. | |
int | read (char *file) |
Function to read a movie from an animp movie file. | |
void | read (ap_frame *f) |
Function to read 1 frame from the current movie file. | |
void | read (char *text, void *data, int size) |
Function to read arbitrary data from the current movie file. | |
void | read_pdb () |
Function to read a pdb (Protein Data Bank) file. | |
int | read_int (char *text) |
Function to read an int from an animp movie file. | |
void | read (ap_array< sphere_s > *spheres) |
Function to read an array of spheres with short coordinates. | |
void | read (ap_array< sphere_f > *spheres) |
Function to read an array of spheres. | |
void | read (ap_array< cylinder_s > *cylinders) |
Function to read an array of cylinders with short coordinates. | |
void | read (ap_array< cylinder_f > *cylinders) |
Function to read an array of cylinders. | |
void | putback () |
Function to back up the FILE pointer to "un-read" an int. | |
int | write (char *file) |
Function to write an animp movie file. | |
int | write () |
Function to write a frame to a animp movie file. | |
void | write (ap_frame *f) |
Function to write 1 frame to an animp movie file. | |
void | write (char *text, int n) |
Function to write an int to an animp movie file. | |
void | write (char *text, char *data) |
Function to write a string to an animp movie file. | |
void | write (char *text, void *data, int size) |
Function to write a arbitrary data to an animp movie file. | |
void | print () |
Function to print a movie to stdout. | |
void | add_static (ap_frame *f) |
Function to add a static frame to a movie. | |
void | add_static (ap_frame &f) |
Function to add a static frame to a movie. | |
void | add (ap_frame *f) |
Function to add a frame to a movie. | |
void | add (ap_frame &f) |
Function to add a frame to a movie. | |
void | add (ap_color *c) |
Function to add a color to the movie's color array. | |
void | add (ap_color c) |
Function to add a color to the movie's color array. | |
void | add_color (string color_name, int r, int g, int b, int a) |
Function to add a named color to the movie's color array. | |
movie () | |
Default constructor. | |
movie (char *file) | |
Constructor with an output file name. | |
movie (int size) | |
Constructor for a movie with size frames. | |
~movie () | |
Destructor. | |
Public Attributes | |
ap_array< ap_color > * | colors |
Array of colors. | |
ap_frame * | static_frame |
Frame drawn in each image. | |
int | current_frame |
Frame number for the current frame. | |
ap_array< ap_frame > * | frames |
The dynamic frames. | |
FILE * | fp |
FILE pointer used for reading/writing. | |
int | frame_count |
Number of frames in frames array. | |
long | count_offset |
Position in a movie file for the frame count. | |
bool | colors_written |
Whether colors have been written yet. | |
bool | limits_started |
Whether there are any valid limits yet. | |
double | min_coords [3] |
Minimum x, y and z coordinates. | |
double | max_coords [3] |
Maximum x, y and z coordinates. |
Add code to the movie class to read/write text movie files.
Add code for saving a movie file with adjusted colors.
|
Default constructor.
|
|
Constructor with an output file name. If a movie is created using this constructor, an output file is opened and pieces are written as they are added. |
|
Constructor for a movie with size frames.
|
|
Destructor. It deletes the arrays. |
|
Function to get the limits from a movie. The gl_box class needs to get the limits from the current movie to help with setting the eye and focus coordinates.
|
|
Function to read a movie from an animp movie file.
If the file begins with "Animp001", it is read as an animp movie file. Otherwise it assumed to be a pdb file.
|
|
Function to read 1 frame from the current movie file.
|
|
Function to read arbitrary data from the current movie file. There are several read functions for various basic and array data types. Each of these calls this function to perform the read and passes an identifying string into this read to be part of possible error messages.
|
|
Function to read a pdb (Protein Data Bank) file. The Protein Data Bank format is a commonly-used format for storing atomic structure of molecules. Animp can display a molecule from a pdb file using spheres for atoms and cylinders for bonds. It uses the CPK (Corey, Pauling, Kultun) color schemes for elements and uses atomic radii based on the non-ionic versions of atoms. |
|
Function to read an int from an animp movie file.
|
|
Function to read an array of spheres with short coordinates.
|
|
Function to read an array of spheres.
|
|
Function to read an array of cylinders with short coordinates.
|
|
Function to read an array of cylinders.
|
|
Function to back up the FILE pointer to "un-read" an int. Several functions need to read an int and possibly decide not to use the value. Putback allows them to effectively put back the value so that another function can read that int next. |
|
Function to write an animp movie file.
|
|
Function to write a frame to a animp movie file.
|
|
Function to write 1 frame to an animp movie file.
|
|
Function to write an int to an animp movie file.
|
|
Function to write a string to an animp movie file.
|
|
Function to write a arbitrary data to an animp movie file. This function is called by the other write functions to do the actual work. It attempts to write and prints an error message if the write fails.
|
|
Function to print a movie to stdout.
|
|
Function to add a static frame to a movie.
|
|
Function to add a static frame to a movie.
|
|
Function to add a frame to a movie.
|
|
Function to add a frame to a movie.
|
|
Function to add a color to the movie's color array.
|
|
Function to add a color to the movie's color array.
|
|
Function to add a named color to the movie's color array. To color atoms conveniently add_color is used to add a color with a name like "He" for Helium. This adds the color to the colors array and adds entries to the color_table and rev_color_table maps. Then it is easy to get the color index from the name and vice-versa.
|
|
Array of colors.
|
|
Frame drawn in each image.
|
|
Frame number for the current frame.
|
|
The dynamic frames.
|
|
FILE pointer used for reading/writing.
|
|
Number of frames in frames array.
|
|
Position in a movie file for the frame count. When a movie is written frame-by-frame, the frame count is not known until the end. At the end it is necessary to write the frame count in the movie file. The count_offset variable holds the address for writing the frame count. |
|
Whether colors have been written yet.
|
|
Whether there are any valid limits yet.
|
|
Minimum x, y and z coordinates.
|
|
Maximum x, y and z coordinates.
|