Softimage SDK Programmer's Guide > Customizing Softimage using the SDK > Custom ICENodes > Custom ICENode Processing >

# Port Data Access

To access the input port data from the Evaluate function, the SDK provides a set of classes that match the type of input and output ports defined during the ICENode registration.

The following classes are provided for accessing complex data types:

XSI::MATH::CVector2f -> siICENodeDataVector2

XSI::MATH::CVector3f -> siICENodeDataVector3

XSI::MATH::CVector4f -> siICENodeDataVector4

XSI::MATH::CQuaternionf -> siICENodeDataQuaternion

XSI::MATH::CMatrix3f -> siICENodeDataMatrix33

XSI::MATH::CMatrix4f -> siICENodeDataMatrix44

XSI::MATH::CColor4f -> siICENodeDataColor4

XSI::MATH::CRotationf -> siICENodeDataRotation

XSI::MATH::CShape -> siICENodeDataShape

CICEGeometry -> siICENodeDataGeometry

Note

CICEGeometry can be accessed from the BeginEvaluate callback but can also be used in all custom evaluation callbacks. However, it cannot be used from the Evaluate callback in multi-thread mode with a non-singleton context. Calls to CICEGeometry methods just return default values in this context.

The input data buffers sent to custom ICENodes are either stored in a 1D- or 2D-array depending of the port structure type set during the ICENode registration. The CDataArray and CDataArray2D template classes can be combined with one of the above classes for handling theses arrays. For instance, if a port type is defined as siICENodeDataVector3 + siICENodePortStructureSingle then CDataArray<CVector3f> must be used to access the data. If a port is defined as siICENodeDataRotation + siICENodePortStructureArray, then CDataArray2D<CRotationf> must be used, etc. For simple port data types such as float and bool, simply use the type as the template parameter (for example, CDataArray< float > or CDataArray2D< bool >). The input data is considered read-only and cannot be changed, nor can items be removed with these template classes.

Important

Using the wrong template class to access a given port data will result in unexpected behavior.

For convenience, a number of array types have been defined for each port data type (CDataArrayLong, CDataArrayBool, CDataArrayShape, CDataArray2DVector2f etc.)