An array of Triangle objects that represents all the triangles in the Geometry.
using namespace XSI; using namespace MATH; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube ); CTriangleRefArray triangles(myCube.GetActivePrimitive().GetGeometry().GetTriangles()); CVector3Array normals( triangles.GetPolygonNodeNormalArray() ); for (LONG i=0; i<normals.GetCount(); ++i ) { app.LogMessage( CValue(normals[i].GetX()).GetAsText() + L"," + CValue(normals[i].GetY()).GetAsText() + L"," + CValue(normals[i].GetZ()).GetAsText() ); }
#include <xsi_triangle.h>
Public Member Functions | |
CTriangleRefArray (const CTriangleRefArray &in_array) | |
CRef | GetItem (LONG in_index) const |
CRef | GetItem (const CString &in_name) const |
LONG | GetCount () const |
bool | IsValid () const |
MATH::CVector3Array | GetPositionArray () const |
MATH::CVector3Array | GetPolygonNodeNormalArray () const |
CVertexColorArray | GetColorArray () const |
CUVArray | GetUVArray () const |
CLongArray | GetIndexArray () const |
CTriangleRefArray | ( | const CTriangleRefArray & | in_array | ) |
Copy constructor.
in_array | constant CTriangleRefArray reference object. |
CRef GetItem | ( | LONG | in_index | ) | const [virtual] |
LONG GetCount | ( | ) | const [virtual] |
bool IsValid | ( | ) | const [virtual] |
Returns true if this array is a valid object or false otherwise.
Reimplemented from CRefArray.
MATH::CVector3Array GetPositionArray | ( | ) | const |
Returns the TriangleVertex positions for all triangles of this array.
MATH::CVector3Array GetPolygonNodeNormalArray | ( | ) | const |
Returns the TriangleVertex normals for all triangles of this array.
CVertexColorArray GetColorArray | ( | ) | const |
Returns the TriangleVertex colors for all triangles of this array.
CUVArray GetUVArray | ( | ) | const |
Returns the TriangleVertex UV coordinates for all triangles of this array.
CLongArray GetIndexArray | ( | ) | const |
Returns the TriangleVertex indices for each triangle of this array.