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 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 602 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 615 of file GU_Flatten2.h.

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

Definition at line 724 of file GU_Flatten2.h.

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

Definition at line 735 of file GU_Flatten2.h.

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

Definition at line 693 of file GU_Flatten2.h.

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

Definition at line 718 of file GU_Flatten2.h.

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

Definition at line 676 of file GU_Flatten2.h.

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

Definition at line 699 of file GU_Flatten2.h.

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

Definition at line 746 of file GU_Flatten2.h.

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

Definition at line 664 of file GU_Flatten2.h.

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

Definition at line 652 of file GU_Flatten2.h.

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

Definition at line 752 of file GU_Flatten2.h.

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

Definition at line 626 of file GU_Flatten2.h.

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

Definition at line 629 of file GU_Flatten2.h.

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

Definition at line 648 of file GU_Flatten2.h.

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

Definition at line 755 of file GU_Flatten2.h.

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

Definition at line 618 of file GU_Flatten2.h.

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

Definition at line 622 of file GU_Flatten2.h.

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

Definition at line 636 of file GU_Flatten2.h.

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

Definition at line 632 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 661 of file GU_Flatten2.h.

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

Definition at line 656 of file GU_Flatten2.h.

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

Definition at line 668 of file GU_Flatten2.h.


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