CIndexSet Class Reference

CIndexSet encapsulates an index set for indexing CDataArray object types for the current evaluation. More...

#include <xsi_indexset.h>

List of all members.

Public Member Functions

SICPPSDK_INLINE  CIndexSet (const ICENodeContext &in_ctxt)
SICPPSDK_INLINE  ~CIndexSet ()
SICPPSDK_INLINE Iterator  Begin ()

Classes

class   Iterator
  A class for iterating over CDataArray objects during an evaluation. Iterator objects must always be created with CIndexSet::Begin(). More...


Detailed Description

CIndexSet encapsulates an index set for indexing CDataArray object types for the current evaluation.

Example:
    XSIPLUGINCALLBACK CStatus YPosFilter_Evaluate( ICENodeContext& in_ctxt )
    {
        // The current output port being evaluated...
        ULONG out_portID = in_ctxt.GetEvaluatedOutputPortID( );

        switch( out_portID )
        {
            case OutPort200:
            {
                CDataArrayVector3f inputData( ctxt, InPort0 );
                CDataArrayVector3f outData( ctxt );

                // We need a CIndexSet to iterate over the data
                CIndexSet indexSet( in_ctxt );

                for(CIndexSet::Iterator it = indexSet.Begin(); it.HasNext(); )
                {
                    outData[ it ] = inputData[ it ];

                    if ( inputData[it].GetY() < 0.0 )
                    {
                        it.Remove( );
                    }
                    else
                    {
                        it.Next( );
                    }
                }
            }
            break;
        };

        return CStatus::OK;
    }
Since:
7.0
See also:
CIndexSet::Iterator, CDataArray, CDataArray2D


Constructor & Destructor Documentation

SICPPSDK_INLINE CIndexSet ( const ICENodeContext in_ctxt  ) 

Constructor.

Parameters:
in_ctxt  ICENode evaluation context.

SICPPSDK_INLINE ~CIndexSet (  ) 

Destructor.


Member Function Documentation

SICPPSDK_INLINE CIndexSet::Iterator Begin (  ) 

Returns an Iterator object pointing to the first index element.

Returns:
An Iterator object.


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