#include <xsi_polygonnode.h>
The PolygonNode object gives access to the X3DObject's polygon node geometry. A polygon represents the edge junction of a polygon object.
using namespace XSI; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube ); PolygonMesh mesh( myCube.GetActivePrimitive().GetGeometry(0) ); PolygonFace face( mesh.GetPolygons().GetItem(0) ); PolygonNode node( face.GetNodes().GetItem(0) ); app.LogMessage( L"Index of Node 0: " + CValue(node.GetIndex()).GetAsText() );
Public Member Functions |
|
PolygonNode () | |
~PolygonNode () | |
PolygonNode (const CRef &in_ref) | |
PolygonNode (const PolygonNode &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
PolygonNode & | operator= (const PolygonNode &in_obj) |
PolygonNode & | operator= (const CRef &in_ref) |
LONG | GetIndex () const |
MATH::CVector3 | GetNormal (bool &io_bValid) const |
PolygonNode | ( | ) |
Default constructor.
~PolygonNode | ( | ) |
Default destructor.
PolygonNode | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | constant reference object. |
PolygonNode | ( | const PolygonNode & | in_obj | ) |
Copy constructor.
in_obj | constant class object. |
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from Sample.
siClassID GetClassID | ( | ) | const [virtual] |
PolygonNode& operator= | ( | const PolygonNode & | in_obj | ) |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
PolygonNode& 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.
in_ref | constant class object. |
Reimplemented from Sample.
LONG GetIndex | ( | ) | const |
Returns the index of this PolygonNode object within the polygon face.
Reimplemented from Sample.
MATH::CVector3 GetNormal | ( | bool & | io_bValid | ) | const |
Returns the normal of this PolygonNode object.
io_bValid | Returns true if the normal is valid. |