|
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>
Inheritance diagram for oe::scene::primitive::Cube:
Collaboration diagram for oe::scene::primitive::Cube:Public Member Functions | |
| Cube (const bool mirror_textures=false) | |
Public Member Functions inherited from oe::scene::ComplexMesh< V > | |
| constexpr void | generateSmoothNormals (uint32_t sub_mesh=0) |
| Smooth mesh normals. | |
| constexpr void | generateTangents () |
| Generate tangents from texture coordinates. | |
| constexpr void | generateTexcoords () |
| Approximate texture coords based on vertex position. | |
Public Member Functions inherited from oe::scene::SimpleMesh< V > | |
| 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) | |
| constexpr uint32_t | addSubMesh (const std::vector< oe::scene::index_t > &indices) noexcept |
| constexpr std::vector< V > & | getVertices () noexcept |
| constexpr const std::vector< V > & | getVertices () const noexcept |
| template<VertexPredicateFunction< V > F> | |
| constexpr AABB | generateBoundingBoxFromPredicate (F &&predicate) const noexcept |
| Generate a bounding box containing vertices matching a predicate. | |
Public Member Functions inherited from oe::scene::CommonMesh | |
| constexpr uint32_t | getSubMeshCount () const noexcept |
| constexpr const std::vector< index_t > & | getIndices (uint32_t sub_mesh=0) const noexcept |
| constexpr const AABB & | getBoundingBox () const noexcept |
| constexpr void | flipFaces () noexcept |
| constexpr const std::vector< glm::uvec3 > | getTriangles (uint32_t sub_mesh=0) const |
Additional Inherited Members | |
Public Types inherited from oe::scene::SimpleMesh< V > | |
| using | vertex_type = V |
Protected Attributes inherited from oe::scene::SimpleMesh< V > | |
| std::vector< V > | _vertices |
Protected Attributes inherited from oe::scene::CommonMesh | |
| 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) |