CIndexSet Class Reference
 
 
 
CIndexSet Class Reference

#include <xsi_indexset.h>


Class 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

List of all members.

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

Constructor & Destructor Documentation

SICPPSDK_INLINE CIndexSet ( const ICENodeContext in_ctxt )

Constructor.

Parameters:
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.

Note:
The CIndexSet created can not be used to set the output port data array and is only valid when the underlying custom ICENode is set with the siICENodeSingleThreading or siICENodeMultiEvaluationPhase mode. The object created is read-only, indices cannot be removed with CIndexSet::Iterator::Remove.
Parameters:
in_ctxt ICENode evaluation context.
in_nInputPortID Input port identifier.
in_nInstanceIndex The group instance of the port.
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.
SICPPSDK_INLINE ULONG GetFilteredCount ( ) const

Returns the filtered size of the index set.


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