resonance 1.0.1
Loading...
Searching...
No Matches
apolygon.h
Go to the documentation of this file.
1#pragma once
2
3class ABitmap;
4struct APoint;
5struct APolygonEdge;
6
8constexpr int kAPolygonMaxVertexCount = 8;
9
29class APolygon {
30public:
45 void SetupEdge(APolygonEdge *pEdge, short nFrom, int nDirection) const;
46
61 short nFrom,
62 int nDirection,
63 const ABitmap *pTexture) const;
64
65 union {
66 unsigned int mColor;
68 };
71 const APoint *mPoints;
74};
constexpr int kAPolygonMaxVertexCount
Vertex slots an APolygon provides in APolygon::mIndices.
Definition apolygon.h:8
Description of a pixel rectangle, its layout, and its palette.
Definition abitmap.h:95
Convex polygon for the ACanvas polygon fills, as vertex indices into a shared point array.
Definition apolygon.h:29
short mReserved04
Definition apolygon.h:69
void SetupEdge(APolygonEdge *pEdge, short nFrom, int nDirection) const
Start an edge at one vertex and aim it at a neighbour.
const ABitmap * mTexture
Definition apolygon.h:67
short mVertexCount
Definition apolygon.h:70
const APoint * mPoints
Definition apolygon.h:71
unsigned int mColor
Definition apolygon.h:66
unsigned char mIndices[kAPolygonMaxVertexCount]
Definition apolygon.h:72
const APoint * mTexCoords
Definition apolygon.h:73
void SetupTexturedEdge(APolygonEdge *pEdge, short nFrom, int nDirection, const ABitmap *pTexture) const
Start an edge as SetupEdge() does and add its texture walk.
Pair of fixed point coordinates.
Definition apoint.h:16
One side of a convex polygon, walked a row at a time by the ACanvas polygon fills.
Definition apolygonedge.h:20