|
ModelViewer 0.1
Template for CPP projects
|
Class representing the geometry of an OBJ model. More...
#include <ObjGeometry.hpp>


Public Member Functions | |
| ObjGeometry (QQuick3DObject *parent=nullptr) | |
| Constructor. | |
| void | setMesh (const std::vector< Vector3 > &vertices, const std::vector< Vector3 > &normals, const std::vector< TextureCoordinate > &textureCoords) |
| Set the mesh data. | |
Private Member Functions | |
| void | setModelData (const std::vector< Vector3 > &vertices, const std::vector< Vector3 > &normals, const std::vector< TextureCoordinate > &textureCoords) |
| Set the model data to the geometry. | |
| void | configureVertexLayout () |
| Configure the vertex layout of the geometry based on the data. | |
Private Attributes | |
| bool | _hasNormals = false |
| Whether the geometry contains normals. | |
| bool | _hasTextureCoords = false |
| Whether the geometry contains texture coordinates. | |
Class representing the geometry of an OBJ model.
|
explicit |
Constructor.
| parent | Parent QQuick3DObject, nullptr by default |
|
private |
Configure the vertex layout of the geometry based on the data.
References _hasNormals, and _hasTextureCoords.
Referenced by setMesh().

| void model_viewer::geometry::ObjGeometry::setMesh | ( | const std::vector< Vector3 > & | vertices, |
| const std::vector< Vector3 > & | normals, | ||
| const std::vector< TextureCoordinate > & | textureCoords ) |
Set the mesh data.
| vertices | Vertices of the model |
| normals | Normals of the model |
| textureCoords | Texture coordinates of the model |
References _hasNormals, _hasTextureCoords, configureVertexLayout(), and setModelData().

|
private |
Set the model data to the geometry.
| vertices | Vertices of the model |
| normals | Normals of the model |
| textureCoords | Texture coordinates of the model |
References _hasNormals, and _hasTextureCoords.
Referenced by setMesh().

|
private |
Whether the geometry contains normals.
Referenced by configureVertexLayout(), setMesh(), and setModelData().
|
private |
Whether the geometry contains texture coordinates.
Referenced by configureVertexLayout(), setMesh(), and setModelData().