Unfinished Work
This commit is contained in:
@@ -1,11 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <J3ML/Geometry/Common.h>
|
||||
#include <vector>
|
||||
#include "Shape.h"
|
||||
#include "J3ML/LinearAlgebra.h"
|
||||
|
||||
namespace J3ML::Geometry {
|
||||
|
||||
class Polygon : public Shape
|
||||
{
|
||||
public:
|
||||
std::vector<Vector3> vertices;
|
||||
AABB MinimalEnclosingAABB() const;
|
||||
int NumVertices() const
|
||||
{
|
||||
return (int)vertices.size();
|
||||
}
|
||||
Vector3 Vertex(int vertexIndex) const
|
||||
{
|
||||
assert(vertexIndex >= 0);
|
||||
assert(vertexIndex < (int) vertices.size());
|
||||
return vertices[vertexIndex];
|
||||
}
|
||||
protected:
|
||||
private:
|
||||
};
|
||||
|
Reference in New Issue
Block a user