HDK
|
#include <GA_EdgeGroup.h>
Classes | |
class | base_iterator |
class | PrimEdge |
The edge data we store internally. More... | |
Public Types | |
typedef base_iterator< const GA_Edge, EdgeList::iterator > | iterator |
typedef base_iterator< const GA_Edge, EdgeList::const_iterator > | const_iterator |
Public Member Functions | |
GA_EdgeGroup (const GA_Detail &gdp, const char *name="") | |
Default constructor. More... | |
~GA_EdgeGroup () override | |
const GA_Detail & | getDetail () const override |
int64 | getMemoryUsage (bool inclusive) const override |
Report memory usage. More... | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
void | countMemory (UT_MemoryCounter &counter, bool inclusive) const override |
void | toggle () |
Toggle the existence of all edges of the detail for this group. More... | |
void | toggleEntries () |
iterator | remove (iterator it) |
GA_Size | entries () const override |
Returns the number of edges in this group. More... | |
bool | isEmpty () const |
Returns true if this edge group is empty. More... | |
void | clear () override |
Remove all edges from this group. More... | |
void | addAll () override |
Add all edges from the associated detail into this edge group. More... | |
bool | isOrdered () const override |
bool | isMixed () const override |
GA_Size | entriesWithPrimitive () const |
bool | combine (const GA_Group *input_group) override |
bool | jsonSaveData (UT_JSONWriter &w, const GA_SaveMap &m) const override |
bool | jsonLoadData (UT_JSONParser &w, const GA_LoadMap &m) override |
Load the private JSON data. More... | |
GA_EdgeGroup & | operator|= (const GA_EdgeGroup &input_group) |
Combinatorial operatos. More... | |
GA_EdgeGroup & | operator&= (const GA_EdgeGroup &input_group) |
GA_EdgeGroup & | operator-= (const GA_EdgeGroup &input_group) |
GA_EdgeGroup & | operator+= (const GA_EdgeGroup &input_group) |
GA_EdgeGroup & | operator^= (const GA_EdgeGroup &input_group) |
GA_EdgeGroup & | operator= (const GA_EdgeGroup &input_group) |
GA_DataId | getDataId () const |
void | bumpDataId () |
void | cloneDataId (const GA_EdgeGroup &src) |
void | makeAllEdgesValid () |
GA_DataId | getLastValidTopoId () const |
void | setValidTopoId (GA_DataId topology_data_id) |
GA_DataId | getLastValidPrimListId () const |
void | setValidPrimListId (GA_DataId primlist_data_id) |
void | defragment (const GA_Defragment &defrag) |
Interface for defragmentation. More... | |
const_iterator | find (const GA_Edge &edge, GA_Offset primoff=GA_INVALID_OFFSET) const |
const_iterator | find (const GA_Edge &edge, const GA_Primitive *prim) const |
iterator | find (const GA_Edge &edge, GA_Offset primoff=GA_INVALID_OFFSET) |
iterator | find (const GA_Edge &edge, const GA_Primitive *prim) |
bool | contains (const GA_Edge &edge, GA_Offset primoff=GA_INVALID_OFFSET) const |
bool | contains (const GA_Edge &edge, const GA_Primitive *prim) const |
bool | add (const GA_Edge &edge, GA_Offset primoff=GA_INVALID_OFFSET) |
bool | add (GA_Offset p0, GA_Offset p1, GA_Offset primoff=GA_INVALID_OFFSET) |
bool | add (const GA_Edge &edge, const GA_Primitive *prim) |
bool | add (GA_Offset p0, GA_Offset p1, const GA_Primitive *prim) |
bool | toggle (const GA_Edge &edge, GA_Offset primoff=GA_INVALID_OFFSET) |
bool | toggle (const GA_Edge &edge, const GA_Primitive *prim) |
bool | remove (const GA_Edge &edge, GA_Offset primoff=GA_INVALID_OFFSET) |
bool | remove (const GA_Edge &edge, const GA_Primitive *prim) |
Public Member Functions inherited from GA_Group | |
virtual | ~GA_Group () |
const UT_StringHolder & | getName () const |
bool | isInternal () const |
bool | getInternal () const |
void | setInternal (bool on_off) |
bool | isDetached () const |
GA_GroupType | classType () const |
GA_GroupMaskType | classMaskType () const |
bool | isElementGroup () const |
SYS_FORCE_INLINE bool | isEmpty () const |
void | clearEntries () |
virtual bool | stat (UT_WorkBuffer &info, uint level) const |
virtual bool | jsonShouldSave (const GA_SaveMap &map) const |
bool | jsonSaveDefinition (UT_JSONWriter &w, const char *type) const |
void | dump (std::ostream &os) |
A convenience function to do a JSON dump of the group contents. More... | |
Friends | |
class | GA_EdgeGroupTable |
Additional Inherited Members | |
Static Public Member Functions inherited from GA_Group | |
static const char * | groupType (GA_GroupType type) |
static GA_GroupType | groupType (const char *type) |
static bool | jsonLoadDefinition (UT_JSONParser &p, UT_WorkBuffer &type, UT_WorkBuffer &name, bool &internal) |
Load the GA_Group-Definition. More... | |
Protected Member Functions inherited from GA_Group | |
GA_Group (const UT_StringHolder &name, bool internal, GA_GroupType type, bool detached) | |
virtual bool | setName (const UT_StringHolder &n) |
Definition at line 42 of file GA_EdgeGroup.h.
typedef base_iterator<const GA_Edge, EdgeList::const_iterator> GA_EdgeGroup::const_iterator |
Definition at line 196 of file GA_EdgeGroup.h.
typedef base_iterator<const GA_Edge, EdgeList::iterator> GA_EdgeGroup::iterator |
Definition at line 195 of file GA_EdgeGroup.h.
GA_EdgeGroup::GA_EdgeGroup | ( | const GA_Detail & | gdp, |
const char * | name = "" |
||
) |
Default constructor.
|
override |
bool GA_EdgeGroup::add | ( | const GA_Edge & | edge, |
GA_Offset | primoff = GA_INVALID_OFFSET |
||
) |
Add an edge to this group. Returns true
if the edge was added, and false
if the edge already existed.
bool GA_EdgeGroup::add | ( | GA_Offset | p0, |
GA_Offset | p1, | ||
GA_Offset | primoff = GA_INVALID_OFFSET |
||
) |
Add an edge to this group. Returns true
if the edge was added, and false
if the edge already existed.
bool GA_EdgeGroup::add | ( | const GA_Edge & | edge, |
const GA_Primitive * | prim | ||
) |
Add an edge to this group. Returns true
if the edge was added, and false
if the edge already existed.
bool GA_EdgeGroup::add | ( | GA_Offset | p0, |
GA_Offset | p1, | ||
const GA_Primitive * | prim | ||
) |
Add an edge to this group. Returns true
if the edge was added, and false
if the edge already existed.
|
overridevirtual |
Add all edges from the associated detail into this edge group.
Implements GA_Group.
Returns an iterator pointing at the beginning of the list of edges of this edge group.
Definition at line 210 of file GA_EdgeGroup.h.
|
inline |
Definition at line 223 of file GA_EdgeGroup.h.
void GA_EdgeGroup::bumpDataId | ( | ) |
void GA_EdgeGroup::cloneDataId | ( | const GA_EdgeGroup & | src | ) |
|
overridevirtual |
Combine another group with this edge group. Currently, only edge groups are supported. Returns true
if the other group was combined with this one.
Reimplemented from GA_Group.
bool GA_EdgeGroup::contains | ( | const GA_Edge & | edge, |
GA_Offset | primoff = GA_INVALID_OFFSET |
||
) | const |
Returns true
if an edge exists in this group, matching the input data.
bool GA_EdgeGroup::contains | ( | const GA_Edge & | edge, |
const GA_Primitive * | prim | ||
) | const |
Returns true
if an edge exists in this group, matching the input data.
|
overridevirtual |
Count memory usage using a UT_MemoryCounter in order to count shared memory correctly. If inclusive is true, the size of this object is counted, else only memory owned by this object is counted. If this is pointed to by the calling object, inclusive should be true. If this is contained in the calling object, inclusive should be false. (Its memory was already counted in the size of the calling object.)
Implements GA_Group.
void GA_EdgeGroup::defragment | ( | const GA_Defragment & | defrag | ) |
Interface for defragmentation.
Returns an iterator pointing at the beginning of the list of edges of this edge group.
Definition at line 220 of file GA_EdgeGroup.h.
|
inline |
Definition at line 226 of file GA_EdgeGroup.h.
|
inlineoverridevirtual |
Returns the number of edges in this group.
Implements GA_Group.
Definition at line 309 of file GA_EdgeGroup.h.
|
inline |
Definition at line 328 of file GA_EdgeGroup.h.
const_iterator GA_EdgeGroup::find | ( | const GA_Edge & | edge, |
GA_Offset | primoff = GA_INVALID_OFFSET |
||
) | const |
Search for an edge matching the input. If the edge was found, it returns an iterator pointing at the edge in the list. Otherwise returns the end
iterator.
const_iterator GA_EdgeGroup::find | ( | const GA_Edge & | edge, |
const GA_Primitive * | prim | ||
) | const |
Search for an edge matching the input. If the edge was found, it returns an iterator pointing at the edge in the list. Otherwise returns the end
iterator.
iterator GA_EdgeGroup::find | ( | const GA_Edge & | edge, |
GA_Offset | primoff = GA_INVALID_OFFSET |
||
) |
Search for an edge matching the input. If the edge was found, it returns an iterator pointing at the edge in the list. Otherwise returns the end
iterator.
iterator GA_EdgeGroup::find | ( | const GA_Edge & | edge, |
const GA_Primitive * | prim | ||
) |
Search for an edge matching the input. If the edge was found, it returns an iterator pointing at the edge in the list. Otherwise returns the end
iterator.
|
inline |
Definition at line 376 of file GA_EdgeGroup.h.
|
inlineoverridevirtual |
Implements GA_Group.
Definition at line 203 of file GA_EdgeGroup.h.
|
inline |
Definition at line 402 of file GA_EdgeGroup.h.
|
inline |
Definition at line 393 of file GA_EdgeGroup.h.
|
overridevirtual |
Report memory usage.
Implements GA_Group.
|
inline |
Returns true
if this edge group is empty.
Definition at line 312 of file GA_EdgeGroup.h.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Load the private JSON data.
Implements GA_Group.
|
overridevirtual |
Save data to a JSON stream.
Private data for an edge group
Implements GA_Group.
void GA_EdgeGroup::makeAllEdgesValid | ( | ) |
NOTE: You don't need to call this for groups in a SOP's output detail, because it will call GA_EdgeGroupTable::makeAllEdgesValid(), which can be more efficient than calling this for each edge group, (if there are multiple). This also won't do anything if the max of the topology data ID and the primitive list data ID is equal to myLastValidTopoId, so you have to make sure that any necessary bumping has occurred. This was added for use by GU_EdgeSelection::validateEdges().
GA_EdgeGroup& GA_EdgeGroup::operator&= | ( | const GA_EdgeGroup & | input_group | ) |
GA_EdgeGroup& GA_EdgeGroup::operator+= | ( | const GA_EdgeGroup & | input_group | ) |
GA_EdgeGroup& GA_EdgeGroup::operator-= | ( | const GA_EdgeGroup & | input_group | ) |
GA_EdgeGroup& GA_EdgeGroup::operator= | ( | const GA_EdgeGroup & | input_group | ) |
GA_EdgeGroup& GA_EdgeGroup::operator^= | ( | const GA_EdgeGroup & | input_group | ) |
GA_EdgeGroup& GA_EdgeGroup::operator|= | ( | const GA_EdgeGroup & | input_group | ) |
Combinatorial operatos.
Remove the edge pointed to by the iterator, and return an iterator pointing to the next edge in the group.
bool GA_EdgeGroup::remove | ( | const GA_Edge & | edge, |
GA_Offset | primoff = GA_INVALID_OFFSET |
||
) |
Remove the entry corresponding with the given edge and the optional primitive. Returns true
if an edge was deleted based on the search data.
bool GA_EdgeGroup::remove | ( | const GA_Edge & | edge, |
const GA_Primitive * | prim | ||
) |
Remove the entry corresponding with the given edge and the optional primitive. Returns true
if an edge was deleted based on the search data.
Definition at line 406 of file GA_EdgeGroup.h.
Definition at line 397 of file GA_EdgeGroup.h.
void GA_EdgeGroup::toggle | ( | ) |
Toggle the existence of all edges of the detail for this group.
bool GA_EdgeGroup::toggle | ( | const GA_Edge & | edge, |
GA_Offset | primoff = GA_INVALID_OFFSET |
||
) |
Toggles the existence of a given edge in the group. If the edge got removed, then this function returns false
, if it got added, however, true
is returned.
bool GA_EdgeGroup::toggle | ( | const GA_Edge & | edge, |
const GA_Primitive * | prim | ||
) |
Toggles the existence of a given edge in the group. If the edge got removed, then this function returns false
, if it got added, however, true
is returned.
|
inline |
Definition at line 282 of file GA_EdgeGroup.h.
|
friend |
Definition at line 46 of file GA_EdgeGroup.h.