#include <OpaqueCubes.h>
Public Member Functions | |
OpaqueCubes (VolumeLoader *volume_loader, matrix44 *aViewPt, matrix44 *aInvViewPt) | |
virtual | ~OpaqueCubes () |
void | createVolumeCubes () |
void | createTextures () |
void | setTextures () |
void | setDrawSize (int width, int height) |
void | glDrawOpaqueCubes (int threshold, GLfloat rot_x, GLfloat rot_y) |
void | rotateView (Vector3 *rotation_axis, float angle) |
matrix44 * | getInvViewMatrix () |
Protected Attributes | |
VolumeLoader * | volume_loader_ |
The volume data. | |
int | texture_size_ |
The size of the texture. | |
Vector3 | vector_ |
The vector data. | |
LightingInfo * | light_info_ |
The light parameters from the user input. | |
RGBAColor * | texture_ |
The RGBAColor struct. | |
unsigned short | x_dim_ |
The x dimension of the volume dataset. | |
unsigned short | y_dim_ |
The y dimension of the volume dataset. | |
unsigned short | z_dim_ |
The z dimension of the volume dataset. | |
unsigned short | max_dim_ |
The value of the biggest dimension. | |
float | x_side_ |
The x dimension of one cube. | |
float | y_side_ |
The y dimension of one cube. | |
float | z_side_ |
The z dimension of one cube. | |
GLuint * | x_texture_ |
The texture for the x-axis. | |
GLuint * | y_texture_ |
The texture for the x-axis. | |
GLuint * | z_texture_ |
The texture for the z-axis. | |
unsigned short * | volume_data_ |
The values for the cubes. | |
GLuint | texture_list_ |
The display list to store the textures. | |
int | draw_width_ |
The width of the draw size. | |
int | draw_height_ |
The height of the draw size. | |
LightingInfo * | lighting_info_ |
The lighting information. | |
matrix44 * | view_matrix_ |
The view matrix of the volume. | |
matrix44 * | inv_view_matrix_ |
The inverse view matrix of the volume. |
OpaqueCubes::OpaqueCubes | ( | VolumeLoader * | volume_loader, | |
matrix44 * | aViewPt, | |||
matrix44 * | aInvViewPt | |||
) |
This constructor sets all relevant variables for the image calculation.
OpaqueCubes::~OpaqueCubes | ( | ) | [virtual] |
The destructor.
void OpaqueCubes::createTextures | ( | ) |
Creates the textures for the cubes.
void OpaqueCubes::createVolumeCubes | ( | ) |
Seperates the volume data into cubes.
lighting_info | This holds the user defined lighting info. |
matrix44 * OpaqueCubes::getInvViewMatrix | ( | ) |
void OpaqueCubes::glDrawOpaqueCubes | ( | int | threshold, | |
GLfloat | rot_x, | |||
GLfloat | rot_y | |||
) |
Renders the opaque cubes.
void OpaqueCubes::rotateView | ( | Vector3 * | rotation_axis, | |
float | angle | |||
) |
Calculates the rotation matrix depending on the axis and the rotation angle.
rotation_axis | The vector representing the rotation axis. | |
angle | The rotation angle. |
void OpaqueCubes::setDrawSize | ( | int | width, | |
int | height | |||
) |
Sets the draw size.
void OpaqueCubes::setTextures | ( | ) |
Sets the textures on the cubes.
int OpaqueCubes::draw_height_ [protected] |
The height of the draw size.
int OpaqueCubes::draw_width_ [protected] |
The width of the draw size.
matrix44* OpaqueCubes::inv_view_matrix_ [protected] |
The inverse view matrix of the volume.
LightingInfo* OpaqueCubes::light_info_ [protected] |
The light parameters from the user input.
LightingInfo* OpaqueCubes::lighting_info_ [protected] |
The lighting information.
unsigned short OpaqueCubes::max_dim_ [protected] |
The value of the biggest dimension.
RGBAColor* OpaqueCubes::texture_ [protected] |
The RGBAColor struct.
GLuint OpaqueCubes::texture_list_ [protected] |
The display list to store the textures.
int OpaqueCubes::texture_size_ [protected] |
The size of the texture.
Vector3 OpaqueCubes::vector_ [protected] |
The vector data.
matrix44* OpaqueCubes::view_matrix_ [protected] |
The view matrix of the volume.
unsigned short* OpaqueCubes::volume_data_ [protected] |
The values for the cubes.
VolumeLoader* OpaqueCubes::volume_loader_ [protected] |
The volume data.
unsigned short OpaqueCubes::x_dim_ [protected] |
The x dimension of the volume dataset.
float OpaqueCubes::x_side_ [protected] |
The x dimension of one cube.
GLuint* OpaqueCubes::x_texture_ [protected] |
The texture for the x-axis.
unsigned short OpaqueCubes::y_dim_ [protected] |
The y dimension of the volume dataset.
float OpaqueCubes::y_side_ [protected] |
The y dimension of one cube.
GLuint* OpaqueCubes::y_texture_ [protected] |
The texture for the x-axis.
unsigned short OpaqueCubes::z_dim_ [protected] |
The z dimension of the volume dataset.
float OpaqueCubes::z_side_ [protected] |
The z dimension of one cube.
GLuint* OpaqueCubes::z_texture_ [protected] |
The texture for the z-axis.