TexturedCube Class Reference

A textured cube. More...

#include <Cube.h>

Inheritance diagram for TexturedCube:

RawObject List of all members.

Public Member Functions

 TexturedCube (float size, GLuint texture_id, bool allow_lighting)
 ~TexturedCube ()
void Draw ()
double GetBoundingRadius ()
BoundingBox GetBoundingBox ()

Private Member Functions

 TexturedCube ()
void ConstructDisplayList ()

Private Attributes

double half_size
GLuint texture_id
GLuint list_id
bool allow_lighting

Detailed Description

A textured cube.

A simple cube that displays the same texture on each side. Uses a display list for acceleration.

Definition at line 101 of file Cube.h.


Constructor & Destructor Documentation

TexturedCube::TexturedCube float  size,
GLuint  texture_id,
bool  allow_lighting
 

Constructor: Brings the object into a consistent state.

Parameters:
size The size of the cube.
texture_id OpenGL texture name identifying the texture that shall be used to draw the cube.
allow_lighting States wheather lighting shall be turned off during rendering or not.

Definition at line 148 of file Cube.cpp.

TexturedCube::~TexturedCube  ) 
 

Destructor.

Definition at line 157 of file Cube.cpp.

TexturedCube::TexturedCube  )  [private]
 

Hide the default constructor.


Member Function Documentation

void TexturedCube::ConstructDisplayList  )  [private]
 

Constructs a display list for the cube.

Definition at line 181 of file Cube.cpp.

void TexturedCube::Draw  )  [virtual]
 

Implementation of the Draw routine.

Reimplemented from RawObject.

Definition at line 250 of file Cube.cpp.

BoundingBox TexturedCube::GetBoundingBox  )  [virtual]
 

Implementation of the GetBoundingBox routine.

Reimplemented from RawObject.

Definition at line 167 of file Cube.cpp.

double TexturedCube::GetBoundingRadius  )  [virtual]
 

Implementation of the GetBoundingRadius routine.

Reimplemented from RawObject.

Definition at line 162 of file Cube.cpp.


Member Data Documentation

bool TexturedCube::allow_lighting [private]
 

Is lighting allowed for drawing?

Definition at line 153 of file Cube.h.

double TexturedCube::half_size [private]
 

Size of the cube divided by two.

Definition at line 144 of file Cube.h.

GLuint TexturedCube::list_id [private]
 

OpenGL identifier that specifies the display list to be called for drawing.

Definition at line 150 of file Cube.h.

GLuint TexturedCube::texture_id [private]
 

OpenGL texture name identifying the texture that shall be used for drawing.

Definition at line 147 of file Cube.h.


Generated on Sun Jul 2 13:20:41 2006 for Demo by  doxygen 1.4.6-NO