16 for (
int i = 0; i < 8; i++) {
20 for (
int i = 0; i < 8; i++) {
56 return mesh->name == name;
59 return (it !=
meshes.end()) ? *it :
nullptr;
121 if (texCoordIndex < 8) {
135 if (colorIndex < 8) {
146 static_cast<uint8_t
>(modelVertex.
colors[colorIndex].
x * 255.0f),
147 static_cast<uint8_t
>(modelVertex.
colors[colorIndex].
y * 255.0f),
148 static_cast<uint8_t
>(modelVertex.
colors[colorIndex].
z * 255.0f),
149 static_cast<uint8_t
>(modelVertex.
colors[colorIndex].
w * 255.0f)
157 static_cast<uint8_t
>(modelVertex.
colors[colorIndex].
z * 255.0f),
158 static_cast<uint8_t
>(modelVertex.
colors[colorIndex].
y * 255.0f),
159 static_cast<uint8_t
>(modelVertex.
colors[colorIndex].
x * 255.0f),
160 static_cast<uint8_t
>(modelVertex.
colors[colorIndex].
w * 255.0f)
178 virtual std::unique_ptr<ModelData>
loadModel(
const std::string &path) = 0;
virtual std::unique_ptr< ModelData > loadModel(const std::string &path)=0
constexpr Format getFormat() const noexcept
constexpr ModelVertexAttribute getModelAttribute() const noexcept
void setAttribute(VtxType type, const T &value) noexcept
void setVertexAttributeFromModel(Vertex &vertex, size_t elementIndex, const VertexElement &element, const ModelVertex &modelVertex)
ModelMesh * findMesh(const std::string &name)
std::vector< ModelObject * > objects
std::vector< ModelMaterial * > materials
std::vector< ModelMesh * > meshes
std::vector< uint32_t > indices
std::vector< ModelVertex > vertices
std::vector< ModelObject * > children