Files
j3ml/include/J3ML/Geometry/Plane.h
2024-04-04 21:37:59 -04:00

32 lines
713 B
C++

#pragma once
#include <J3ML/LinearAlgebra/Vector3.h>
#include "Shape.h"
#include "Ray.h"
namespace J3ML::Geometry
{
using J3ML::LinearAlgebra::Vector3;
class Plane : public Shape
{
public:
Plane() : Shape() {}
Plane(const Vector3& v1, const Vector3 &v2, const Vector3& v3)
{
Set(v1, v2, v3);
}
Plane(const Vector3& pos, const Vector3& norm)
: Shape(), Position(pos), Normal(norm) {}
Vector3 Position;
Vector3 Normal;
float distance = 0.f;
void Set(const Vector3& v1, const Vector3& v2, const Vector3& v3)
{
}
bool Intersects(J3ML::Geometry::Ray ray, float *pDouble);
};
}