Public Member Functions
CPolygonNodeRefArray Class Reference

Detailed Description

An array of PolygonNode objects representing the edge junction in a polygon.

Warning:
This specialized array is returned by Vertex::GetNodes, PolygonMesh::GetNodes, PolygonFace::GetNodes, and Edge::GetNodes, it is not meant to be created and modified in user-defined functions. If you want to add and remove arbitrary items to a collection, you must use a CRefArray instead.
See also:
Vertex::GetNodes, PolygonMesh::GetNodes, PolygonFace::GetNodes, Edge::GetNodes
Example:
        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>

Inheritance diagram for CPolygonNodeRefArray:
Inheritance graph
[legend]

List of all members.

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

Constructor & Destructor Documentation

Copy constructor.

Parameters:
in_array constant CPolygonNodeRefArray reference object.

Member Function Documentation

CRef GetItem ( LONG  in_index ) const [virtual]

Returns a PolygonNode reference object at a specified index in the array.

Parameters:
in_index The index of the PolygonNode.
Returns:
A reference to the PolygonNode object.

Reimplemented from CSampleRefArray.

CRef GetItem ( const CString in_name ) const [virtual]

Returns a PolygonNode reference object matching the specified name in the array.

Parameters:
in_name The name of the PolygonNode.
Returns:
A reference to the PolygonNode object.

Reimplemented from CSampleRefArray.

LONG GetCount ( ) const [virtual]

Returns the number of PolygonNode objects in the array.

Returns:
The number of PolygonNode objects.

Reimplemented from CSampleRefArray.

bool IsValid ( ) const [virtual]

Returns true if this array is a valid object or false otherwise.

Returns:
true if valid, false otherwise.

Reimplemented from CSampleRefArray.

MATH::CVector3Array GetNormalArray ( ) const

Returns an array of normals expressed with CVector3 objects.

Returns:
Array of CVector3 objects.

The documentation for this class was generated from the following file: