#include <xsi_iceattributedataarray.h>
Public Member Functions |
|
| CICEAttributeDataArray () | |
| ~CICEAttributeDataArray () | |
| const T & | operator[] (ULONG in_index) const |
| ULONG | GetCount () const |
| bool | IsConstant () const |
using namespace XSI; CValue CreatePrim( const CString& in_presetobj, const CString& in_geometrytype, const CString& in_name, const CString& in_parent ); X3DObject grid = CreatePrim( L"Grid", L"MeshSurface", L"", L""); ICEAttribute attr = grid.GetActivePrimitive().GetGeometry().GetICEAttributeFromName( L"PointPosition" ); CICEAttributeDataArrayVector3f points; attr.GetDataArray( points ); Application xsi; for( ULONG i=0; i<points.GetCount( ); i++ ) { xsi.LogMessage( CString( points[ i ] ) ); } // Helper CValue CreatePrim( const CString& in_presetobj, const CString& in_geometrytype, const CString& in_name, const CString& in_parent ) { CValueArray args(4); CValue retval; args[0]= in_presetobj; args[1]= in_geometrytype; args[2]= in_name; args[3]= in_parent; Application app; app.ExecuteCommand( L"CreatePrim", args, retval ); return retval; }
| CICEAttributeDataArray | ( | ) | [inline] |
Constructor.
| ~CICEAttributeDataArray | ( | ) | [inline] |
Destructor.
| const T& operator[] | ( | ULONG | in_index | ) | const [inline] |
Accessor to the encapsulated array. This operator is called when reading the data so the return value is read-only.
| in_index | Index in the array. The index must be smaller than the number of elements in the array, otherwise the results are unpredictable. If the array is constant, the function always return the first item's value. |
| ULONG GetCount | ( | void | ) | const [inline] |
Accessor to the number of elements in the array.
| bool IsConstant | ( | ) | const [inline] |
Returns true if the array is constant in which case the array values are the same.