User Tools

Site Tools


DzIndexList

Represents a sorted list of indices - such as a group of vertices, or faces.

More...

Inherits :

Inherited By : DzFaceGroup, DzScriptIndexList, DzSelectionGroup and DzVertexGroup

Methods

DAZ Script
voidaddIndex ( Number idx )
voidaddIndices ( DzIndexList list )
voidaddSortedIndex ( Number idx )
voidclear ()
Numbercount ()
NumberfindIndex ( Number idx )
NumbergetIndex ( Number i )
NumbergetMaxIndex ()
NumberinsertIndex ( Number idx )
NumberinsertSortedIndex ( Number idx )
voidpreSizeArray ( Number count )
BooleanremoveComponent ( Number idx )
BooleanremoveIndex ( Number idx )
BooleanremoveIndexes ( DzIndexList toRemove )
ArraytoList ()
StringtoString ()

Detailed Description

TODO: Add detailed description.

Methods


void : addIndex( Number idx )

Adds an index to the list.

Parameter(s):

  • idx - The index to append to the list.

void : addIndices( DzIndexList list )

Adds a list of indices to this index list.

Parameter(s):

  • list - The list of indices to add.

Since:

  • 4.11.0.61

void : addSortedIndex( Number idx )

Adds an index to the list. This method is faster in the case where it is likely the add index is at the end of the current list.

Parameter(s):

  • idx - The index to append to the list.

void : clear()

Removes all indices from the list and sets its count to zero.


Number : count()

Return Value:

  • The number of indices in the list.

Number : findIndex( Number idx )

Finds an index in the list.

Parameter(s):

  • idx - The index to find in the list.

Return Value:

  • The index (in the list) for the requested index. Returns -1 if the index is not found.

Number : getIndex( Number i )

Parameter(s):

  • i - The position of the index to return.

Return Value:

  • The index at the given position in the list.

Number : getMaxIndex()

Return Value:

  • If the list is not empty, the highest index in the list, otherwise -1.

Number : insertIndex( Number idx )

Adds an index to the list.

Parameter(s):

  • idx - The index to append to the list.

Return Value:

  • The position in the list that the index actually exists.

Since:

  • 4.11.0.61

Number : insertSortedIndex( Number idx )

Adds an index to the list. This method is faster in the case where it is likely the add index is at the end of the current list.

Parameter(s):

  • idx - The index to append to the list.

Return Value:

  • The position in the list that the index actually exists.

Since:

  • 4.11.0.61

void : preSizeArray( Number count )

Presizes the list.

Parameter(s):

  • count - The number of items to allocate room for in the size of the list.

Since:

  • 4.11.0.61

Boolean : removeComponent( Number idx )

This function is typically called when a component (e.g. vertex or face) has been removed from the list that the indices in this list reference. This function removes the given index from the list if it is found, and decrements all indices in the list greater than the given index in order to 'clean-up' the list of indices.

Parameter(s):

  • idx - The index of the item that needs to be removed.

Return Value:

  • true on sucess, otherwise false.

Boolean : removeIndex( Number idx )

Removes the given index from the list.

Parameter(s):

  • idx - The index to remove from the list.

Boolean : removeIndexes( DzIndexList toRemove )

Removes all indices in the toRemove list from this list.

Parameter(s):

  • toRemove - The list of indices to remove.

Return Value:

  • true on sucess.

Array : toList()

Return Value:

  • A list of the indices.

Since:

  • 4.11.0.61

String : toString()

Return Value:

  • The string representation of the object.

Since:

  • 4.11.0.61