8#ifndef MODELVIEWER_OBJGEOMETRY_HPP
9#define MODELVIEWER_OBJGEOMETRY_HPP
12#include <QQuick3DGeometry>
36 explicit ObjGeometry(QQuick3DObject *parent =
nullptr);
44 void setMesh(
const std::vector<Vector3> &vertices,
45 const std::vector<Vector3> &normals,
46 const std::vector<TextureCoordinate> &textureCoords);
56 const std::vector<Vector3> &normals,
57 const std::vector<TextureCoordinate> &textureCoords);
Class representing the geometry of an OBJ model.
Definition ObjGeometry.hpp:22
bool _hasNormals
Whether the geometry contains normals.
Definition ObjGeometry.hpp:26
void setMesh(const std::vector< Vector3 > &vertices, const std::vector< Vector3 > &normals, const std::vector< TextureCoordinate > &textureCoords)
Set the mesh data.
Definition ObjGeometry.cpp:14
void setModelData(const std::vector< Vector3 > &vertices, const std::vector< Vector3 > &normals, const std::vector< TextureCoordinate > &textureCoords)
Set the model data to the geometry.
Definition ObjGeometry.cpp:25
bool _hasTextureCoords
Whether the geometry contains texture coordinates.
Definition ObjGeometry.hpp:29
ObjGeometry(QQuick3DObject *parent=nullptr)
Constructor.
Definition ObjGeometry.cpp:12
void configureVertexLayout()
Configure the vertex layout of the geometry based on the data.
Definition ObjGeometry.cpp:59
Definition ObjGeometry.cpp:10