An array of Facet objects representing all segments of the underlying Geometry object.
using namespace XSI; using namespace MATH; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube ); CFacetRefArray facets( myCube.GetActivePrimitive().GetGeometry().GetFacets() ); CVector3Array normArray = facets.GetNormalArray(); app.LogMessage( facets.GetClassIDName() ); app.LogMessage( CValue(normArray.GetCount()).GetAsText() ); for (LONG i=0; i<normArray.GetCount(); i++) { app.LogMessage( L"Normal " + CValue(i).GetAsText() ); app.LogMessage( CValue(normArray[i].GetX()).GetAsText() + L"," + CValue(normArray[i].GetY()).GetAsText() + L"," + CValue(normArray[i].GetZ()).GetAsText() ); }
#include <xsi_facet.h>
Public Member Functions | |
CFacetRefArray () | |
CFacetRefArray (const CFacetRefArray &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 |
CLongArray | GetIndexArray () const |
SubComponent | GetSubComponent () const |
CFacetRefArray | Navigate (siNavigateComponentType in_siNavigate) const |
CFacetRefArray | ( | ) |
Constructor.
CFacetRefArray | ( | const CFacetRefArray & | in_array | ) |
Copy constructor.
in_array | constant CFacetRefArray reference object. |
CRef GetItem | ( | LONG | in_index | ) | const [virtual] |
Returns a Facet object at a specified index in the array.
in_index | The index of the Facet to get. |
Reimplemented from CRefArray.
Reimplemented in CNurbsSurfaceRefArray, and CPolygonFaceRefArray.
Returns the Facet object in the array matching the specified name.
in_name | The name of the Facet to get. |
Reimplemented from CRefArray.
Reimplemented in CNurbsSurfaceRefArray, and CPolygonFaceRefArray.
LONG GetCount | ( | ) | const [virtual] |
Returns the number of Facet objects in the array.
Reimplemented from CRefArray.
Reimplemented in CNurbsSurfaceRefArray, and CPolygonFaceRefArray.
bool IsValid | ( | ) | const [virtual] |
Returns whether this array is a valid object.
Reimplemented from CRefArray.
Reimplemented in CNurbsSurfaceRefArray, and CPolygonFaceRefArray.
MATH::CVector3Array GetNormalArray | ( | ) | const |
Returns an array of normals expressed with CVector3 objects.
Reimplemented in CPolygonFaceRefArray.
CLongArray GetIndexArray | ( | ) | const |
Returns an array of indices in this CFacetRefArray.
SubComponent GetSubComponent | ( | ) | const |
Creates a SubComponent object from this Facet array,
CFacetRefArray Navigate | ( | siNavigateComponentType | in_siNavigate | ) | const |
Navigates the Facet objects of the underlying geometry as specifed by the navigation component type (siNavigateComponentType). An array of Facet objects corresponding to each Facet object visited is returned. Navigation is circular -- for instance, navigating beyond the last component will return the first and vice versa.
in_siNavigate | Type of direction for navigating the Facet objects (one of the siNavigateComponentType values). |