An array of PolygonNode objects representing the edge junction in a polygon.
using namespace XSI; using namespace MATH; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCone; root.AddGeometry( L"Cone", L"MeshSurface", L"", myCone ); PolygonMesh mesh( myCone.GetActivePrimitive().GetGeometry(0) ); CPolygonNodeRefArray pnodes(mesh.GetNodes()); LONG lCount = pnodes.GetCount(); app.LogMessage( CString(L"Number of nodes: ") + CValue(lCount).GetAsText() ); CVector3 norm; PolygonNode pnode; for ( LONG i=0; i<lCount; i++ ) { bool bValid; pnode = pnodes[i]; norm = pnode.GetNormal(bValid); app.LogMessage( L"Normal: (" + CString(CValue(bValid).GetAsText()) + L") " + CValue(norm.GetX()).GetAsText() + L"," + CValue(norm.GetY()).GetAsText() + L"," + CValue(norm.GetZ()).GetAsText() ); }
#include <xsi_polygonnode.h>
Public Member Functions |
|
CPolygonNodeRefArray (const CPolygonNodeRefArray &in_array) | |
CRef | GetItem (LONG in_index) const |
CRef | GetItem (const CString &in_name) const |
LONG | GetCount () const |
bool | IsValid () const |
MATH::CVector3Array | GetNormalArray () const |
CPolygonNodeRefArray | ( | const CPolygonNodeRefArray & | in_array | ) |
Copy constructor.
in_array | constant CPolygonNodeRefArray reference object. |
CRef GetItem | ( | LONG | in_index | ) | const [virtual] |
Returns a PolygonNode reference object at a specified index in the array.
in_index | The index of the PolygonNode. |
Reimplemented from CSampleRefArray.
Returns a PolygonNode reference object matching the specified name in the array.
in_name | The name of the PolygonNode. |
Reimplemented from CSampleRefArray.
LONG GetCount | ( | ) | const [virtual] |
Returns the number of PolygonNode objects in the array.
Reimplemented from CSampleRefArray.
bool IsValid | ( | ) | const [virtual] |
Returns true if this array is a valid object or false otherwise.
Reimplemented from CSampleRefArray.
MATH::CVector3Array GetNormalArray | ( | ) | const |
Returns an array of normals expressed with CVector3 objects.