/*
 * Filename: frame.h
 * Revision: 19981003
 */

#ifndef _FRAME_H
#define _FRAME_H

#include <fstream.h>

#include "cubedata.h"
#include "wireframe.h"

#define FRAME_SIZE (ROW_SIZE * CONT_HEIGHT * CONT_DEPTH)

class frame
{
public:
	// Constructor
	frame ();

	// Destructor
	~frame ();

	// Calculates the used volume of the frame
	int volume (void);

	ROW *cube_data;
	char *frame_name;

protected:
	// Set the identifier for this frame
	void set_name (char *);

	// Clears the temporary cube storage
	void clear (void);

	// Sets the actual cube data to the temporary cube
	void update (void);

	// Saves the frame object
	void save (fstream &);

	// Loads the frame object
	void load (fstream &);


// -- Member variables --
protected:
	ROW *temp_cube;
};

#endif
