22 #ifndef __UT_PolyRaster__
23 #define __UT_PolyRaster__
30 class UT_FilterSampleTable;
38 void setSampleTable(UT_FilterSampleTable *
table)
40 mySampleTable =
table;
45 myXSFilter =
x * 0.5F;
46 myYSFilter =
y * 0.5F;
50 myXMin = xl; myXMax = xr;
51 myYMin = yb; myYMax = yt;
70 const float v2[2],
int cliptowindow = 1);
76 float myXMin, myXMax,
myYMin, myYMax;
80 void rasterize(UT_prEdge *head,
int clipx)
const;
81 fpreal filterWeight(
const float v0[2],
const float v1[2],
82 const float v2[2])
const;
87 const UT_prEdge &edge)
const;
88 int genericClip(
const float vtx[][2],
int nvtx,
90 const UT_prEdge &e0)
const;
91 fpreal genericWeight(
float vtx[][2],
94 if (nvtx < 3)
return nvtx == -1;
95 return computeWeight(vtx, nvtx);
97 int toScreenX(
fpreal sx)
const
98 {
return (
int)((sx-myXMin)*myIXSinc); }
99 int floorScreenX(
fpreal sx)
const
100 {
return (
int)
SYSfloor((sx-myXMin)*myIXSinc); }
101 int ceilScreenX(
fpreal sx)
const
102 {
return (
int)
SYSceil((sx-myXMin)*myIXSinc); }
104 fpreal computeWeight(
float vtx[][2],
int nvtx)
const;
108 const UT_prEdge &edge)
const;
109 float myXSinc, myIXSinc;
110 float myYSinc, myIYSinc;
113 UT_FilterSample *mySampleTable;
void rasterize(const PointDataTreeOrGridT &points, TransferT &transfer, const FilterT &filter=NullFilter(), InterrupterT *interrupter=nullptr)
Perform potentially complex rasterization from a user defined transfer scheme.
GLuint GLuint GLfloat weight
GLfloat GLfloat GLfloat v2
SYS_API fpreal32 SYSfloor(fpreal32 val)
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
void setFilterWidth(fpreal x=1, fpreal y=1)
void setWindow(fpreal xl, fpreal xr, fpreal yb, fpreal yt)
GLenum GLsizei GLenum GLenum const void * table
void setResolution(int xsamp, int ysamp)
SYS_API fpreal32 SYSceil(fpreal32 val)