Hymn to Beauty
C++ 3D Engine
Geometry::Model Class Reference

Interface of a model loaded from a file. More...

#include <Model.hpp>

Inheritance diagram for Geometry::Model:
Video::Geometry::Geometry3D

Public Member Functions

 Model (Video::LowLevelRenderer *lowLevelRenderer)
 Create new empty model. More...
 
virtual ~Model ()
 Destructor. More...
 
Json::Value Save () const
 Save the model. More...
 
void Load (const std::string &name)
 Load model from file. More...
 
- Public Member Functions inherited from Video::Geometry::Geometry3D
 Geometry3D (LowLevelRenderer *lowLevelRenderer)
 Create new 3D geometry. More...
 
virtual ~Geometry3D ()
 Destructor. More...
 
GeometryBindingGetGeometryBinding ()
 Get the geometry binding. More...
 
unsigned int GetIndexCount () const
 Get number of indices. More...
 
const AxisAlignedBoundingBoxGetAxisAlignedBoundingBox () const
 Get the axis-aligned bounding box around the geometry. More...
 
const std::vector< glm::vec3 > & GetVertexPositionData () const
 Get vertex position vector. More...
 
const std::vector< uint32_t > & GetVertexIndexData () const
 Get vertex index vector. More...
 

Public Attributes

std::string name
 The name of the model. More...
 
std::string path
 The folder containing the model file. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Video::Geometry::Geometry3D
void GenerateIndexBuffer (uint32_t *indexData, unsigned int indexCount)
 Generate index buffer. More...
 
void GenerateGeometryBinding ()
 Generate geometry binding. More...
 
void CreateAxisAlignedBoundingBox (const std::vector< glm::vec3 * > &positions)
 Create local space axis-aligned bounding box around the geometry. More...
 
void CreateAxisAlignedBoundingBox (glm::vec3 dim, glm::vec3 origin, glm::vec3 minValues, glm::vec3 maxValues)
 Create local space axis-aligned bounding box around the geometry. More...
 
- Protected Attributes inherited from Video::Geometry::Geometry3D
BuffervertexBuffer = nullptr
 Vertex buffer. More...
 
BufferindexBuffer = nullptr
 Index buffer. More...
 
VertexDescriptionvertexDescription = nullptr
 Vertex description. More...
 
std::vector< glm::vec3 > vertexPositionData
 Vertex position data. More...
 
std::vector< uint32_t > vertexIndexData
 Vertex index data. More...
 
LowLevelRendererlowLevelRenderer
 The low-level renderer used to create buffers and the vertex description. More...
 

Detailed Description

Interface of a model loaded from a file.

Constructor & Destructor Documentation

◆ Model()

Model::Model ( Video::LowLevelRenderer lowLevelRenderer)
explicit

Create new empty model.

The created model has to be loaded later using Load.

Parameters
lowLevelRendererThe low-level renderer to use

◆ ~Model()

Model::~Model ( )
virtual

Destructor.

Member Function Documentation

◆ Load()

void Model::Load ( const std::string &  name)

Load model from file.

Parameters
nameName of the model.

◆ Save()

Json::Value Model::Save ( ) const

Save the model.

Returns
JSON value to be stored on disk.

Member Data Documentation

◆ name

std::string Geometry::Model::name

The name of the model.

◆ path

std::string Geometry::Model::path

The folder containing the model file.


The documentation for this class was generated from the following files: