int createUserIndexForHalfEdges ( ) { if ( m_edgeIndices == null ) m_edgeIndices = new ArrayList < AttributeStreamOfInt32 > ( 3 ) ; AttributeStreamOfInt32 new_stream = new AttributeStreamOfInt32 ( m_halfEdgeData . capacity ( ) , - 1 ) ; for ( int i = 0 , n = m_edgeIndices . size ( ) ; i < n ; i ++ ) { if ( m_edgeIndices . get ( i ) == null ) { m_edgeIndices . set ( i , new_stream ) ; return i ; } } m_edgeIndices . add ( new_stream ) ; return m_edgeIndices . size ( ) - 1 ; }
create a new user index for half edges . The index values are set to - 1 .