opensurgsim
Namespaces | Functions
TestCube.h File Reference

Data for a cube, vertices, color, textures and triangles This cube is for using as a mesh. More...

#include <vector>
#include "SurgSim/Math/Vector.h"
#include <memory>

Go to the source code of this file.

Namespaces

 SurgSim
 Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui needs glew but we need to call glewInit() from a osg callback, using this call we avoid getting warnings about redefinitions.
 

Functions

void SurgSim::Testing::Cube::makeCube (std::vector< Vector3d > *vertices, std::vector< Vector4d > *colors, std::vector< Vector2d > *textures, std::vector< size_t > *triangles)
 Fill our standard structures with the correct data types from the cube data.
 

Detailed Description

Data for a cube, vertices, color, textures and triangles This cube is for using as a mesh.

OpenGl does not support per face attributes, therefore to implement sharp edges vertices are duplicated over different faces, for a cube all vertices need to exist as three copies