Open Search
    EdgeBaseSelect Class Reference

    #include <c4d_baseselect.h>

    Inheritance diagram for EdgeBaseSelect:

    Private Member Functions

     EdgeBaseSelect ()
     
     ~EdgeBaseSelect ()
     

    Alloc/Free

    static EdgeBaseSelectAlloc ()
     
    static void Free (EdgeBaseSelect *&bs)
     
    Bool FromArrayCompact (const UChar *selection, Int32 count)
     
    UCharToArrayCompact (Int32 count) const
     

    Additional Inherited Members

    - Public Member Functions inherited from BaseSelect
    Int32 GetCount (void) const
     
    Int32 GetSegments (void) const
     
    Bool Select (Int32 num)
     
    Bool SelectAll (Int32 min, Int32 max, Bool deselectAll=true)
     
    Bool Deselect (Int32 num)
     
    Bool DeselectAll (void)
     
    Bool Toggle (Int32 num)
     
    Bool ToggleAll (Int32 min, Int32 max)
     
    Bool GetRange (Int32 seg, Int32 maxElements, Int32 *a, Int32 *b) const
     
    Bool IsSelected (Int32 num) const
     
    Bool CopyTo (BaseSelect *dest, Bool alwaysDirty=true) const
     
    BaseSelectGetClone (void) const
     
    Bool Merge (const BaseSelect *src)
     
    Bool Deselect (const BaseSelect *src)
     
    Bool Cross (const BaseSelect *src)
     
    Bool FromArray (UChar *selection, Int32 count)
     
    UCharToArray (Int32 count) const
     
    Bool ToBitSet (Int32 count, maxon::BaseBitSet< maxon::DefaultAllocator > &bitSet) const
     
    Bool Read (HyperFile *hf)
     
    void Write (HyperFile *hf)
     
    Bool FindSegment (Int32 num, Int32 *segment) const
     
    Int32 GetDirty () const
     
    Int32 GetLastElement (void) const
     
    Bool IsAllSelected (Int32 num) const
     
    Bool IsNothingSelected () const
     
    Bool IsEqual (const BaseSelect &other) const
     
    BaseSelectDataGetData ()
     
    Bool CopyFrom (BaseSelectData *ndata, Int32 ncnt)
     
    - Static Public Member Functions inherited from BaseSelect
    static BaseSelectAlloc (void)
     
    static void Free (BaseSelect *&bs)
     

    Constructor & Destructor Documentation

    ◆ EdgeBaseSelect()

    EdgeBaseSelect ( )
    private

    ◆ ~EdgeBaseSelect()

    ~EdgeBaseSelect ( )
    private

    Member Function Documentation

    ◆ Alloc()

    static EdgeBaseSelect* Alloc ( )
    static

    Allocates a edge base selection. Destroy the allocated edge base selection with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.

    Returns
    The allocated edge base selection, or nullptr if the allocation failed.

    ◆ Free()

    static void Free ( EdgeBaseSelect *&  bs)
    static

    Destructs edge base selections allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.

    Parameters
    [in,out]bsThe edge base selection to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

    ◆ FromArrayCompact()

    Bool FromArrayCompact ( const UChar selection,
    Int32  count 
    )

    Gets a number of selected elements from an array. There is one byte per polygon in the array. The bits 0 to 3 of each byte define which edge of the polygon is selected.

    Warning
    The old selection will completely be overridden.
    Parameters
    [in]selectionAn array of elements to select. The caller owns the pointed array.
    [in]countThe number of elements in the array. This is usually the polygon count.
    Returns
    true if the elements from the array were selected successfully, otherwise false.

    ◆ ToArrayCompact()

    UChar* ToArrayCompact ( Int32  count) const

    Gets an array of selected elements. There is one byte per polygon in the array. The bits 0 to 3 of each byte define which edge of the polygon is selected.

    Warning
    The array is created with NewMemClear() and must be freed with DeleteMem() afterward.
    Parameters
    [in]countThe number of elements to place into the array. This is usually the polygon count.
    Returns
    The array containing the selected elements or nullptr if failed. The caller owns the pointed array.