KrisLibrary  1.0.0
Public Member Functions | List of all members
Meshing::Rasterizer2D Struct Referenceabstract

A base class that allows rasterizing of 2D triangles into a grid. More...

#include <Rasterize.h>

Inheritance diagram for Meshing::Rasterizer2D:
Meshing::FillRasterizer2D< T > Meshing::SmoothFillRasterizer2D< T >

Public Member Functions

void Rasterize (const Triangle2D &t)
 
void ClippedRasterize (const Triangle2D &t, const AABB2D &aabb)
 
void Rasterize (const AABB2D &b)
 
void ClippedRasterize (const AABB2D &t, const AABB2D &aabb)
 
void Rasterize (const Triangle2D &t, const Vector3 &baryA, const Vector3 &baryB, const Vector3 &baryC)
 
void RasterizeVerticalSegment (int i, Real y1, Real y2, const Vector3 &baryA, const Vector3 &baryB)
 
virtual void VisitCell (const Vector3 &params, int i, int j)=0
 

Detailed Description

A base class that allows rasterizing of 2D triangles into a grid.

The triangle is assumed to be already in grid coordinates. Each cell (i,j) is filled if the point (i,j) is contained within the triangle. More precisely, it is filled if (i+eps,j+eps) is contained within the triangle for an infinitesmal perturbation eps.

The triangle is drawn no matter what its orientation (ccw or cw).

VisitCell() is an abstract method that should be overloaded by subclassing.


The documentation for this struct was generated from the following files: