Public Member Functions
CPolygonFaceRefArray Class Reference

Detailed Description

An array of PolygonFace objects representing the polygons in a polygon mesh.

Warning:
This specialized array is returned by PolygonMesh::GetPolygons, 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:
PolygonMesh::GetPolygons
Example:
        using namespace MATH;

        Application app;
        Model root = app.GetActiveSceneRoot();

        X3DObject myCube;
        root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube );

        PolygonMesh mesh( myCube.GetActivePrimitive().GetGeometry() );
        CPolygonFaceRefArray polygons( mesh.GetPolygons() );

        CVector3Array normArray = polygons.GetNormalArray();

        app.LogMessage( polygons.GetClassIDName() );
        app.LogMessage( CValue((LONG)normArray.GetCount()).GetAsText() );

        for (LONG i=0; i<normArray.GetCount(); ++i)
        {
            app.LogMessage(L"Normal " + CValue((LONG)i).GetAsText() );
            app.LogMessage(
                CValue(normArray[i].GetX()).GetAsText() + L"," +
                CValue(normArray[i].GetY()).GetAsText() + L"," +
                CValue(normArray[i].GetZ()).GetAsText() );
        }

#include <xsi_polygonface.h>

Inheritance diagram for CPolygonFaceRefArray:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  CPolygonFaceRefArray (const CPolygonFaceRefArray &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
CVertexRefArray  GetNeighborVertices (LONG in_lDistance=1) const
CEdgeRefArray  GetNeighborEdges (LONG in_lDistance=1) const
CPolygonFaceRefArray  GetNeighborPolygons (LONG in_lDistance=1) const
CPolygonFaceRefArray  GrowNeighborPolygons (LONG in_lDistance=1) const
MATH::CVector3Array  GetPolygonNodeNormalArray () const
CLongArray  GetPolygonNodePolygonFaceIndexArray () const

Constructor & Destructor Documentation

Copy constructor.

Parameters:
in_array constant CPolygonFaceRefArray reference object.

Member Function Documentation

CRef GetItem ( LONG  in_index ) const [virtual]

Returns a PolygonFace object at a specified index in the array.

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

Reimplemented from CFacetRefArray.

CRef GetItem ( const CString in_name ) const [virtual]

Returns the PolygonFace object matching the specified name.

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

Reimplemented from CFacetRefArray.

LONG GetCount ( ) const [virtual]

Returns the number of PolygonFace objects in the array.

Returns:
The number of PolygonFace objects.

Reimplemented from CFacetRefArray.

bool IsValid ( ) const [virtual]

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

Returns:
true if valid, false otherwise.

Reimplemented from CFacetRefArray.

MATH::CVector3Array GetNormalArray ( ) const

Returns an array of normals expressed with CVector3 objects.

Returns:
Array of CVector3 objects.

Reimplemented from CFacetRefArray.

CVertexRefArray GetNeighborVertices ( LONG  in_lDistance = 1 ) const

Returns an array of Vertex neighbors within a given distance.

Parameters:
in_lDistance Value representing the degree of neighborhood (eg: degree=2 for a polygon means its adjacent vertices plus the adjacent vertices of the adjacent polygons).
Returns:
Array of Vertex objects
CEdgeRefArray GetNeighborEdges ( LONG  in_lDistance = 1 ) const

Returns an array of Edge neighbors within a given distance.

Parameters:
in_lDistance Value representing the degree of neighborhood (eg: degree=2 for a polygon means its adjacent vertices plus the adjacent vertices of the adjacent polygons).
Returns:
Array of Edge objects
CPolygonFaceRefArray GetNeighborPolygons ( LONG  in_lDistance = 1 ) const

Returns an array of PolygonFace neighbors within a given distance.

Parameters:
in_lDistance Value representing the degree of neighborhood (eg: degree=2 for a polygon means its adjacent vertices plus the adjacent vertices of the adjacent polygons).
Returns:
Array of PolygonFace objects
CPolygonFaceRefArray GrowNeighborPolygons ( LONG  in_lDistance = 1 ) const

Returns an array of PolygonFace objects that are adjacent to each PolygonFace objects of this array, within a given distance.

Parameters:
in_lDistance Value representing the degree of neighborhood (eg: degree=2 for a polygon means its adjacent vertices plus the adjacent vertices of the adjacent polygons).
Returns:
Array of PolygonFace objects
MATH::CVector3Array GetPolygonNodeNormalArray ( ) const

Returns an array of normals for all PolygonNode objects in the array. The normals are expressed with CVector3 objects.

Returns:
Array of CVector3 objects.
CLongArray GetPolygonNodePolygonFaceIndexArray ( ) const

Returns an array containing the number of PolygonNode objects and the corresponding PolygonNode indices.for each PolygonFace in the array. The information is stored in the array as follows:

 [Number of PNode for PFace(0), PNode indices, ... Number of PNode for PFace(N), PNode indices] 
Returns:
Array of values.
Since:
5.0

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