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

#include <GU_UVFlatten.h>

Public Member Functions

 IslandBundle (const GU_Detail *gdp, const GA_PrimitiveGroup *prims, const GA_EdgeGroup *seams, Tessellation tessellation, const GEO_DetachedHedgeInterface *hip=nullptr)
 
void repartitionIslands (const GA_EdgeGroup *new_seams)
 
void clearDirtyFlags ()
 
int numIslandIndices () const
 
int numPrimaryIslands () const
 
const Islandisland (int i) const
 
Islandisland (int i)
 
SYS_FORCE_INLINE int polyPrimaryIsland (GA_Offset poly) const
 
SYS_FORCE_INLINE int polyIsland (GA_Offset poly) const
 
bool isPrimary (const Island &island) const
 
SYS_FORCE_INLINE int hedgeIsland (GEO_Hedge h) const
 
SYS_FORCE_INLINE int vertexPrimaryIsland (GA_Offset vtx) const
 
SYS_FORCE_INLINE int vertexIsland (GA_Offset vtx) const
 
bool hasPointIndex () const
 
SYS_FORCE_INLINE int vtxIslandPt (GA_Offset vtx, int island_idx) const
 
void getIslandIndices (UT_IntArray &idxs) const
 
template<typename Func >
void forEachIslandIndex (Func func, bool parallel=false)
 
template<typename Func >
void forEachIsland (Func func)
 
template<typename Func >
void parallelForEachIsland (Func func)
 
template<typename Func >
void forEachIslandIndex (Func func, bool parallel=false) const
 
template<typename Func >
void forEachIsland (Func func) const
 
template<typename Func >
void parallelForEachIsland (Func func) const
 
template<typename Func >
void forEachDirtyIsland (Func func) const
 
template<typename Func >
void parallelForEachDirtyIsland (Func func) const
 
template<typename Func >
void forEachDirtyIsland (Func func)
 
template<typename Func >
void parallelForEachDirtyIsland (Func func)
 
template<typename Func >
void forEachPrimaryIsland (Func func) const
 
bool isDirty (const Island &island) const
 
void makeDirty (const Island &island)
 

Detailed Description

An IslandBundle is used to store information about a collection (bundle) of primary islands determined by partitioning the polygons in a primtiive group 'prims' of a detail 'gdp' using the given group 'seams' of edges. The bundle also supports a "remapping" of the islands into secondary islands (or just "islands" after the effect) by recutting them using a second set of seams. Originally this was meant to be a simple "refining" of islands in which each primary island provided access to the secondary ones into which it was divided. Later on support was added to allow the repartitioning potentially remap the entire scene by erasing parts of the original seams that defined the primary islands thereby merging fragments from distinct primary islands into secondary ones. In this setting, each secondary island will be registered as a descendent of one of possibly several primary islands it overlaps. The other overlapped primary islands will be aware of having lost part (or all) of their territory to secondary islands held by other primary ones but without access to them.

The bundle provides methods to iterate over all primary, or current islands. In addition, the bundle provides a mechanism for quickly marking islands dirty and resetting all dirty flags. In particular, the building of secondary islands is optimized to efficiently determine the affected islands and set their dirty flags.

Definition at line 161 of file GU_UVFlatten.h.

Constructor & Destructor Documentation

GU_UVFlatten::IslandBundle::IslandBundle ( const GU_Detail gdp,
const GA_PrimitiveGroup prims,
const GA_EdgeGroup seams,
Tessellation  tessellation,
const GEO_DetachedHedgeInterface hip = nullptr 
)

Member Function Documentation

void GU_UVFlatten::IslandBundle::clearDirtyFlags ( )
inline

Definition at line 176 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::forEachDirtyIsland ( Func  func) const
inline

Definition at line 297 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::forEachDirtyIsland ( Func  func)
inline

Definition at line 317 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::forEachIsland ( Func  func)
inline

Definition at line 254 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::forEachIsland ( Func  func) const
inline

Definition at line 285 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::forEachIslandIndex ( Func  func,
bool  parallel = false 
)
inline

Definition at line 237 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::forEachIslandIndex ( Func  func,
bool  parallel = false 
) const
inline

Definition at line 266 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::forEachPrimaryIsland ( Func  func) const
inline

Definition at line 338 of file GU_UVFlatten.h.

void GU_UVFlatten::IslandBundle::getIslandIndices ( UT_IntArray idxs) const
bool GU_UVFlatten::IslandBundle::hasPointIndex ( ) const
inline

Definition at line 225 of file GU_UVFlatten.h.

SYS_FORCE_INLINE int GU_UVFlatten::IslandBundle::hedgeIsland ( GEO_Hedge  h) const
inline

Definition at line 213 of file GU_UVFlatten.h.

bool GU_UVFlatten::IslandBundle::isDirty ( const Island island) const
inline

Definition at line 344 of file GU_UVFlatten.h.

const Island& GU_UVFlatten::IslandBundle::island ( int  i) const
inline

Definition at line 187 of file GU_UVFlatten.h.

Island& GU_UVFlatten::IslandBundle::island ( int  i)
inline

Definition at line 190 of file GU_UVFlatten.h.

bool GU_UVFlatten::IslandBundle::isPrimary ( const Island island) const
inline

Definition at line 209 of file GU_UVFlatten.h.

void GU_UVFlatten::IslandBundle::makeDirty ( const Island island)
inline

Definition at line 347 of file GU_UVFlatten.h.

int GU_UVFlatten::IslandBundle::numIslandIndices ( ) const
inline

Definition at line 179 of file GU_UVFlatten.h.

int GU_UVFlatten::IslandBundle::numPrimaryIslands ( ) const
inline

Definition at line 183 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::parallelForEachDirtyIsland ( Func  func) const
inline

Definition at line 307 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::parallelForEachDirtyIsland ( Func  func)
inline

Definition at line 327 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::parallelForEachIsland ( Func  func)
inline

Definition at line 260 of file GU_UVFlatten.h.

template<typename Func >
void GU_UVFlatten::IslandBundle::parallelForEachIsland ( Func  func) const
inline

Definition at line 291 of file GU_UVFlatten.h.

SYS_FORCE_INLINE int GU_UVFlatten::IslandBundle::polyIsland ( GA_Offset  poly) const
inline

Definition at line 197 of file GU_UVFlatten.h.

SYS_FORCE_INLINE int GU_UVFlatten::IslandBundle::polyPrimaryIsland ( GA_Offset  poly) const
inline

Definition at line 193 of file GU_UVFlatten.h.

void GU_UVFlatten::IslandBundle::repartitionIslands ( const GA_EdgeGroup new_seams)
SYS_FORCE_INLINE int GU_UVFlatten::IslandBundle::vertexIsland ( GA_Offset  vtx) const
inline

Definition at line 222 of file GU_UVFlatten.h.

SYS_FORCE_INLINE int GU_UVFlatten::IslandBundle::vertexPrimaryIsland ( GA_Offset  vtx) const
inline

Definition at line 217 of file GU_UVFlatten.h.

SYS_FORCE_INLINE int GU_UVFlatten::IslandBundle::vtxIslandPt ( GA_Offset  vtx,
int  island_idx 
) const
inline

Definition at line 229 of file GU_UVFlatten.h.


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