#include <frame.h>
Public Member Functions | |
int | read (FILE *fp) |
Function to read a frame from a sphere movie file. | |
int | write () |
Function to write a frame to a sphere movie file. | |
void | print () |
Function to print a frame to stdout. | |
void | add (sphere_s s) |
Function to add a sphere with short int coordinates to a frame. | |
void | add (sphere_f s) |
Function to add a sphere with float coordinates to a frame. | |
void | add (cylinder_s c) |
Function to add a cylinder with short int coordinates to a frame. | |
void | add (cylinder_f c) |
Function to add a cylinder with float coordinates to a frame. | |
void | add (double x[], double y[], double z[], int n, double sphere_size, double tube_size, int sphere_color, int tube_color, int max_length=100) |
Function to add a chain of spheres and cylinders to a frame. | |
void | add (float x[], float y[], float z[], int n, double sphere_size, double tube_size, int sphere_color, int tube_color, int max_length=100) |
void | add (int x[], int y[], int z[], int n, int sphere_size, int tube_size, int sphere_color, int tube_color, int max_length=100) |
ap_frame () | |
Default constructor. | |
ap_frame (int n) | |
Constructor for a frame with n spheres. | |
void | free () |
Function to delete the data arrays in a frame. | |
~ap_frame () | |
Destructor for a frame. | |
Public Attributes | |
ap_array< sphere_f > * | spheres |
Array of spheres with float coordinates. | |
ap_array< cylinder_f > * | cylinders |
Array of cylinders with float coordinates. | |
ap_array< gl_cylinder_f > * | gl_cylinders |
Array of gl_cylinders with float coordinates. | |
ap_array< sphere_s > * | short_spheres |
Array of spheres with short coordinates. | |
ap_array< cylinder_s > * | short_cylinders |
Array of cylinders with short coordinates. | |
ap_array< gl_cylinder_s > * | short_gl_cylinders |
Array of gl_cylinders with short coordinates. |
There is a naming conflict between the more obvious class name "frame" and other code (most likely FLTK), so the class name is ap_frame.
|
Default constructor.
|
|
Constructor for a frame with n spheres.
|
|
Destructor for a frame.
|
|
Function to read a frame from a sphere movie file.
|
|
Function to write a frame to a sphere movie file.
|
|
Function to print a frame to stdout.
|
|
Function to add a sphere with short int coordinates to a frame.
|
|
Function to add a sphere with float coordinates to a frame.
|
|
Function to add a cylinder with short int coordinates to a frame.
|
|
Function to add a cylinder with float coordinates to a frame.
|
|
Function to add a chain of spheres and cylinders to a frame. This function will add a polymer chain to a frame. The first few parameters specify the locations of the spheres on the chain. Connecting each pair of spheres is a cylinder. Since chains in the computer simulations sometimes wrap around, it could be possible to get strange cylinders connecting adjacent spheres which are on opposite sides of the lattice. To prevent this it is sensible to use the final parameter to exclude cylinders which exceed a maximum permissible length.
|
|
|
|
|
|
Function to delete the data arrays in a frame. Only arrays which have been allocated are deleted. |
|
Array of spheres with float coordinates.
|
|
Array of cylinders with float coordinates.
|
|
Array of gl_cylinders with float coordinates.
|
|
Array of spheres with short coordinates.
|
|
Array of cylinders with short coordinates.
|
|
Array of gl_cylinders with short coordinates.
|