CSCI441 OpenGL Library 5.9.0
CS@Mines CSCI441 Computer Graphics Course Library
|
Helper functions to draw 3D OpenGL 3.0+ objects. More...
#include "teapot.hpp"
#include <glad/gl.h>
#include <glm/gtc/constants.hpp>
#include <cassert>
#include <map>
Go to the source code of this file.
Namespaces | |
namespace | CSCI441 |
CSCI441 Helper Functions for OpenGL. | |
Functions | |
void | CSCI441::setVertexAttributeLocations (GLint positionLocation, GLint normalLocation=-1, GLint texCoordLocation=-1) |
Sets the attribute locations for vertex positions, normals, and texture coordinates. | |
void | CSCI441::deleteObjectVAOs () |
deletes the VAOs stored for all object types | |
void | CSCI441::deleteObjectVBOs () |
deletes the VBOs stored for all object types | |
void | CSCI441::drawSolidCone (GLfloat base, GLfloat height, GLint stacks, GLint slices) |
Draws a solid cone. | |
void | CSCI441::drawWireCone (GLfloat base, GLfloat height, GLint stacks, GLint slices) |
Draws a wireframe cone. | |
void | CSCI441::drawSolidCube (GLfloat sideLength) |
Calls through to drawSolidCubeIndexed() | |
void | CSCI441::drawSolidCubeFlat (GLfloat sideLength) |
Draws a solid cube with normals aligned with cube face. | |
void | CSCI441::drawSolidCubeIndexed (GLfloat sideLength) |
Draws a solid cube. | |
void | CSCI441::drawSolidCubeTextured (GLfloat sideLength) |
Draws a solid textured cube. Calls through to drawSolidCubeFlat() | |
void | CSCI441::drawWireCube (GLfloat sideLength) |
Draws a wireframe cube. | |
void | CSCI441::drawCubeMap (GLfloat sideLength) |
Draws a cube with 3D Texture Coordinates to map a cube map texture to it. | |
void | CSCI441::drawSolidCylinder (GLfloat base, GLfloat top, GLfloat height, GLint stacks, GLint slices) |
Draws a solid open ended cylinder. | |
void | CSCI441::drawWireCylinder (GLfloat base, GLfloat top, GLfloat height, GLint stacks, GLint slices) |
Draws a wireframe open ended cylinder. | |
void | CSCI441::drawSolidDisk (GLfloat inner, GLfloat outer, GLint slices, GLint rings) |
Draws a solid disk. | |
void | CSCI441::drawWireDisk (GLfloat inner, GLfloat outer, GLint slices, GLint rings) |
Draws a wireframe disk. | |
void | CSCI441::drawSolidPartialDisk (GLfloat inner, GLfloat outer, GLint slices, GLint rings, GLfloat start, GLfloat sweep) |
Draws part of a solid disk. | |
void | CSCI441::drawWirePartialDisk (GLfloat inner, GLfloat outer, GLint slices, GLint rings, GLfloat start, GLfloat sweep) |
Draws part of a wireframe disk. | |
void | CSCI441::drawSolidSphere (GLfloat radius, GLint stacks, GLint slices) |
Draws a solid sphere. | |
void | CSCI441::drawWireSphere (GLfloat radius, GLint stacks, GLint slices) |
Draws a wireframe sphere. | |
void | CSCI441::drawSolidHalfSphere (GLfloat radius, GLint stacks, GLint slices) |
Draws a solid half sphere with a bottom. | |
void | CSCI441::drawWireHalfSphere (GLfloat radius, GLint stacks, GLint slices) |
Draws a wireframe half sphere with a bottom. | |
void | CSCI441::drawSolidDome (GLfloat radius, GLint stacks, GLint slices) |
Draws a solid dome. | |
void | CSCI441::drawWireDome (GLfloat radius, GLint stacks, GLint slices) |
Draws a wireframe dome. | |
void | CSCI441::drawSolidTeapot (GLfloat unused=1.0f) |
Draws a solid teapot. | |
void | CSCI441::drawWireTeapot (GLfloat unused=1.0f) |
Draws a wireframe teapot. | |
void | CSCI441::drawSolidTorus (GLfloat innerRadius, GLfloat outerRadius, GLint sides, GLint rings) |
Draws a solid torus. | |
void | CSCI441::drawWireTorus (GLfloat innerRadius, GLfloat outerRadius, GLint sides, GLint rings) |
Draws a wireframe torus. | |
Helper functions to draw 3D OpenGL 3.0+ objects.
These functions draw solid (or wireframe) 3D closed OpenGL objects. All objects are constructed using triangles that have normals and texture coordinates properly set.