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

#include <GU_VertexSelection.h>

+ Inheritance diagram for GU_VertexSelection:

Public Member Functions

 GU_VertexSelection (const GA_VertexGroup *vtx_group=NULL)
 
 ~GU_VertexSelection () override
 
bool select (const GU_Detail &gd, uint prim_id, uint v_num, uint, GU_SelectionRule rule, GU_SelectResult &added, GU_SelectFinishData *&finish_data) override
 
bool selectFinish (const GU_Detail &gd, GU_SelectionRule rule, GU_SelectResult &added, GU_SelectFinishData *finish_data) override
 
bool testSelect (const GU_Detail &gd, uint prim_id, uint v_num, uint, bool accept_existing, bool accept_new, GU_SelectResult &result) const override
 
bool selectionPoint (const GU_SelectResult &added, UT_Vector3 &xsect) const override
 
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 override
 
void assign (const GU_Detail &gd, const GU_Selection &sel) override
 
bool selectAll (const GU_Detail &gd) override
 
bool toggleAll (const GU_Detail &gd) override
 
bool validate (const GU_Detail &gd) override
 
bool selectBoundary (const GU_Detail &gd, bool checkuv, const UT_StringHolder &uvattribname) override
 
bool growSelection (const GU_Detail &gd, bool checkuv, const UT_StringHolder &uvattribname) override
 
bool shrinkSelection (const GU_Detail &gd, bool checkuv, const UT_StringHolder &uvattribname) override
 
bool filterByPrimitiveMask (const GU_Detail &gd, const GA_PrimitiveTypeMask &mask) override
 
bool modifyPoint (const GU_Detail &gd, GA_Offset ptoff, GU_ModifyType type) override
 
bool modifyVertex (const GU_Detail &gd, GA_Offset vtxoff, GU_ModifyType type) override
 
bool modifyPrimitive (const GU_Detail &gd, GA_Offset primoff, GU_ModifyType type) override
 
bool modifyEdge (const GU_Detail &gd, const GA_Edge &edge, const GEO_Primitive *prim, GU_ModifyType type) override
 
bool modifyBreakpoint (const GU_Detail &gd, const GA_Breakpoint &bkp, GU_ModifyType type) override
 
const GA_PointGroup * points (const GU_Detail &gd) const override
 
const GA_PrimitiveGroup * primitives (const GU_Detail &gd) const override
 
const GA_VertexGroup * vertices (const GU_Detail &gd) const override
 
const GA_EdgeGroup * edges (const GU_Detail &gd) const override
 
const GA_BreakpointGroup * breakpoints (const GU_Detail &gd) const override
 
const GA_Group * mainGroup (const GU_Detail &gd) const override
 
bool hasVertexIndex (GA_Index index) const override
 
void clear () override
 
void clearAndDestroy () override
 
GA_Size entries () const override
 
bool getBoundingBox (const GU_Detail &gd, UT_BoundingBox &bbox) const override
 
bool getBoundingBox (const GU_Detail &gd, UT_BoundingBox &bbox, const UT_Matrix4R &transform) const override
 
bool getBoundingBoxUV (const GU_Detail &gd, UT_BoundingBox &bbox, const char *name, int isvertex) const override
 
GA_GroupType classType () const override
 
GU_Selection * clone () override
 
bool modifyMatchingGroup (const GU_Detail &gd, const GA_Group &group, GU_SelectionRule rule) override
 
int64 getMemoryUsage (bool inclusive) const override
 Return an approximation of how much memory we use. More...
 
- Public Member Functions inherited from GU_Selection
virtual ~GU_Selection ()
 
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)
 
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 ()
 
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 bool hasPointIndex (GA_Index index) const
 
virtual bool hasPrimitiveIndex (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
 
const GA_Group * group (const GU_Detail &gd, GA_GroupType type)
 
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
 
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
 

Friends

struct VertexLoader
 

Additional Inherited Members

- Static Public Member Functions inherited from GU_Selection
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 inherited from GU_Selection
 GU_Selection (const GU_Selection &s)
 
virtual bool uvSelectAllByWindingUsingClosure (const GU_Detail &gd, bool front_facing, bool back_facing, const UT_StringHolder &uvattribname)
 
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
 
- Static Protected Member Functions inherited from GU_Selection
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)
 

Detailed Description

Definition at line 20 of file GU_VertexSelection.h.

Constructor & Destructor Documentation

GU_VertexSelection::GU_VertexSelection ( const GA_VertexGroup *  vtx_group = NULL)
GU_VertexSelection::~GU_VertexSelection ( )
override

Member Function Documentation

void GU_VertexSelection::assign ( const GU_Detail &  gd,
const GU_Selection &  sel 
)
overridevirtual

Implements GU_Selection.

const GA_BreakpointGroup* GU_VertexSelection::breakpoints ( const GU_Detail &  gd) const
overridevirtual

Implements GU_Selection.

GA_GroupType GU_VertexSelection::classType ( ) const
overridevirtual

Implements GU_Selection.

void GU_VertexSelection::clear ( )
overridevirtual

Reimplemented from GU_Selection.

void GU_VertexSelection::clearAndDestroy ( )
overridevirtual

Reimplemented from GU_Selection.

GU_Selection* GU_VertexSelection::clone ( )
overridevirtual

Implements GU_Selection.

const GA_EdgeGroup* GU_VertexSelection::edges ( const GU_Detail &  gd) const
overridevirtual

Implements GU_Selection.

GA_Size GU_VertexSelection::entries ( ) const
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::filterByPrimitiveMask ( const GU_Detail &  gd,
const GA_PrimitiveTypeMask &  mask 
)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::getBoundingBox ( const GU_Detail &  gd,
UT_BoundingBox &  bbox 
) const
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::getBoundingBox ( const GU_Detail &  gd,
UT_BoundingBox &  bbox,
const UT_Matrix4R &  transform 
) const
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::getBoundingBoxUV ( const GU_Detail &  gd,
UT_BoundingBox &  bbox,
const char *  name,
int  isvertex 
) const
overridevirtual

Implements GU_Selection.

int64 GU_VertexSelection::getMemoryUsage ( bool  inclusive) const
inlineoverridevirtual

Return an approximation of how much memory we use.

Reimplemented from GU_Selection.

Definition at line 134 of file GU_VertexSelection.h.

bool GU_VertexSelection::growSelection ( const GU_Detail &  gd,
bool  checkuv,
const UT_StringHolder &  uvattribname 
)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::hasVertexIndex ( GA_Index  index) const
overridevirtual

Reimplemented from GU_Selection.

const GA_Group* GU_VertexSelection::mainGroup ( const GU_Detail &  gd) const
inlineoverridevirtual

Implements GU_Selection.

Definition at line 101 of file GU_VertexSelection.h.

bool GU_VertexSelection::modifyBreakpoint ( const GU_Detail &  gd,
const GA_Breakpoint &  bkp,
GU_ModifyType  type 
)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::modifyEdge ( const GU_Detail &  gd,
const GA_Edge &  edge,
const GEO_Primitive *  prim,
GU_ModifyType  type 
)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::modifyMatchingGroup ( const GU_Detail &  gd,
const GA_Group &  group,
GU_SelectionRule  rule 
)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::modifyPoint ( const GU_Detail &  gd,
GA_Offset  ptoff,
GU_ModifyType  type 
)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::modifyPrimitive ( const GU_Detail &  gd,
GA_Offset  primoff,
GU_ModifyType  type 
)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::modifyVertex ( const GU_Detail &  gd,
GA_Offset  vtxoff,
GU_ModifyType  type 
)
overridevirtual

Implements GU_Selection.

const GA_PointGroup* GU_VertexSelection::points ( const GU_Detail &  gd) const
overridevirtual

Implements GU_Selection.

const GA_PrimitiveGroup* GU_VertexSelection::primitives ( const GU_Detail &  gd) const
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::select ( const GU_Detail &  gd,
uint  prim_id,
uint  v_num,
uint  ,
GU_SelectionRule  rule,
GU_SelectResult &  added,
GU_SelectFinishData *&  finish_data 
)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::selectAll ( const GU_Detail &  gd)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::selectBoundary ( const GU_Detail &  gd,
bool  checkuv,
const UT_StringHolder &  uvattribname 
)
overridevirtual

This method is used to select the boundary. Not valid for all selection types.

Implements GU_Selection.

bool GU_VertexSelection::selectFinish ( const GU_Detail &  gd,
GU_SelectionRule  rule,
GU_SelectResult &  added,
GU_SelectFinishData *  finish_data 
)
overridevirtual

Reimplemented from GU_Selection.

bool GU_VertexSelection::selectionPoint ( const GU_SelectResult &  added,
UT_Vector3 &  xsect 
) const
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::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
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::shrinkSelection ( const GU_Detail &  gd,
bool  checkuv,
const UT_StringHolder &  uvattribname 
)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::testSelect ( const GU_Detail &  gd,
uint  prim_id,
uint  v_num,
uint  ,
bool  accept_existing,
bool  accept_new,
GU_SelectResult &  result 
) const
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::toggleAll ( const GU_Detail &  gd)
overridevirtual

Implements GU_Selection.

bool GU_VertexSelection::validate ( const GU_Detail &  gd)
overridevirtual

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.

Implements GU_Selection.

const GA_VertexGroup* GU_VertexSelection::vertices ( const GU_Detail &  gd) const
overridevirtual

Implements GU_Selection.

Friends And Related Function Documentation

friend struct VertexLoader
friend

Definition at line 148 of file GU_VertexSelection.h.


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