Oxygen Engine
Modern C++ 3D Engine using OpenGL
|
A cube mesh from (-0.5f, -0.5f, -0.5f) to (0.5f, 0.5f, 0.5f) More...
#include <OxygenEngine/scene/primitive/cube.h>
Public Member Functions | |
Cube (const bool mirror_textures=false) | |
![]() | |
void | generateSmoothNormals (uint32_t sub_mesh=0) |
Smooth mesh normals. | |
void | optimizeVertices (uint32_t sub_mesh=0) |
Merge multiple duplicated vertices into one. | |
void | generateTangents () |
Generate tangents from texture coordinates. | |
void | generateTexcoords () |
Approximate texture coords based on vertex position. | |
![]() | |
SimpleMesh (const std::vector< V > &vertices, const std::vector< index_t > &indices={}) | |
SimpleMesh (const std::vector< V > &vertices, const std::vector< std::vector< index_t > > &mesh_indices) | |
uint32_t | addSubMesh (const std::vector< oe::scene::index_t > &indices) |
std::vector< V > & | getVertices () |
const std::vector< V > & | getVertices () const |
AABB | generateBoundingBoxFromPredicate (const std::function< bool(const V &)> &predicate) |
Generate a bounding box containing vertices matching a predicate. | |
![]() | |
uint32_t | getSubMeshCount () const |
const std::vector< index_t > & | getIndices (uint32_t sub_mesh=0) const |
const AABB & | getBoundingBox () const |
void | flipFaces () |
const std::vector< glm::uvec3 > | getTriangles (uint32_t sub_mesh=0) const |
Additional Inherited Members | |
![]() | |
using | vertex_type = V |
![]() | |
std::vector< V > | _vertices |
![]() | |
std::vector< std::vector< index_t > > | _indices |
AABB | _aabb |
A cube mesh from (-0.5f, -0.5f, -0.5f) to (0.5f, 0.5f, 0.5f)
You can use it as a skybox if you flip the faces
|
inline |
mirror_textures | Set to true if textures should be mirrored (for skybox for example) |