#include <xsi_vertex.h>
Represents an array of Vertex objects.
using namespace XSI; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myGrid; root.AddGeometry( L"Grid", L"MeshSurface", L"", myGrid ); PolygonMesh mesh(myGrid.GetActivePrimitive().GetGeometry()); CVertexRefArray vertices(mesh.GetVertices()); LONG lCount = vertices.GetCount(); for (LONG i=0; i<lCount; i++ ) { Vertex vertex(vertices.GetItem(i)); CVertexRefArray neighbors(vertex.GetNeighborVertices(1)); app.LogMessage( L"Number of neighbor vertices for Vertex " + CValue(i).GetAsText() + L": " + CValue(neighbors.GetCount()).GetAsText() ); }
Public Member Functions |
|
CVertexRefArray (const CVertexRefArray &in_array) | |
CRef | GetItem (LONG in_index) const |
CRef | GetItem (const CString &in_name) const |
LONG | GetCount () const |
bool | IsValid () const |
CVertexRefArray | GetNeighborVertices (LONG in_lDistance=1) const |
CEdgeRefArray | GetNeighborEdges (LONG in_lDistance=1) const |
CPolygonFaceRefArray | GetNeighborPolygons (LONG in_lDistance=1) const |
CVertexRefArray | GrowNeighborVertices (LONG in_lDistance=1) const |
CDoubleArray | GetCreaseArray () const |
CVertexRefArray | ( | const CVertexRefArray & | in_array | ) |
Copy constructor.
in_array | constant CVertexRefArray reference object. |
CRef GetItem | ( | LONG | in_index | ) | const [virtual] |
Returns a Vertex object at a specified index in the array.
in_index | The index of the Vertex. |
Reimplemented from CPointRefArray.
Returns the Vertex object in the array matching the specified name.
in_name | The name of the Vertex. |
Reimplemented from CPointRefArray.
LONG GetCount | ( | ) | const [virtual] |
Returns the number of Vertex objects in the array.
Reimplemented from CPointRefArray.
bool IsValid | ( | ) | const [virtual] |
Returns true if this array is a valid object or false otherwise.
Reimplemented from CPointRefArray.
CVertexRefArray GetNeighborVertices | ( | LONG | in_lDistance = 1 |
) | const |
Returns an array of Vertex neighbors for all vertices contained in this array, within a given distance.
in_lDistance | Value representing the degree of neighborhood |
CEdgeRefArray GetNeighborEdges | ( | LONG | in_lDistance = 1 |
) | const |
Returns an array of Edge neighbors for all vertices contained in this array, within a given distance.
in_lDistance | Value representing the degree of neighborhood |
CPolygonFaceRefArray GetNeighborPolygons | ( | LONG | in_lDistance = 1 |
) | const |
Returns an array of PolygonFace neighbors for all vertices contained in this array, within a given distance.
in_lDistance | Value representing the degree of neighborhood |
CVertexRefArray GrowNeighborVertices | ( | LONG | in_lDistance = 1 |
) | const |
Returns an array of adjacent Vertex neighbors for all vertices contained in this array, within a given distance.
in_lDistance | Value representing the degree of neighborhood |
CDoubleArray GetCreaseArray | ( | ) | const |
Returns an array of crease values for all vertices contained in this vertex array.