CIndexSet encapsulates an index set for indexing CDataArray object types for the current evaluation.
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; }
#include <xsi_indexset.h>
Classes | |
class | Iterator |
A class for iterating over CDataArray objects during an evaluation. Iterator objects must always be created with CIndexSet::Begin(). More... | |
Public Member Functions | |
SICPPSDK_INLINE | CIndexSet (const ICENodeContext &in_ctxt) |
SICPPSDK_INLINE | CIndexSet (const ICENodeContext &in_ctxt, ULONG in_nInputPortID, ULONG in_nInstanceIndex=0) |
SICPPSDK_INLINE | ~CIndexSet () |
SICPPSDK_INLINE Iterator | Begin () |
SICPPSDK_INLINE ULONG | GetFilteredCount () const |
SICPPSDK_INLINE CIndexSet | ( | const ICENodeContext & | in_ctxt | ) |
Constructor.
in_ctxt | ICENode evaluation context. |
SICPPSDK_INLINE CIndexSet | ( | const ICENodeContext & | in_ctxt, |
ULONG | in_nInputPortID, | ||
ULONG | in_nInstanceIndex = 0 |
||
) |
Constructor. Creates the index set for a specific port.
in_ctxt | ICENode evaluation context. |
in_nInputPortID | Input port identifier. |
in_nInstanceIndex | The group instance of the port. |
SICPPSDK_INLINE ~CIndexSet | ( | ) |
Destructor.
SICPPSDK_INLINE CIndexSet::Iterator Begin | ( | ) |
SICPPSDK_INLINE ULONG GetFilteredCount | ( | ) | const |
Returns the filtered size of the index set.