An array of Point objects that represent the points in the Geometry.
using namespace XSI; using namespace MATH; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myGrid; root.AddGeometry( L"Grid", L"MeshSurface", L"", myGrid ); Geometry geom = myGrid.GetActivePrimitive().GetGeometry(0); CPointRefArray points( geom.GetPoints() ); CValue val(points.GetCount()); app.LogMessage( CString(L"Number of points: ") + val.GetAsText() ); for(LONG i = 0; i < points.GetCount(); ++i) { Point pt(points[i]); CVector3 pos( pt.GetPosition() ); app.LogMessage( CValue(pos.GetX()).GetAsText() + L"," + CValue(pos.GetY()).GetAsText() + L"," + CValue(pos.GetZ()).GetAsText() ); }
#include <xsi_point.h>
Public Member Functions | |
CPointRefArray (const CPointRefArray &in_array) | |
CRef | GetItem (LONG in_index) const |
CRef | GetItem (const CString &in_name) const |
LONG | GetCount () const |
bool | IsValid () const |
MATH::CVector3Array | GetPositionArray () const |
CStatus | PutPositionArray (const MATH::CVector3Array &in_points) |
MATH::CVector3Array | GetNormalArray () const |
CLongArray | GetIndexArray () const |
SubComponent | GetSubComponent () const |
CPointRefArray | Navigate (siNavigateComponentType in_siNavigate) const |
CPointRefArray | ( | const CPointRefArray & | in_array | ) |
Copy onstructor.
in_array | constant CPointRefArray reference object. |
CRef GetItem | ( | LONG | in_index | ) | const [virtual] |
Returns a reference to the Point object at a specified index in the array.
in_index | The index of the Point. |
Reimplemented from CRefArray.
Reimplemented in CControlPointRefArray, and CVertexRefArray.
Returns a reference to the Point object matching the specified index.
in_name | The name of the Point. |
Reimplemented from CRefArray.
Reimplemented in CControlPointRefArray, and CVertexRefArray.
LONG GetCount | ( | ) | const [virtual] |
Returns the number of Point objects in the array.
Reimplemented from CRefArray.
Reimplemented in CControlPointRefArray, and CVertexRefArray.
bool IsValid | ( | ) | const [virtual] |
Returns true if this array is a valid object or false otherwise.
Reimplemented from CRefArray.
Reimplemented in CControlPointRefArray, and CVertexRefArray.
MATH::CVector3Array GetPositionArray | ( | ) | const |
Returns an array of positions expressed with CVector3 objects.
CStatus PutPositionArray | ( | const MATH::CVector3Array & | in_points | ) |
Sets the positions as an array of CVector3 objects. For non-custom operators this property can only be set if the object has been frozen. This operation is not undoable.
in_points | An array of CVector3. |
MATH::CVector3Array GetNormalArray | ( | ) | const |
Returns an array of normals expressed with CVector3 objects.
CLongArray GetIndexArray | ( | ) | const |
Return an array of indices in the geometry Point array
SubComponent GetSubComponent | ( | ) | const |
Creates a SubComponent object from this Point array,
CPointRefArray Navigate | ( | siNavigateComponentType | in_siNavigate | ) | const |
Navigates the Point objects of the underlying geometry as specifed by the navigation component type. The function returns an array of Point objects corresponding to each Point object visited. Navigation is circular -- for instance, navigating beyond the last component will return the first and vis versa.
in_siNavigate | Type of direction for navigating the Point objects. |