Hellraiser Box in OpenGL

Lament Box

Here is a simple application using OpenGL that displays the Lament Box with animation of the box opening and closing.
— updated with an MFC application and Source —

The application has been updated to use the same foundation as Geodesic and other OpenGL applications for windows. To use any of the programs, extract the zip file to a folder and then double click on the EXE file. The BMP texture files and the exe must be in the same folder.

The MFC program allows panning and zooming around to view the box from any angle. Click and drag the mouse on the image to rotate the camera view. Use SHIFT and drag the mouse to pan the camera and CTRL with drag to zoom the camera view.

There are several options in the view menu.
View Menu

  • Animation repaints the scene very often.
  • Animate Box runs the animation of the box.
  • Reset resets the view to a standard view in the case that you have lost yourself with Pan or Zoom.
  • Use Display Lists and Smooth are not functional.
  • None of the Object section items are functional.
  • White and Colored lights do not appear to function, although they should.
  • The background choices function. Black is probably the most effective for this object.

Download Hellraiser Box OpenGL using MFC

Here are the sources: Hellraiser Box OpenGL MFC Source

The older version can be found here: Hellraiser Box Animation in OpenGL

Unzip the files in a folder and double click on the EXE to run it.
No viruses or spyware included. 😀

The animation makes use of simple keyframing so that the entire animation data comprises a short dataset.

Enjoy.

keyframing data:
struct keyframe
{
GLint nFrame;
GLfloat yOffset;
GLfloat yAngle;
bool bStop;
};

int nFrame = 0;
int nFrameIdx = 0;
// master timeline - for part1 and cylinder
keyframe timeline[] ={
// n, yoff, yangle
{0, 0.0f, 0.0f, 0},
{60, 0.0f, 0.0f, 0},
{100, 0.0f, 0.0f, 0},
{120, 0.0f, 0.0f, 0},
{240, 1.0f, 0.0f, 0},
{360, 1.0f, 45.f, 0},
{480, 0.0f, 45.f, 0},
{600, 0.0f, 45.f, 0},
{720, 1.0f, 45.f, 0},
{840, 1.0f, 0.0f, 0},
{960, 0.0f, 0.0f, 0},
{1020, 0.0f, 0.0f, 0},
{1080, 0.0f, 0.0f, 1},
{0, 0.0f, 0.0f, 0},
{0, 0.0f, 0.0f, 0},
{0, 0.0f, 0.0f, 0}
};
// timeline for cylinder only
// must have same frame entries
keyframe timeline2[] = {
// n, yoff, yangle
{0, 0.0f, 0.0f, 0},
{60, 0.0f, 0.0f, 0},
{100, 0.0f, 90.0f, 0},
{120, 0.0f, 90.0f, 0},
{240, 0.0f, 90.0f, 0},
{360, 0.0f, 90.f, 0},
{480, 0.0f, 90.f, 0},
{600, 0.0f, 90.f, 0},
{720, 0.0f, 90.f, 0},
{840, 0.0f, 90.0f, 0},
{960, 0.0f, 90.0f, 0},
{1020, 0.0f, 0.0f, 0},
{1080, 0.0f, 0.0f, 1},
{0, 0.0f, 0.0f, 0},
{0, 0.0f, 0.0f, 0},
{0, 0.0f, 0.0f, 0}
};

Updated 26 Oct 2006 to include MFC version and source.