Apply formating to all files. CLeanup

This commit is contained in:
IlyaShurupov 2023-10-22 17:07:28 +03:00 committed by Ilya Shurupov
parent b4ae5dde77
commit 91fb72bd49
928 changed files with 14515 additions and 21479 deletions

View file

@ -1,53 +1,49 @@
#pragma once
#include "Buffer.hpp"
#include "Camera.hpp"
namespace tp {
class TrigCache {
static Vec3F gHitPos;
public:
ualni mP1, mP2, mP3;
Vec3F mEdgeP1P2, mEdgeP1P3;
Vec3F mNormal;
Vec3F mOrigin;
public:
TrigCache();
TrigCache(const TrigCache& in);
TrigCache(ualni v1, ualni v2, ualni v3);
public:
static const Vec3F& getHitPos();
[[nodiscard]] const Vec3F& getNormal() const;
public:
void updateCache(const Buffer<Vec3F>& points);
[[nodiscard]] bool castRay(const Ray& ray) const;
};
struct Topology {
Vec3F Origin = {0, 0, 0};
mat3f Basis = {
{1, 0, 0},
{0, 1, 0},
{0, 0, 1}
};
Buffer<Vec3F> Points;
Buffer<Vec3F> Normals;
Buffer<Vec3I> Indexes;
};
struct TopologyCache {
const Topology* Source = nullptr;
Buffer<Vec3F> TransformedPoints;
Buffer<Vec3F> TransformedNormals;
Buffer<TrigCache> TrigCaches;
void updateCache();
};
}
#pragma once
#include "Buffer.hpp"
#include "Camera.hpp"
namespace tp {
class TrigCache {
static Vec3F gHitPos;
public:
ualni mP1, mP2, mP3;
Vec3F mEdgeP1P2, mEdgeP1P3;
Vec3F mNormal;
Vec3F mOrigin;
public:
TrigCache();
TrigCache(const TrigCache& in);
TrigCache(ualni v1, ualni v2, ualni v3);
public:
static const Vec3F& getHitPos();
[[nodiscard]] const Vec3F& getNormal() const;
public:
void updateCache(const Buffer<Vec3F>& points);
[[nodiscard]] bool castRay(const Ray& ray) const;
};
struct Topology {
Vec3F Origin = { 0, 0, 0 };
mat3f Basis = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 } };
Buffer<Vec3F> Points;
Buffer<Vec3F> Normals;
Buffer<Vec3I> Indexes;
};
struct TopologyCache {
const Topology* Source = nullptr;
Buffer<Vec3F> TransformedPoints;
Buffer<Vec3F> TransformedNormals;
Buffer<TrigCache> TrigCaches;
void updateCache();
};
}