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

#include <GU_Flatten.h>

Classes

class  Pin
 

Public Member Functions

 GU_Flatten (GU_Detail *gdp, const GA_PrimitiveGroup *prims, const GA_EdgeGroup *seams, const GA_EdgeGroup *extra_seams, bool use_input_uv=false, bool axis_align_islands=false, bool repack_wasted=false)
 
 ~GU_Flatten ()
 
int getNumIslands ()
 
bool flattenAndPack ()
 
int reflattenWithPins ()
 
void addDistortionAttribute ()
 
void addPointIdAttribute ()
 
void addIslandAttribute (bool add)
 Creates a primitive attribute for island number. More...
 
void updateExtraSeamsGroup (const GA_EdgeGroup *exgp)
 Change the extra cuts edge group. More...
 
void updatePrimitiveGroup (const GA_PrimitiveGroup *prims)
 Change the primitive group. More...
 
void addPin (int prim, int vert, fpreal u, fpreal v)
 Add one pinned point. More...
 
void addOriginalPinGroup (const char *name)
 Create a vertex group of all original pins. More...
 
void addActivePinGroup (const char *name)
 
void addSeamsGroup (const char *name)
 
const std::string getWarningMessage ()
 

Detailed Description

Definition at line 28 of file GU_Flatten.h.

Constructor & Destructor Documentation

GU_Flatten::GU_Flatten ( GU_Detail gdp,
const GA_PrimitiveGroup prims,
const GA_EdgeGroup seams,
const GA_EdgeGroup extra_seams,
bool  use_input_uv = false,
bool  axis_align_islands = false,
bool  repack_wasted = false 
)
GU_Flatten::~GU_Flatten ( )

Member Function Documentation

void GU_Flatten::addActivePinGroup ( const char *  name)

Create a vertex group of all pins used during the flattening, both initial and user-specified.

void GU_Flatten::addDistortionAttribute ( )

Creates a vertex attribute for angular distortion and computes the distortion for all islands. It also creates the input vertex equivalence classes (myInputVertexClasses).

void GU_Flatten::addIslandAttribute ( bool  add)

Creates a primitive attribute for island number.

void GU_Flatten::addOriginalPinGroup ( const char *  name)

Create a vertex group of all original pins.

void GU_Flatten::addPin ( int  prim,
int  vert,
fpreal  u,
fpreal  v 
)

Add one pinned point.

void GU_Flatten::addPointIdAttribute ( )
void GU_Flatten::addSeamsGroup ( const char *  name)
bool GU_Flatten::flattenAndPack ( )

Updates UVs in myTGdp and packs all islands into unit square. Once finished, myTGdp will hold UVs as created after flattening with the initially assigned pins. Returns true if interrupted and false otherwise

int GU_Flatten::getNumIslands ( )
inline

Definition at line 41 of file GU_Flatten.h.

const std::string GU_Flatten::getWarningMessage ( )
inline

Definition at line 114 of file GU_Flatten.h.

int GU_Flatten::reflattenWithPins ( )

Re-flattens islands affected by changes in current pins. Returns 1 if was interrupted and 0 otherwise

void GU_Flatten::updateExtraSeamsGroup ( const GA_EdgeGroup exgp)

Change the extra cuts edge group.

void GU_Flatten::updatePrimitiveGroup ( const GA_PrimitiveGroup prims)

Change the primitive group.


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