mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 23:00:42 +00:00
Cleanup, add scanline mask builder
This commit is contained in:
30
PortabilityLayer/LinePlotter.h
Normal file
30
PortabilityLayer/LinePlotter.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "PlotDirection.h"
|
||||
#include "Vec2i.h"
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
class LinePlotter
|
||||
{
|
||||
public:
|
||||
LinePlotter();
|
||||
PlotDirection PlotNext();
|
||||
const Vec2i &GetPoint() const;
|
||||
|
||||
void Reset(const Vec2i &pointA, const Vec2i &pointB);
|
||||
|
||||
private:
|
||||
Vec2i m_point;
|
||||
Vec2i m_endPoint;
|
||||
int32_t m_dx;
|
||||
int32_t m_dy;
|
||||
int32_t m_err;
|
||||
bool m_xIncrPos;
|
||||
bool m_yIncrPos;
|
||||
|
||||
PlotDirection m_xyMove;
|
||||
PlotDirection m_xMove;
|
||||
PlotDirection m_yMove;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user