Public Member Functions
Facet Class Reference

Detailed Description

A facet is a generic concept used to describe a Geometry's PolygonFace, NurbsSurface or NurbsCurve.

Having a generic term for this concept allows the user to write code to traverse an object geometry in a generic fashion without resorting to special case handling based on a specific geometry type.

See also:
CFacetRefArray, Point, Segment, Geometry, Geometry::GetFacets
Example:
        using namespace XSI;
        Application app;
        Model root = app.GetActiveSceneRoot();

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

        CFacetRefArray facets( myCube.GetActivePrimitive().GetGeometry().GetFacets() );

        app.LogMessage( facets.GetClassIDName() );

        LONG lFacetCount = facets.GetCount();
        for ( LONG i=0; i<lFacetCount; i++ )
        {
            Facet facet(facets[i]);
            CSegmentRefArray segments( facet.GetSegments() );

            app.LogMessage( L"Facet.Index " +
                            CValue(facet.GetIndex()).GetAsText() );

            LONG lSegmentCount = segments.GetCount();

            for (LONG j=0; j<lSegmentCount; j++)
            {
                Segment seg = segments[j];
                app.LogMessage( L"Facet.Segment.Index " +
                                CValue(seg.GetIndex()).GetAsText() );
            }
        }

#include <xsi_facet.h>

Inheritance diagram for Facet:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Facet ()
 ~Facet ()
 Facet (const CRef &in_ref)
 Facet (const Facet &in_obj)
bool IsA (siClassID in_ClassID) const
siClassID GetClassID () const
Facetoperator= (const Facet &in_obj)
Facetoperator= (const CRef &in_ref)
CSegmentRefArray GetSegments () const
CPointRefArray GetPoints () const
LONG GetNbPoints () const
LONG GetIndex () const
CSampleRefArray GetSamples () const
SubComponent GetSubComponent () const
Facet Navigate (siNavigateComponentType in_siNavigate) const

Constructor & Destructor Documentation

Facet ( )

Default constructor.

~Facet ( )

Default destructor.

Facet ( const CRef in_ref)

Constructor.

Parameters:
in_refconstant reference object.
Facet ( const Facet in_obj)

Copy constructor.

Parameters:
in_objconstant class object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID) const [virtual]

Returns true if a given class type is compatible with this API class.

Parameters:
in_ClassIDclass type.
Returns:
true if the class is compatible, false otherwise.

Reimplemented from SIObject.

Reimplemented in NurbsSurface, and PolygonFace.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from SIObject.

Reimplemented in NurbsSurface, and PolygonFace.

Facet& operator= ( const Facet in_obj)

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:
in_objconstant class object.
Returns:
The new Facet object.
Facet& operator= ( const CRef in_ref)

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:
in_refconstant class object.
Returns:
The new Facet object.

Reimplemented from SIObject.

Reimplemented in NurbsSurface, and PolygonFace.

CSegmentRefArray GetSegments ( ) const

Returns an array of Segment objects on this Facet object.

Returns:
Array of references to Segment objects.
CPointRefArray GetPoints ( ) const

Returns an array of Point objects on this Facet object.

Returns:
Array of references to Point objects.
LONG GetNbPoints ( ) const

Returns the number of points on this Facet object.

Since:
4.2
LONG GetIndex ( ) const

Returns the index of this Facet object in the CFacetRefArray.

Returns:
The index of this facet in the geometry.
CSampleRefArray GetSamples ( ) const

Returns an array of Sample object on this Facet object.

Returns:
Array of references to Sample objects.
SubComponent GetSubComponent ( ) const

Creates a SubComponent object from this Facet object,

Returns:
The SubComponent object.
Facet Navigate ( siNavigateComponentType  in_siNavigate) const

Navigates the Facet objects of the underlying geometry as specifed by the navigation component type (siNavigateComponentType). Navigation is circular -- for instance, navigating beyond the last component will return the first and vice versa.

Parameters:
in_siNavigateType of direction for navigating the Facet objects (one of the siNavigateComponentType values).
Returns:
The Facet object being visited.

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