Files
RayTracer/src/util/Model.h
T

27 lines
466 B
C++
Raw Normal View History

2025-01-23 15:55:24 +01:00
#pragma once
#include "Minimal.h"
2025-01-23 17:19:53 +01:00
#include "scene/AABB.h"
2025-01-23 15:55:24 +01:00
#include <vector>
2025-01-24 21:54:46 +01:00
#include <optional>
2025-01-23 15:55:24 +01:00
2025-01-24 18:21:34 +01:00
// material infos
// shading parameter
// hit data
struct IntersectionInfo
{
float t;
glm::vec3 position;
glm::vec3 normal;
glm::vec3 albedo;
glm::vec3 emissive;
//....
};
2025-01-23 15:55:24 +01:00
class Model
{
2025-01-23 16:10:28 +01:00
public:
2025-01-23 17:19:53 +01:00
AABB boundingBox;
2025-01-23 15:55:24 +01:00
std::vector<glm::vec3> positions;
std::vector<uint32_t> indices;
2025-01-24 18:21:34 +01:00
std::optional<IntersectionInfo> intersect(Ray ray);
2025-01-23 15:55:24 +01:00
};
DECLARE_REF(Model)