CICEAttributeDataArray2DCustomType Class Reference
 
 
 
CICEAttributeDataArray2DCustomType Class Reference

#include <xsi_iceattributedataarray2D.h>


Class Description

This class is a specialization of CICEAttributeDataArray to give access to the ICEAttribute data as a 2D array of type siICENodeDataCustomType. CICEAttributeDataArray2DCustomType objects are read-only and can be filled with the methods supplied with the ICEAttribute class.

Note:
Data of type siICENodeDataCustomType can be created with custom ICENodes.
See also:
ICEAttribute::GetDataArray2D, ICEAttribute::GetDataArray2DChunk, CICEAttributeDataArrayCustomType, Type Definitions for CICEAttributeDataArray
Since:
Supernova
Example:
This example demonstrates how to iterate over the siICENodeDataCustomType 2D attributes on a geometry. Check out the SDK InspectICEAttributes sample for a more detailed example.
                using namespace XSI;

                Application app;
                X3DObject x3dObj = app.GetSelection().GetItem(0);
                ICEAttribute attr = x3dObj.GetActivePrimitive().GetGeometry().GetICEAttributeFromName( L"SomeCustomDataType2DAttribute" );

                // Log the data pointer address and size of data.
                CICEAttributeDataArray2DCustomType customData2D;

                attr.GetDataArray2D( customData2D );

                for( ULONG i=0; i<customData2D.GetCount( ); i++ )
                {
                        CICEAttributeDataArrayCustomType customData;
                        customData2D.GetSubArray( i, customData );
                        for( ULONG j=0; j<customData.GetCount( ); j++ )
                        {
                                ULONG nSize;
                                const CICEAttributeDataArrayCustomType::TData* pBuffer;
                                customData.GetData( j, &pBuffer, nSize );

                                app.LogMessage( CString( (void*)pBuffer ) + L":" + CString( nSize ) );
                        }
                }
Inheritance diagram for CICEAttributeDataArray2DCustomType:
CBaseICEAttributeDataArray

List of all members.

Public Member Functions

  CICEAttributeDataArray2DCustomType ()
  ~CICEAttributeDataArray2DCustomType ()
CStatus  GetSubArray (ULONG in_index, CBaseICEAttributeDataArray &out_dataArray) const
CStatus  SetSubArray (ULONG in_index, const unsigned char **in_ppData, ULONG in_count, ULONG *in_pElemSizes)
CStatus  SetSubArray (ULONG in_index, const unsigned char **in_ppData, ULONG in_count, ULONG in_fixedElemSize)

Constructor & Destructor Documentation

Constructor.

Destructor.


Member Function Documentation

CStatus GetSubArray ( ULONG  in_index,
CBaseICEAttributeDataArray out_dataArray 
) const [inline]

Returns the sub-array containing the custom type data at a given index.

Parameters:
in_index Index in the array. The index must be smaller than the number of elements in the array, otherwise the results are unpredictable.
out_dataArray A read-only reference to a CICEAttributeDataArrayCustomType object at a specific index.
Returns:
CStatus::OK Success
CStatus::InvalidArgument If in_index or out_dataArray is invalid.
CStatus SetSubArray ( ULONG  in_index,
const unsigned char **  in_ppData,
ULONG  in_count,
ULONG *  in_pElemSizes 
)

Set the sub-array at a given index This is only supported for writable attributes and not available for built-in attributes.

Parameters:
in_index Index in the array. The index must be smaller than the number of elements in the array, otherwise the result is unpredictable. If this DataArray2D is an array chunk, in_index is relative to the chunk offset.
in_ppData Array containing the input custom-typed data
in_count Number of elements
in_pElemSizes Array specifying the element sizes
Returns:
CStatus::OK Success
CStatus::InvalidArgument If in_index, in_ppData, in_count or in_pElemSizes is invalid.
Since:
v12.0 (2014)
CStatus SetSubArray ( ULONG  in_index,
const unsigned char **  in_ppData,
ULONG  in_count,
ULONG  in_fixedElemSize 
)

Set the sub-array at a given index This is only supported for writable attributes and not available for built-in attributes.

Parameters:
in_index Index in the array. The index must be smaller than the number of elements in the array, otherwise the result is unpredictable. If this DataArray2D is an array chunk, in_index is relative to the chunk offset.
in_ppData array containing the input custom type data
in_count number of elements to be set
in_fixedElemSize the fixed size of all elements
Returns:
CStatus::OK Success
CStatus::InvalidArgument If in_index, in_ppData, in_count or in_fixedElemSize is invalid.
Since:
12.0 (2014)

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