HDK
|
#include <GU_Selection.h>
Public Member Functions | |
virtual | ~GU_Selection () |
virtual void | assign (const GU_Detail &src_gd, const GU_Selection &src_sel)=0 |
virtual bool | select (const GU_Detail &gd, uint id1, uint id2, uint id3, GU_SelectionRule rule, GU_SelectResult &added, GU_SelectFinishData *&finish_data)=0 |
virtual bool | selectFinish (const GU_Detail &gd, GU_SelectionRule rule, GU_SelectResult &added, GU_SelectFinishData *finish_data) |
virtual bool | testSelect (const GU_Detail &gd, uint id1, uint id2, uint id3, bool accept_existing, bool accept_new, GU_SelectResult &result) const =0 |
virtual bool | selectionPoint (const GU_SelectResult &added, UT_Vector3 &xsect) const =0 |
virtual bool | selectionPoint (const GU_SelectResult &added, UT_Vector3 rayorig, UT_Vector3 &raydir, UT_Vector3 &xsect, bool &normal, UT_Vector3 &vector, bool accurate, float *u, float *v) const =0 |
bool | modifyGroup (const GU_Detail &gd, const GA_Group &group, GU_SelectionRule rule) |
void | modifyGroupToken (const char *token, GU_SelectionRule rule) |
void | initGroupString (const GU_Detail &gd, const GA_Group &group, const char *group_string) |
bool | getGroupTokenString (UT_WorkBuffer &buf) const |
bool | getGroupTokensValid () const |
void | setGroupTokensLock (bool lock) |
virtual bool | modifyPoint (const GU_Detail &gd, GA_Offset ptoff, GU_ModifyType type)=0 |
virtual bool | modifyVertex (const GU_Detail &gd, GA_Offset vtxoff, GU_ModifyType type)=0 |
virtual bool | modifyPrimitive (const GU_Detail &gd, GA_Offset primoff, GU_ModifyType type)=0 |
virtual bool | modifyEdge (const GU_Detail &gd, const GA_Edge &edge, const GEO_Primitive *prim, GU_ModifyType type)=0 |
virtual bool | modifyBreakpoint (const GU_Detail &gd, const GA_Breakpoint &bkp, GU_ModifyType type)=0 |
void | modifyDone (const GU_Detail &gd) |
Call this method once mass-modifications are finished with the above. More... | |
virtual bool | appendElem (GA_Index id1, GA_Index id2=GA_INVALID_INDEX, GA_Index id3=GA_INVALID_INDEX, GA_Index id4=GA_INVALID_INDEX) |
void | appendDone () |
virtual bool | selectAll (const GU_Detail &gd)=0 |
virtual bool | toggleAll (const GU_Detail &gd)=0 |
virtual bool | selectBoundary (const GU_Detail &gd, bool checkuv, const UT_StringHolder &uvattribname="uv"_UTsh)=0 |
virtual bool | growSelection (const GU_Detail &gd, bool checkuv, const UT_StringHolder &uvattribname="uv"_UTsh)=0 |
virtual bool | shrinkSelection (const GU_Detail &gd, bool checkuv, const UT_StringHolder &uvattribname="uv"_UTsh)=0 |
virtual bool | filterByPrimitiveMask (const GU_Detail &gd, const GA_PrimitiveTypeMask &mask)=0 |
bool | uvSelectAllFrontFace (const GU_Detail &gd, const UT_StringHolder &uvattribname="uv"_UTsh) |
bool | uvSelectAllBackFace (const GU_Detail &gd, const UT_StringHolder &uvattribname="uv"_UTsh) |
virtual const GA_PointGroup * | points (const GU_Detail &gd) const =0 |
virtual const GA_PrimitiveGroup * | primitives (const GU_Detail &gd) const =0 |
virtual const GA_VertexGroup * | vertices (const GU_Detail &gd) const =0 |
virtual const GA_EdgeGroup * | edges (const GU_Detail &gd) const =0 |
virtual const GA_BreakpointGroup * | breakpoints (const GU_Detail &gd) const =0 |
virtual bool | hasPointIndex (GA_Index index) const |
virtual bool | hasPrimitiveIndex (GA_Index index) const |
virtual bool | hasVertexIndex (GA_Index index) const |
virtual bool | hasEdgeIndexPair (GA_Index p0, GA_Index p1) const |
virtual bool | hasPrimEdgeIndexSet (GA_Index p0, GA_Index p1, GA_Index pr) const |
virtual bool | hasBreakpointIndexSet (GA_Index prim_index, int u_index, int v_index=-1) const |
virtual const GA_Group * | mainGroup (const GU_Detail &gd) const =0 |
const GA_Group * | group (const GU_Detail &gd, GA_GroupType type) |
virtual void | clear () |
virtual void | clearAndDestroy () |
virtual GA_Size | entries () const =0 |
virtual bool | getBoundingBox (const GU_Detail &gd, UT_BoundingBox &bbox) const =0 |
virtual bool | getBoundingBox (const GU_Detail &gd, UT_BoundingBox &bbox, const UT_Matrix4R &transform) const =0 |
virtual bool | getBoundingBoxUV (const GU_Detail &gd, UT_BoundingBox &bbox, const char *name, int isvertex) const =0 |
bool | save (UT_JSONWriter &w) const |
Save/load the contents of the selection. More... | |
bool | load (UT_JSONParser &p, bool restore_id_and_rev=true) |
void | dump (std::ostream &os) const |
virtual GA_GroupType | classType () const =0 |
virtual GU_Selection * | clone ()=0 |
bool | generateSelectionString (UT_String &sel_string, const GU_Detail &gdp, bool ordered, bool collapse_where_possible, bool use_ast_to_select_all, bool force_numeric, GA_Index prim_offset=0, GA_Index point_offset=0) const |
bool | generateElementString (UT_String &sel_string, const GU_Detail &gdp, exint element_index, GA_Index prim_offset=0, GA_Index point_offset=0) const |
virtual void | setUsePrimEdges (bool) |
virtual bool | getUsePrimEdges () const |
void | setPickPath (const UT_StringHolder &p) |
UT_StringHolder | pickPath () const |
void | setPickOrder (int pick_order) |
int | pickOrder () const |
void | resetPickOrder () |
int | getId () const |
Selection id and revision. More... | |
int | getRevision () const |
virtual int64 | getMemoryUsage (bool inclusive) const |
Return an approximation of how much memory we use. More... | |
Static Public Member Functions | |
static GU_SelectionHandle | newSelection (GU_SelectionType stype) |
static GU_SelectionHandle | newSelection (GA_GroupType type) |
static GU_SelectionHandle | newSelection (const GU_Detail &dst_gdp, const GU_Detail &src_gdp, const GU_Selection &src_sel) |
static GU_SelectionHandle | newCookSelection (GU_Detail &gdp, GA_GroupType type, bool ordered) |
static GU_SelectionHandle | newCookSelection (GU_Detail &gdp, GA_Group &group) |
Protected Member Functions | |
virtual bool | validate (const GU_Detail &gd)=0 |
GU_Selection (const GU_Selection &s) | |
virtual bool | uvSelectAllByWindingUsingClosure (const GU_Detail &gd, bool front_facing, bool back_facing, const UT_StringHolder &uvattribname) |
virtual bool | modifyMatchingGroup (const GU_Detail &gd, const GA_Group &group, GU_SelectionRule rule)=0 |
void | updateRevision () |
void | forceSpecificRevision (int revision) |
GU_Selection () | |
template<typename T > | |
T & | getGroup (const GU_Detail &gd, bool &needs_update) const |
UT_Lock & | updateLock () const |
virtual bool | saveElements (UT_JSONWriter &w) const =0 |
virtual bool | loadElements (UT_JSONParser &p)=0 |
Static Protected Member Functions | |
static void | setOrdered (GA_ElementGroup &g, bool ordered) |
Convenience method to make/clear ordered status of a group. More... | |
static const GA_PrimitiveGroup * | hiddenPrimitives (const GU_Detail &gd) |
static GU_Selection * | allocSelection (GA_GroupType type) |
Definition at line 139 of file GU_Selection.h.
|
virtual |
|
protected |
|
protected |
|
staticprotected |
|
inline |
Definition at line 289 of file GU_Selection.h.
|
inlinevirtual |
Definition at line 282 of file GU_Selection.h.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
virtual |
Reimplemented in GU_VertexSelection.
|
virtual |
Reimplemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
void GU_Selection::dump | ( | std::ostream & | os | ) | const |
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
Definition at line 474 of file GU_Selection.h.
bool GU_Selection::generateElementString | ( | UT_String & | sel_string, |
const GU_Detail & | gdp, | ||
exint | element_index, | ||
GA_Index | prim_offset = 0 , |
||
GA_Index | point_offset = 0 |
||
) | const |
bool GU_Selection::generateSelectionString | ( | UT_String & | sel_string, |
const GU_Detail & | gdp, | ||
bool | ordered, | ||
bool | collapse_where_possible, | ||
bool | use_ast_to_select_all, | ||
bool | force_numeric, | ||
GA_Index | prim_offset = 0 , |
||
GA_Index | point_offset = 0 |
||
) | const |
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
inlineprotected |
Definition at line 493 of file GU_Selection.h.
bool GU_Selection::getGroupTokenString | ( | UT_WorkBuffer & | buf | ) | const |
|
inline |
Definition at line 247 of file GU_Selection.h.
|
inline |
Selection id and revision.
Definition at line 420 of file GU_Selection.h.
|
inlinevirtual |
Return an approximation of how much memory we use.
Reimplemented in GU_VertexSelection.
Definition at line 424 of file GU_Selection.h.
|
inline |
Definition at line 421 of file GU_Selection.h.
|
inlinevirtual |
Definition at line 410 of file GU_Selection.h.
const GA_Group* GU_Selection::group | ( | const GU_Detail & | gd, |
GA_GroupType | type | ||
) |
Returns a group for this selection, of the given group type. If the selection is not of that type, then the selection will return a best-case conversion of the selection from the original type.
|
pure virtual |
Implemented in GU_VertexSelection.
|
inlinevirtual |
Definition at line 334 of file GU_Selection.h.
Definition at line 330 of file GU_Selection.h.
|
inlinevirtual |
These functions provide a fast path to check for existence. They only work for the selection type their name indicates they should work for. No translation is done for other types and those will return false
.
Definition at line 327 of file GU_Selection.h.
|
inlinevirtual |
Definition at line 332 of file GU_Selection.h.
|
inlinevirtual |
Definition at line 328 of file GU_Selection.h.
|
inlinevirtual |
Reimplemented in GU_VertexSelection.
Definition at line 329 of file GU_Selection.h.
|
staticprotected |
void GU_Selection::initGroupString | ( | const GU_Detail & | gd, |
const GA_Group & | group, | ||
const char * | group_string | ||
) |
bool GU_Selection::load | ( | UT_JSONParser & | p, |
bool | restore_id_and_rev = true |
||
) |
|
protectedpure virtual |
Save/load class specific data elements.
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
Call this method once mass-modifications are finished with the above.
|
pure virtual |
Implemented in GU_VertexSelection.
bool GU_Selection::modifyGroup | ( | const GU_Detail & | gd, |
const GA_Group & | group, | ||
GU_SelectionRule | rule | ||
) |
void GU_Selection::modifyGroupToken | ( | const char * | token, |
GU_SelectionRule | rule | ||
) |
|
protectedpure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
static |
|
static |
|
static |
|
static |
|
static |
|
inline |
Definition at line 416 of file GU_Selection.h.
|
inline |
Definition at line 413 of file GU_Selection.h.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
inline |
Definition at line 417 of file GU_Selection.h.
bool GU_Selection::save | ( | UT_JSONWriter & | w | ) | const |
Save/load the contents of the selection.
|
protectedpure virtual |
Save/load class specific data elements.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
This method is used to select the boundary. Not valid for all selection types.
Implemented in GU_VertexSelection.
|
inlinevirtual |
Reimplemented in GU_VertexSelection.
Definition at line 194 of file GU_Selection.h.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
void GU_Selection::setGroupTokensLock | ( | bool | lock | ) |
|
inlinestaticprotected |
Convenience method to make/clear ordered status of a group.
Definition at line 441 of file GU_Selection.h.
Definition at line 415 of file GU_Selection.h.
|
inline |
Definition at line 412 of file GU_Selection.h.
|
inlinevirtual |
Definition at line 409 of file GU_Selection.h.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.
|
inlineprotected |
Definition at line 500 of file GU_Selection.h.
|
inlineprotected |
Definition at line 463 of file GU_Selection.h.
|
inline |
Definition at line 314 of file GU_Selection.h.
|
protectedvirtual |
|
inline |
Definition at line 312 of file GU_Selection.h.
|
protectedpure virtual |
Validate the current selection against the given detail. This will prune out any selection components that are invalid against the detail given. Call this prior to, or after, a mass modification via calls to modify*(). Those calls do not do any verification of the current selection, for performance reasons. Returns true
if the selection was already valid and no entries were eliminated.
Implemented in GU_VertexSelection.
|
pure virtual |
Implemented in GU_VertexSelection.