1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 17:05:07 +00:00
serenity/Userland/Libraries/LibSoftGPU/Clipper.h
2022-04-06 11:32:24 +02:00

36 lines
614 B
C++

/*
* Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Vector.h>
#include <LibGPU/Vertex.h>
#include <LibGfx/Vector4.h>
namespace SoftGPU {
class Clipper final {
public:
enum class ClipPlane : u8 {
LEFT = 0,
RIGHT,
TOP,
BOTTOM,
NEAR,
FAR
};
Clipper() = default;
void clip_triangle_against_frustum(Vector<GPU::Vertex>& input_vecs);
private:
Vector<GPU::Vertex> list_a;
Vector<GPU::Vertex> list_b;
};
}