Array of Sample objects that represent the samples in the Geometry.
using namespace XSI; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube ); CSampleRefArray samples( myCube.GetActivePrimitive().GetGeometry().GetSamples() ); CLongArray indexArray = samples.GetIndexArray(); for (LONG i=0; i< indexArray.GetCount(); ++i ) { app.LogMessage( L"Sample.Index " + CValue(indexArray[i]).GetAsText() ); }
#include <xsi_sample.h>
Public Member Functions | |
CSampleRefArray (const CSampleRefArray &in_array) | |
CRef | GetItem (LONG in_index) const |
CRef | GetItem (const CString &in_name) const |
LONG | GetCount () const |
bool | IsValid () const |
CLongArray | GetIndexArray () const |
SubComponent | GetSubComponent () const |
CSampleRefArray | Navigate (siNavigateComponentType in_siNavigate) const |
CSampleRefArray | ( | const CSampleRefArray & | in_array | ) |
Copy constructor.
in_array | constant CSampleRefArray reference object. |
CRef GetItem | ( | LONG | in_index | ) | const [virtual] |
Returns a reference to the Sample object at the specified index in the array.
in_index | The index of the Sample. |
Reimplemented from CRefArray.
Reimplemented in CNurbsSampleRefArray, and CPolygonNodeRefArray.
Returns a reference to the Sample object specified by name.
in_name | The name of the Sample to get. |
Reimplemented from CRefArray.
Reimplemented in CNurbsSampleRefArray, and CPolygonNodeRefArray.
LONG GetCount | ( | ) | const [virtual] |
Returns the number of Sample objects in the array.
Reimplemented from CRefArray.
Reimplemented in CNurbsSampleRefArray, and CPolygonNodeRefArray.
bool IsValid | ( | ) | const [virtual] |
Returns true if this array is a valid object or false otherwise.
Reimplemented from CRefArray.
Reimplemented in CNurbsSampleRefArray, and CPolygonNodeRefArray.
CLongArray GetIndexArray | ( | ) | const |
SubComponent GetSubComponent | ( | ) | const |
Creates a SubComponent object from this Sample array,
CSampleRefArray Navigate | ( | siNavigateComponentType | in_siNavigate | ) | const |
Navigates the Sample objects of the underlying geometry as specifed by the navigation component type. An array of Sample objects corresponding to each Sample object visited is returned. Navigation is circular -- for instance, navigating beyond the last component will return the first and vice versa.
in_siNavigate | Type of direction for navigating the Sample objects. |