3D Editor treaks

This commit is contained in:
IlyaShurupov 2024-11-05 12:26:48 +03:00 committed by Ilya Shurupov
parent 0b279163de
commit 822c60d839
27 changed files with 254 additions and 124 deletions

View file

@ -43,6 +43,8 @@ normal = n1 * barycentric.x + n2 * barycentric.y + n3 * barycentric.z;
using namespace tp;
// TODO : de-duplicate in Scene?
void RayTracer::castRay(const Ray& ray, RayCastData& out, alnf farVal) {
out.hit = false;
out.obj = nullptr;

View file

@ -30,14 +30,6 @@ namespace tp {
void render(const Scene& scene, OutputBuffers& out, const RenderSettings& settings);
private:
struct RayCastData {
const Object* obj = nullptr;
TrigCache* trig = nullptr;
Vec3F hitPos = { 0, 0, 0 };
bool hit = false;
bool inv = false;
};
struct LightData {
halnf intensity = 0;
};