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

#include <GU_Flatten2.h>

Public Member Functions

 IslandBundle (const GU_Detail *gdp, const GA_PrimitiveGroup *prims, const GA_EdgeGroup *seams, const GEO_DetachedHedgeInterface *hip=nullptr)
 
void repartitionIslands (const GA_EdgeGroup *islet_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, bool parallel=false)
 
template<typename Func >
void forEachIslandIndex (Func func, bool parallel=false) const
 
template<typename Func >
void forEachIsland (Func func, bool parallel=false) const
 
template<typename Func >
void forEachDirtyIsland (Func func, bool parallel=false) const
 
template<typename Func >
void forEachDirtyIsland (Func func, bool parallel=false)
 
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 descendant 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 603 of file GU_Flatten2.h.

Constructor & Destructor Documentation

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

Member Function Documentation

void GU_Flatten2::IslandBundle::clearDirtyFlags ( )
inline

Definition at line 616 of file GU_Flatten2.h.

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

Definition at line 725 of file GU_Flatten2.h.

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

Definition at line 736 of file GU_Flatten2.h.

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

Definition at line 694 of file GU_Flatten2.h.

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

Definition at line 719 of file GU_Flatten2.h.

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

Definition at line 677 of file GU_Flatten2.h.

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

Definition at line 700 of file GU_Flatten2.h.

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

Definition at line 747 of file GU_Flatten2.h.

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

Definition at line 665 of file GU_Flatten2.h.

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

Definition at line 653 of file GU_Flatten2.h.

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

Definition at line 753 of file GU_Flatten2.h.

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

Definition at line 627 of file GU_Flatten2.h.

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

Definition at line 630 of file GU_Flatten2.h.

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

Definition at line 649 of file GU_Flatten2.h.

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

Definition at line 756 of file GU_Flatten2.h.

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

Definition at line 619 of file GU_Flatten2.h.

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

Definition at line 623 of file GU_Flatten2.h.

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

Definition at line 637 of file GU_Flatten2.h.

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

Definition at line 633 of file GU_Flatten2.h.

void GU_Flatten2::IslandBundle::repartitionIslands ( const GA_EdgeGroup islet_seams)
SYS_FORCE_INLINE int GU_Flatten2::IslandBundle::vertexIsland ( GA_Offset  vtx) const
inline

Definition at line 662 of file GU_Flatten2.h.

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

Definition at line 657 of file GU_Flatten2.h.

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

Definition at line 669 of file GU_Flatten2.h.


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