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

#include <GU_Flatten2.h>

Classes

class  AlignGroup
 
class  AlignVertex
 
struct  AngleConstraint
 
class  Pin
 
struct  VirtualHedge
 

Public Types

enum  Method { SPECTRAL, LSCM, LINEAR_ABF }
 
enum  DirLabel { NOT_ALIGNED, U_ALIGNED, V_ALIGNED, CONTRADICTION }
 
typedef UT_Array< AlignGroupAlignGroupArray
 
typedef UT_Array< AngleConstraintAngleConstraintArray
 
typedef UT_Map< int,
AlignGroupArray
AlignGroupMap
 
typedef UT_Map< int,
AngleConstraintArray
AngleConstraintMap
 

Public Member Functions

 GU_Flatten2 (GU_Detail *gdp, GA_Attribute *uv_attrib, const GA_PrimitiveGroup *prims, const GA_EdgeGroup *seams, const GA_EdgeGroup *extra_seams, bool use_input_uv, bool axis_align_islands, bool repack_wasted, Method method, bool straighten_boundary, bool straighten_interior, bool orthogonalize, bool use_input_boundary_uv, int test=0)
 
 ~GU_Flatten2 ()
 
int getNumIslands ()
 
void flattenAndPack ()
 Updates UVs in myTGdp and packs all islands into the unit square. More...
 
void reflattenConstrainedIslands ()
 Re-flattens islands affected by the constrinats. More...
 
void getAlignUVs (UT_Vector2FArray &uvs)
 
void getAlignPointsUVs (UT_Vector2FArray &uvs)
 
void getStraightenEdgesUVs (UT_Vector2FArray &uvs)
 
void getAlignEdgesUVs (UT_Vector2FArray &uvs)
 
void getExtraSeamEdgesUVs (UT_Vector2FArray &uvs)
 
void getUPathUVs (UT_Vector2FArray &uvs)
 
void getVPathUVs (UT_Vector2FArray &uvs)
 
void getUnalignedPathUVs (UT_Vector2FArray &uvs)
 
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)
 
void clearAlignGroups ()
 
void pinInputBoundary ()
 
void addAlignGroup (GA_VertexGroup *vtx_group, int dir=0)
 
void processAlignGroups ()
 
void addAlignGroupToMap (AlignGroupMap &map, AlignGroup align_group)
 
void getPathUVs (UT_Vector2FArray &uvs, GA_OffsetArray &hedges)
 
const std::string getWarningMessage ()
 

Detailed Description

Definition at line 32 of file GU_Flatten2.h.

Member Typedef Documentation

Definition at line 325 of file GU_Flatten2.h.

Definition at line 327 of file GU_Flatten2.h.

Member Enumeration Documentation

Enumerator
NOT_ALIGNED 
U_ALIGNED 
V_ALIGNED 
CONTRADICTION 

Definition at line 42 of file GU_Flatten2.h.

Enumerator
SPECTRAL 
LSCM 
LINEAR_ABF 

Definition at line 35 of file GU_Flatten2.h.

Constructor & Destructor Documentation

GU_Flatten2::GU_Flatten2 ( GU_Detail gdp,
GA_Attribute uv_attrib,
const GA_PrimitiveGroup prims,
const GA_EdgeGroup seams,
const GA_EdgeGroup extra_seams,
bool  use_input_uv,
bool  axis_align_islands,
bool  repack_wasted,
Method  method,
bool  straighten_boundary,
bool  straighten_interior,
bool  orthogonalize,
bool  use_input_boundary_uv,
int  test = 0 
)
GU_Flatten2::~GU_Flatten2 ( )

Member Function Documentation

void GU_Flatten2::addActivePinGroup ( const char *  name)

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

void GU_Flatten2::addAlignGroup ( GA_VertexGroup vtx_group,
int  dir = 0 
)
void GU_Flatten2::addAlignGroupToMap ( AlignGroupMap map,
AlignGroup  align_group 
)
void GU_Flatten2::addIslandAttribute ( bool  add)

Creates a primitive attribute for island number.

void GU_Flatten2::addOriginalPinGroup ( const char *  name)

Create a vertex group of all original pins.

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

Add one pinned point.

void GU_Flatten2::addPointIdAttribute ( )
void GU_Flatten2::addSeamsGroup ( const char *  name)
void GU_Flatten2::clearAlignGroups ( )
void GU_Flatten2::flattenAndPack ( )

Updates UVs in myTGdp and packs all islands into the unit square.

void GU_Flatten2::getAlignEdgesUVs ( UT_Vector2FArray uvs)
void GU_Flatten2::getAlignPointsUVs ( UT_Vector2FArray uvs)
void GU_Flatten2::getAlignUVs ( UT_Vector2FArray uvs)
void GU_Flatten2::getExtraSeamEdgesUVs ( UT_Vector2FArray uvs)
int GU_Flatten2::getNumIslands ( )
inline

Definition at line 65 of file GU_Flatten2.h.

void GU_Flatten2::getPathUVs ( UT_Vector2FArray uvs,
GA_OffsetArray hedges 
)
void GU_Flatten2::getStraightenEdgesUVs ( UT_Vector2FArray uvs)
void GU_Flatten2::getUnalignedPathUVs ( UT_Vector2FArray uvs)
void GU_Flatten2::getUPathUVs ( UT_Vector2FArray uvs)
void GU_Flatten2::getVPathUVs ( UT_Vector2FArray uvs)
const std::string GU_Flatten2::getWarningMessage ( )
inline

Definition at line 343 of file GU_Flatten2.h.

void GU_Flatten2::pinInputBoundary ( )
void GU_Flatten2::processAlignGroups ( )
void GU_Flatten2::reflattenConstrainedIslands ( )

Re-flattens islands affected by the constrinats.

void GU_Flatten2::updateExtraSeamsGroup ( const GA_EdgeGroup exgp)

Change the extra cuts edge group.

void GU_Flatten2::updatePrimitiveGroup ( const GA_PrimitiveGroup prims)

Change the primitive group.


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