#include <RoundedCube.h>
Public Types | |
enum | axis { Xaxis, Yaxis, Zaxis } |
The x-, y-, and z-axis. | |
Public Methods | |
RoundedCube (float s_length=0.8, float r_width=0.1, int r_steps=2) | |
Constructs a cube with rounded edges. More... | |
void | render () |
Draws the cube. More... | |
void | rotate (axis a, bool direction) |
Rotates the cube 90 degrees. More... | |
Public Attributes | |
bool | draw_normals |
Should normals be drawn? This should only be set to true , if you're debugging. |
The cube will be made up of six squares with rounded edges in-between. The sides will be red, green, blue, orange, yellow, and white just as the original Rubik's Cube. They will only reflect little of the specular light that shines on them, but they will reflect all the diffuse light.
The rounded edges will be black, but will have more intense highlights than the sides. This gives a nice effect when the cube rotates in front of a light.
|
Constructs a cube with rounded edges.
|
|
Draws the cube. The cube will be drawn centered around (0, 0). |
|
Rotates the cube 90 degrees. The cube will rotate by changing the color of the sides.
|