HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TIL_UVEnlarger Class Reference

#include <TIL_UVEnlarger.h>

Public Types

enum  Scheme { SCHEME_FILL_AVERAGE, SCHEME_FLOOD_FILL, SCHEME_DIFFUSE_FILL, SCHEME_INVALID }
 

Public Member Functions

 TIL_UVEnlarger (PXL_Raster &raster, const PXL_Raster *alpha_raster, Scheme scheme=SCHEME_FLOOD_FILL, int fillPadding=4)
 
 ~TIL_UVEnlarger ()
 
void setFillPadding (int fp)
 
void setScheme (Scheme scheme)
 Sets the scheme to use when enlarging. More...
 
bool enlarge (bool doUnpremult=true) const
 

Detailed Description

Definition at line 22 of file TIL_UVEnlarger.h.

Member Enumeration Documentation

Enumerator
SCHEME_FILL_AVERAGE 

Computes the average value of all the pixels that are a part of UV islands, then applies that average value to all empty parts of the image.

SCHEME_FLOOD_FILL 

Does a flood fill on the image and expands the boundary of each UV island found by the amount specified by myFillPadding.

SCHEME_DIFFUSE_FILL 

Does a diffusion fill on empty areas after expanding boundaries of UV island specified by myFillPadding.

SCHEME_INVALID 

Definition at line 25 of file TIL_UVEnlarger.h.

Constructor & Destructor Documentation

TIL_UVEnlarger::TIL_UVEnlarger ( PXL_Raster raster,
const PXL_Raster alpha_raster,
Scheme  scheme = SCHEME_FLOOD_FILL,
int  fillPadding = 4 
)

If PXL_Raster is an RGB raster (with no alpha), then the alpha will be pulled from the alpha_raster. If there's no alpha, all non-black pixels will be considered opaque.

TIL_UVEnlarger::~TIL_UVEnlarger ( )

Member Function Documentation

bool TIL_UVEnlarger::enlarge ( bool  doUnpremult = true) const
void TIL_UVEnlarger::setFillPadding ( int  fp)
inline

How many pixels to pad each UV island with, when using the flood filling scheme for enlarging.

Definition at line 55 of file TIL_UVEnlarger.h.

void TIL_UVEnlarger::setScheme ( Scheme  scheme)
inline

Sets the scheme to use when enlarging.

Definition at line 59 of file TIL_UVEnlarger.h.


The documentation for this class was generated from the following file: