A TriangleVertex represents a Point of a Triangle object.
using namespace XSI; using namespace MATH; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube ); Triangle triangle( myCube.GetActivePrimitive().GetGeometry().GetTriangles().GetItem(0)); TriangleVertex vertex0(triangle.GetPoints().GetItem(0)); CVector3 pos(vertex0.GetPosition()); app.LogMessage( L"Vertex 0: " + CValue(pos.GetX()).GetAsText() + L"," + CValue(pos.GetY()).GetAsText() + L"," + CValue(pos.GetZ()).GetAsText() );
#include <xsi_trianglevertex.h>
Public Member Functions |
|
TriangleVertex () | |
~TriangleVertex () | |
TriangleVertex (const CRef &in_ref) | |
TriangleVertex (const TriangleVertex &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
TriangleVertex & | operator= (const TriangleVertex &in_obj) |
TriangleVertex & | operator= (const CRef &in_ref) |
MATH::CVector3 | GetPosition () const |
MATH::CVector3 | GetNormal () const |
CVertexColor | GetColor () const |
CUV | GetUV () const |
LONG | GetIndex () const |
TriangleVertex | ( | ) |
Default constructor.
~TriangleVertex | ( | ) |
Default destructor.
TriangleVertex | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | constant reference object. |
TriangleVertex | ( | const TriangleVertex & | 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 SIObject.
siClassID GetClassID | ( | ) | const [virtual] |
TriangleVertex& operator= | ( | const TriangleVertex & | 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. |
TriangleVertex& 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 SIObject.
MATH::CVector3 GetPosition | ( | ) | const |
Returns the position of this TriangleVertex object.
MATH::CVector3 GetNormal | ( | ) | const |
Returns the normal of this TriangleVertex object. Triangles that belong to the same polygon have the same normal values.
CVertexColor GetColor | ( | ) | const |
Returns the vertex color of this TriangleVertex object.
CUV GetUV | ( | ) | const |
Returns the UV coordinates this TriangleVertex object.
LONG GetIndex | ( | ) | const |
Returns the index of this TriangleVertex object in the geometry.